As you can see in the picture from the link below, i want to make a same set up screen in this material design style. I have searched the web but can't even find the name of this kind of screen.
Can anyone give me a name of it? or show me some library that provide this kind of screen. thanks in advance!!
http://3.bp.blogspot.com/-7_w8_KbH7a0/VLcpuwPexsI/AAAAAAAACx4/9zORceLZ5NA/s1600/Screenshot_2014-12-16-03-04-06.png
This is actually something that you can implement yourself. In the top, you could place any ImageView. In the center, there goes a RecyclerView to display a list of wifi networks. And at the bottom, there are 2 buttons (nothing's special about this one).
So, perhaps you could structure your layout like the following
LinearLayout (Vertical Orientation)
|_ImageView
|_RecyclerView (0dp height, with layout weight 1)
|_LinearLayout (Horizontal Orientation)
|_Button
|_Button
Related
I am trying to get a bar at the bottom of the screen where ads can be placed and have found no way of doing so. What I am trying to do is pretty much this (below)
You can see that there is a gap for adverts to fit in at the bottom, meaning that the view of the game doesn't actually take up the entire screen.
How can I achieve this? I am looking for maybe a way to scale the view to change its height but I don't know how
You put both in a relative layout. Make the bar aligned to the parent bottom, then make the game view align to the top of the bar.
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?
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 .
I have a few issues and questions regarding some UI development on Android. Firstly look at this image:
Firstly at image A) This is a image that I insert and repeat horizontally to give the zig-zag shape at the top of the screen regardless of screensize and above that a textField with no content and a background color - But as I'm sure you can is that the two colors don't match up quite as perfectly as it should even though they both have the same hex color value (#BF0426). And secondly, you can also see some serious pixelation on that zig-zag image. How do I fix these 2 problems?
And then at image B) Here I have a simple listView. What I would like to do, is firstly indent it a bit on both sides, and round the corners of the top and bottom item. So basically I want it to look like the blue border drawn on the screenshot. (Your typical iOS listView). How do I go about doing this?
Thanks in advance for any tips!
For the image. Just out of curiosity, why wouldnt you simply extend your image to include the top pixels as well? In other words, build your repeating image such that it incorporates the pixels that you are trying to create using the empty textview. This will at least take care of the color missmatch, as the color will all be generated from the same place. In terms of the pixelation. Are you truly repeating the image, or are you spreading the image. A spreading will definitely cause what you are seeing.
For your tableview:
For the left and right indent, you can simply use the margin or padding attributes of tableview item. There are generic padding and/or margin attributes (which will pad all of the top, bottom, left and right), or there are separate padding and/or margin attributes for each top, bottom, left, and right. Here is a great link on padding versus margin that you may want to read.
Difference between a View's Padding and Margin
Example attribute (as called in an XML file) for bottom margin
android:layout_marginBottom
setMargins(left, top, right, bottom) // for setting margins programmatically
Example attribute (as called in an XML file) for top padding
android:paddingTop
setPadding(left, top, right, bottom) // for setting padding programmatically
For the custom top and bottom, you should be able to use the following tutorial
http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/
From here, you should be able to detect the item as the first and last item and set the background property (image) to a background image that has a rounded top or rounded bottom. This is how I do it on the iPhone. I have also implemented things that LOOK like tableviews but are simply vertical layouts with my own custom views that I have made to look like what you are wanting.
One thing to consider is the file format you use is going to mutate the image as you save it (lossy compression), so a .jpg with a certain color may look different than a .bmp with the same color. Make sure you author using the same application and/or export settings when trying to match up images.
Also, if you created your image with a DPI that is not compatible with the android display it can cause serious pixelation in detail areas, especially with gradients and drop shadows.
I have a HorizontalScrollView that consists of Images (Icons). I need to scroll the view in "blocks" the width of the icons, so as to never have a "piece" of the icon on the screen. I need more, but this question will give me all the other answers I need.
Does anyone have a code example to point me to for this?
Thank You in advance.
JS
You can either use a Gallery or create your own custom View that does this (maybe extend HorizontalScrollView).
I accomplished this in two parts.
I dynamically add the buttons from resource files and account for spacing on the left, right, and between.
I modified HorizontalScrollView to simply scroll to one of X positions (whichever is closer to the currently stopped position).
Again, thanks for reading.
JS