Android FrameLayout with image slide in - android

I need to create a gauge. The first image will be static and holds the measurements and markings. The second image will slide in from bottom to top. To simulate a water tank.
What will be the best way to handle this problem?
At the moment I am trying to use a framelayout to hold the two images but not sure if its the right approach.
I have done this in css and jquery but cant seen to find a way around it in android native.
any ideas?

In general you'll have better luck here if you make the title of your question more descriptive. It doesn't seem like you are actually asking anything about FrameLayout.
Anywho, if I am understanding you correctly you should be able to adapt ProgressBar to fit your needs for creating a water tank. Note if you want it to be vertical instead of horizontal you can find a solution on this question: Android - set a ProgressBar to be a vertical bar instead of horizontal?

Related

Android varied image position alignment in single layout

I am creating a game with circular buttons. I am thinking about a strategy that allows me to display variety of buttons in variety of positions in the same screen in an efficient way.
Like,
Sample images:
Image 1: 1 button
Image 4: 4 Buttons
The game works on seconds and I want the images to be changing so smoothly and should not take much time for transition. My ideas to implement this are below. Please advise me the best way to achieve this.
Use Grid view and populate items as required.
Use Open GL to display buttons.
Use a fragment and assign layouts as required.
Any other perfect way you suggest.
Note: I don't use strips to animate. All I want to do is just to do some calculation according to which button the player picks to click. And my concerns are,
1. Quick and smooth transition of layouts.
please guide me to pick the right path.
Thanks,
Karthick.

auto layout in android

Good day, i am developing an android app which generates comic like albums, i need to fit this comic to any screen width but i have trouble doing it coz of the layouts, its very odd and doesn't seem to be aligned with one another, here :
those boxe are composed of FrameLayouts which contains and ImageView (back), the frame which is a PNG (middle) and a TextView on top of the frame image. So basically the design is very complex and odd, I've heard that there is a way to make this fit automatically on every screen on IOS, they called it auto layout i guess. Is there a counter part of this on android? Thank you.
Try using a GridLayout. You should be able to achieve what you're trying to do. There's a good blog post here.

Android - creating a simplified spotify-like layout

I am developing an Android app and am a bit stuck on how I go about creating the layout I'm after. I said spotify-like (website not app) as I dont want the parallax effect. It's actually closer to http://www.poormet.com/.
What I have tested so far is a RelativeLayout with an ImageView and Listview (with transparent dividers) within it. This layout shows the image in the background between rows which is a step in the right direction. The issue is I'm at a loss as to how to get the images to change smoothly depending on what listrows are on screen.
Also, if I want to replicate the text over the images like poormet example mentioned above, then it seems to me I am going to have to have alternating transparent and not transparent rows.
Am I on the right track or am I approaching this problem the wrong way?
Any guidance will be greatly appreciated!!!
(also, please let me know if what I have described doesn't make sense - more than happy to clarify)

How to create round shape image using android?

I am having four piece of image.
Here I attached one sample image.
How can I create the round shaped image using these type of images?
Which layout is best for creating the UI for android?
Thanks in advance.
are you talking about something like this..
http://www.baijs.nl/tinycircleslider/
And for designing the UI for Android is depends on our requirement.it means whether you want to design something looks like rows and columns then GridLayout and tableLayout will be better,depends on requirement and look the layout will changes once try it your self and choose the best suited for your applicaiton.All the best Mate
inside relative layout add four imageview with attrs ParentTop, ParentRight, ParentBottom and ParentLeft. every image is rectangular with transparent extra area.
i can understand it is little hard to visualize on first attempt.
now come to click area. so a runtime decision about ignore transparent area click will be right thing.
more tricky way will be manage flags for all listeners and if two listener get calls its transparent area .

How did they make such layout - which elements they used?

At the moment, I am using Euro 2012 app and it has some interesting layout parts. If you go to matches->knockout screen, you'll see 3 screens like this.
If you slide left or right, you move between them not like between one activity to another, but just like all these elements are laid on one big canvas and you slide each screen into focus. Even thou, if you slide left/right, the screen cannot be stopped in the way that half of each image is visible, so I guess it's not a big canvas. Somehow you can slide screen like one big image, and yet it always lock perfectly as if they used 3 activities for this.
How did the do this?
It's a ViewPager, available in Android support package and described in their blog.
The designing is not so much difficult, As i think to draw that boxes showing quarterfinals, semifinals.
They having layout( we can do by placing image in background also).
The major role played by FrameLayout which shows you that effect(emphasis), the flages are fetch from url as matches are decided(not essentially images only names are sufficient as flags came inside app and gets applied as updated).
After your click i think the start image gets change it's just replacing that image with new one.
As you said they are not on single canvas (but if they did customization of heir Viewpager that it's not stopping in between activities), but i think it's on single canvas.
If your taking about quickness of loading and all it's up to you as much code and processing you optimized it gives you smooth feel and fast processing.
We can appreciate the work but we can not say it's too much difficult as i think it's quit easy...
Hope this explanation helps you to understand ....

Categories

Resources