I am new to android development. I got the design from client as show in the image bellow. can anyone suggest me how to create view like this?. I have created the expandable recycler view but not getting how to create multilevel listview.
You can use for each entry (list item) , a framelayout since it allows overlapping easily , have an image view inside it to take all the available space , and a Relative layout to define the other elements like the number, the color below it, etc... and then wrap this Relative layout with a Linear Layout ; the Relative layout would be first element , and then the Recycler/List View would be the second element below the relative , at first it is visibility="gone" , and on relative layout clicked ... relative.setVisibilty(View.VISIBLE) and so on ...
What you want is a bit more complex than what i said , but either way this is a good headstart !
Related
i am trying to design dynamic ui layout in android to present the date like the image below. i am **facing the challenges in the creating an view as clustered in the below mail **
i tried using list view!
but the each appeares in diffrent line, it dose not lookes like the image as below! is that possible to design like this. if so how to do that?
Try to create a few custom views, e.g. this circles with dates, this labels on the left and rights with xml layouts. Next, create parent view with some container layout, e.g. FrameLayout. In this parent view override it's onDraw() method, and there manually create and add every layout. It is simple, but might be not efficent, when there are many of views
Ho can I design a page like this
To achieve this layout simply make a GridView with custom layout. The custom layout could contains two child LinearLayout and The desired ImageView and TextView inside them. If you aren't familier with custom GridView just have a look on the simple tutorial,
https://www.caveofprogramming.com/guest-posts/custom-gridview-with-imageview-and-textview-in-android.html
For designing the layout see the below image,
You can make use of a gridView or RecyclerView(with a gridLayoutManager) and each item in your grid will contain properties like name,image,bgcolor1,bgcolor2 ..desing a layout and change the color,image name at runtime..
Suppose i want to make a view like as given below image
Is it efficient to have a custom list-view for this or a simple linear layout with elements which can be inflated and added to another layout. I do not want to have any click operation over the items, i just need to show them over a screen. Which one will be better approach?
I already know how to make Custom ListViews
I am trying to find solution how to display images in 2 columns grid with first row need to be one element with two columns width.
Android customize first child of grid view
I found this. but I hope there is some better solution...
You can do it using FrameLayout. This kind of layout allow you to put more than one Layout or XML item above each other.
I recommend for you to use the FrameLayout as a parent layout. Inside it put two GridViews the first one will represent the first wide element. The second GridView will be the normal small elements.
Put into your first GridView with your specific XML properties (Double wider than the others) only one item. Put into your first GridView with your specific XML properties the rest of items.
When you are handling the actions or the filling of the second GridView neglect the first two positions (Position 0 and 1) then act normal for the other.
Here is a good example of the FrameLayout usage. And here is a simple example of the GridView usage. I hope it helps
I am interested to learn how to make this Layout (in Picture):
:
As you can see there are 2 Layouts and user can switch them with the button what is in upper right corner. Can someone learn me how to make this Layout?
I'd recommend you using SlidingMenu library.
That is exactly what you want.
It has numerous options, so you can customize the view you want to get behind.
The left menu is implemented with a library called SlidingMenu. In the sliding menu you can simply add normal layout / android ui components. So there is a ListView with items. The items are simple LinearLayouts with the correct weights, to achieve a "table like" layout.
There are two ViewTypes in the ListView. One is a normal Item, one is a section header (Linear Layout or Framelayout).
You could also use a RelativeLayout instead of LinearLayout, but Relative Layout are "more expensive" (performance) than a LinearLayout.
i think you had to customise viewpager layout .
set first layout width as u need to be shown.
sample view pager