How does reply layout appears in android chat app? - android

I'm creating an android chat. In Telegram Android app, when I touch on reply, a layout appears and I want to how to do the same thing. I tried to the same with an extra constraint layout and make it visible or invisible when necessary.
What is the best way to do this?

Please view types in your adapter. Please see the example https://medium.com/#droidbyme/android-recyclerview-with-multiple-view-type-multiple-view-holder-af798458763b

I achived this with add view. By adding constraint layout into Linearlayout. Anyone with better and best practice, please share your answer.
LinearLayout item = findViewById(R.id.reply_layout);
View child = getLayoutInflater().inflate(R.layout.reply_layout, null);
item.addView(child);

Related

Android Details Layout Issue

I'm trying to achieve the following layout design:
I tried a few times, but I couldn't achieve it. I almost got it by using the following code.
However, I'm not good on working with layouts on Android. I only know a few about the topic.
For more information about what I got, look at: http://pasted.co/4afcaa94
Any help will be appreciated!
Thank you
Try creating your layout using Frame Layout. Study about it how frame layout works and then try creating your layout accordingly.
Make frame layout as your parent layout
RelativeLayout As parentView, circileView and confirmar button upon a linear layout . Use minus margin to set them on the linearlayout.

What's the best combination of layouts to use to create this effect?

I am trying to create a program with some kind of list which is dropped down when you are clicking in the desired category and reveal some items in there.
I am new to layouts and XML editing, so I would love to have a tip where to start with.
I tried RelativeLayout but then I am stacked.
I don't want you to write the code for me, just some suggestions for what Layout is better to use and I will do my research for that. Thanks.
Use ExpandableListView class, with a custom view for the children :-)

Which layout should I use so my app looks like Google Plus?

I'd like to make a layout similar to the one used in the current version of Google Plus:
I don't know which layout I must use because :
- I can't use a GridView because it doesn't support spanning row.
- I can't use a GridLayout nor LinearLayout because the number of elements to show is dynamic
- I can't use a ScrollView because I want an AdapterView to re-use child elements
- I can use a ListView with two differents cells types but I can't use the built-in OnItemClickListener.
Do you have better ideas than me?
Thank you very much :)
this post suggested that it uses StaggeredGridView . I personally haven't tried it.
You can very well use RelativeLayout for this.
With a single Relative Layout you should be able to create exactly same layout.
Additionally, your content can be dynamically added to Relative Layout pretty easily (by setting proper LayoutParams to the content to be added).

How to implement scrolling in TableLayout?

I have implemented simple database android application.In which I have displayed list of name and images.But if data is more then ten then table layout is not scrolling vertically.
Is it possible to implement vertical scrolling without using scrollview?
If possible then please provide me some reference.
Thanks in advance.
Why do you want to do it without using ScrollView? You can simply wrap your TableLayout inside a ScrollView to add the functionality.
I've always used ScrollView so I can't really give you a way to do this without using it.
Random link off Google that explains it pretty well: http://huuah.com/using-tablelayout-on-android/
As #Klaus said, you have to implement a ScrollView. Nonetheless, you can set
android:scrollbars="#null"
in the XML resource and in that way the scrollbar will be "invisible"
Hi
Here is a good article http://blog.sptechnolab.com/2011/02/01/android/android-custom-listview-items-and-adapters/. It is in LinearLayout but is someone write comment over there then i can convert the layout file into TableLayout.

How can I make a listview with more than a title?

I would like to have a special listview with a title, couple of sub-categories, and a picture. The picture below is a rough idea of how I would like to lay it out. I am very new to android so keep in mind that details really helps me. Thank you in advance.
You can create an xml layout that is used for each ListView item. If you haven't yet, read through Common Layout Objects for an introduction to the different layout types. There are also a "Hello layout" tutorial for each layout type, linked from that page.
In this case, you could use a horizontal LinearLayout with a vertical LinearLayout and an ImageView inside of it.
To bind your objects to the views within your ListView item, use a SimpleAdapter. You can find a number of tutorials on SimpleAdapters if you search around, for example.

Categories

Resources