Right align contents of a ListFragment - android

This is my first question in stack overflow. Please be liberal in validating it against the posting etiquette. which I am trying to adhere to.
I am attempting to create an android application for Honeycomb tablets, in which an activity loads a layout with fragments. Please see this image for better communication.
As seen that image, I have an activity running on emulated tablet. That activity has a listfragment on its left and and a fragment layout on right. The listfragment displays texts in a list. My need is that I have to have these texts in the listfragment to be aligned to right side of the fragment.
I had searched this site and many others but can find solutions about aligning an image on right of these text items in this list and not the text itself. I had attempted to use gravity property on the fragment and that too did not help.
Is this possible at all? Any suggestions on this will help me a lot.
Thanks,
Narayanan

In the layout that defines the list, the item's gravity property simply works fine.

Related

how to make a button fold down two EditTexts below on click

I'm a beginner with short knowledge of programming, I've just started learning android development. I'm making an app and at one of the pages I have to make a certain kind of design that I cannot figure out how to or can't even find them in the internet. Basically, as you can see in the images below, next to the first textview, there's a little arrow. Whenever the user clicks on that arrow, two edittexts should appear below that texview just like in the second image and kind of drag the rest of the textviews down. I'd be really grateful if you guys could help me do this or at least provide me with some information on where to search this kind of problem solution. Thanks.
Just create your desired layout in xml with 2 edittext below each textview. But make sure You take these 2 edittexts in a single container. Lets say LinearLayout.
Then you would be easily able to show/hide these lineralayout based on the TextView click.
Or If You are using recyclerView, then it would be more easy. In this case, You have to show the 2 edittexts for currently clicked item only and will need to hide for all others

How to make layout like google play home?

How to make layout like this? Its looks like listview with many gridviews or listview of many different layouts. I have no idea how should i make this. On scrolling its get totally changed and also it have different more button colors. Please help me if anyone have solution.
This question is so straight forward! Don't post such kind of questions before you dig and analyze.
If I'm designing this then this how I do. (This is just a sample of static design). But Google did lot's of work here and its a dynamic content.
First the parent layout will be android.support.design.widget.CoordinateLayout and there is ScrollView or NestedScrollView as child.
Then comes SearchBar. There is a separate documentation for that. Kindly go through.
Third TableLayout with 2 columns and 3 rows which holds Buttons
Fourth is custom ViewHolder with title, subtitle and button and custom CardView at bottom of the title contains ImageView and ToolBar below with Menu.
And all these cards will have its own components etc.,

gridview cells in android?

While back I asked a question on adding clients to a listview, but I am wanting to transition it to gridview similar to this picture. They use textview and tablelayout, but it doesn't have to be that whatever is easier. http://sdroid.blogspot.com/2011/01/fixed-header-in-tablelayout.html would using textview/tablelayout, or is there better way of doing that?
I attempted to do it but it overlapped my header.. I forgot to save the code to show to see what I did wrong.
If I understand your question, you would like a fixed header displayed at the top of your screen. Below that, you would like a (scrollable?) gridview. Is this correct?
If so, than this is easy to accomplish. Use the FragmentActivity class (instead of the Activity class). Implement two fragments on your main page. An upper fragment will contain the header. The lower fragment will contain your gridview. They can both be displayed at the same time.

Which layout and control is suitable for sliding window where icons will be appearing in Android

I am developing an application where i need icons to be floating on my panel. I am not sure which control and layout will be suitable for this. I am attaching an image to make you understand what i mean. I want the same two column icon based layout. And if i will scroll down it should be in a sliding way and scroll down. Please let me know which layout and control is suitable for sliding window where icons will be appearing in Android. I am new bie so i am sorry if its not a good question.
If you have a fixed number of items, you could simply use LinearLayouts (with a ScrollView as the root view of the layout). If you have a large number of items or you don't know in advance how many items you will have, use a GridView (and do not place it inside of a ScrollView).

ListView forms part of an activity, rather than the activity?

For my next application, I'd like a ListView to form part of the app. Specifically, I'd like it to be the top half of the screen. Having looked through the documentation, I've only been able to find full screen list views, ie with the list taking up the full screen.
Is there any way of doing ListViews differently? I know there must be, but I'm unsure how to implement them myself. Does anyone have any pointers?
Just put the ListView in a container, like a LinearLayout or RelativeLayout, along with peer widgets. Like you see here.

Categories

Resources