Top "Android-linearlayout" questions

LinearLayout is one of the basic layouts in Android.

How to inflate LinearLayout in a fragment?

I want to inflate a LinearLayout into a fragment in the "onCreateView" method. But I have always the same error: "…

android android-fragments android-linearlayout android-support-library inflate
Scroll RecyclerView Scroll to position always on top

I'm using linear layout manager and RecyclerView with a LinearLayout Manager to populate some list of items. When I'm displaying …

android android-recyclerview android-linearlayout scrolltop
Does making parent clickable make all child element clickable as well?

There is a LinearLayout with a lot of child elements. When a user touches any of those child elements, the …

android onclick clickable android-linearlayout
LinearLayout or its LinearLayout parent is useless , Can i ignore the warning message?

I face the nest layout problems and throws some exceptions. The error is "This LinearLayout layout or its LinearLayout parent …

android android-layout layout android-linearlayout android-lint
Divider for vertical LinearLayout?

So I'm trying to put a divider between views in a LinearLayout using the XML android:divider attribute. When I …

android android-layout android-linearlayout divider
adding touch listener for liner layout filled with buttons

I added a touch event to a linear layout to respond to swipe gestures, and it works well. However, when …

button android-linearlayout touch-event swipe-gesture findviewbyid
How to add a view to the top of a linear layout in code?

I need to add an admob adview to a linear layout in code but I need to insert it at …

java android view admob android-linearlayout
Custom Square LinearLayout. How?

I create my own class for the square layout: public class SquareLayout extends LinearLayout{ public SquareLayout(Context context) { super(context); } …

android xml android-linearlayout
Android ListView Default Divider Styles / Attributes

I have a LinearLayout view that I am trying to add a divider to so that it looks exactly the …

android listview android-linearlayout divider
Programmatically set ImageButton layout_gravity

What I Tried To Do I tried to set my ImageButton's layout_gravity via Java code, the way I want …

android android-layout android-linearlayout layout-gravity