I want to develop an android app, but I'm still not that great at using xml or the eclipse wysiwyg editor to make scalable and robust interfaces!
Below is a quick concept I drew up on word of what my main game screen will consist of:
I'm currently thinking a vertical linear frame first, with a frame that doesn't change for my important stats etc., then a frame in the middle which is switched by the buttons, but I'm stuck on how to implement this.
For the centre button screen, the map screen, I am hoping to add an image of a map which can be moved around, and somehow attach invisible button objects to points in this picture, maybe with an array of squares or something?
I understand this is a pretty open question and might be difficult to answer, but if you think you can help in anyway please do.
Thanks!
There is a log of possibilities, but you can use a LinearLayout with android:orientation="vertical" and include your stats in top. For the changing screens with buttons you can use a FragmentTabHost and create different Fragment for each of your views.
Check this example with a implementation.
Regarding the map, I think the easiest option is to use Google Maps Android API v2. Here is a example to use the maps v2 and a example of how to add markers to the map.
Related
I'm am currently developing an app but came across a problem.
I want to have a Button or Image that I can move around. In the background, I have 3 "zones" where the Button/Image could be placed.
I don't know what to look for. I have searched the Internet for things like
https://developer.android.com/training/gestures/movement
Track X and Y coorinate of a button
Position of a Button Container with button
Button position after moving
(Android Studio button positioning)
I have searched for many things but cannot find a proper solution.
Please be so kind and share links with me on how to solve my problem.
Thank you in advance.
** SOLVED **
What i needed was Drag an Drop buttons
Looks like you'll need to implement a custom GLSurfaceView where you have a canvas to draw your different regions, and can also track movements. have a look here:
Displaying graphics with OpenGL ES
Respond to touch events
My first android app I'm creating, a text based game. Everything is looking great so far with functionality. I'm just wondering 2 things, one, is there a way to control how the new activity opens in the screen (new activities open from the center of the screen on my app, takes about a half second), and second, its it better to have each button pressed choice open a new activity or is there a better way to clear the screen and use the if and else commands in java.
I think as for the first part, you may want to use animation on transition between activities/fragments.
You do want to read more about fragments as i think it will solve your second question.
Check this small tutorial for the animation part.
Check docs for fragments.
Good luck.
I would like to know what the Android implementation is of this type of scrolling that you see in the Yahoo Weather App. Here is a video example:
http://www.youtube.com/watch?v=a-q_yetkpik
Any examples or ideas on how to implement this would sincerely help this poor lost soul!
Thank you
use that library https://github.com/xgc1986/ParallaxPagerLibrary, it's very easy to use, and it worked for me
demo
You should separate two different things here:
The horizontal scrolling
As you swipe your way through the viewpager, the background moves slower than the content does.
This effect can be achieved with the ParallaxPagerLibrary
The vertical scrolling
As you swipe up, the background image blurs away, making the "swiped up" content more visible to the user. This post explains it all and also provides a library.
But if you want it even better, someone wrote a simple "clone" of this weather app https://github.com/MoshDev/LikeYahooWeather
They customized ViewPager, the widget is called WeatherViewPager that it's unfortunately unavailable, looks like a ViewPager with a sort of parallax
You may take a look at https://play.google.com/store/apps/details?id=com.desarrollodroide.repos
it's a collection of usable opensource libraries
e.g. Utils->Paralloid or Utils->ParallaxScroll
I have a vertical LinearLayout which has two another vertical layouts inside. The first one is always shown, and the second one depends on some event. I do want to animate that second layout when shown. How can I do it smoothly and nice? Thank you so much,
You should check out this library on Github. It may help. It is an animation library for listviews.
ListViewAnimations
A very simple, yet elegant way to get your layouts animated is by using the android:animateLayoutChanges="true" on its parent. This will likely take a lot of work in getting a nice animation out of your hands, unless you want to customize it.
With KitKat, Google introduced the android.transtion API, which may also be worth looking at.
You can create your own animation and you apply that animation to your layout when you need(In your case at the time of shown your layout)
yourLayout.startAnimation(yourAnimation);
I have to display multiple tiles on the same screen. Each Tile contains header,contents, and footer that would be set dynamically. So each Tile would be display with dynamic data.
How can I develop a program in android SDK for TABLETs
Just to get you started, you could have a look at Fragments (and Activity's) or perhaps even a ViewPager.
All these tips require a certain base knowledge on Android, though, just as #aneal commented on your question.