android-linearlayout Questions

5

Solved

I've always been using RelativeLayout everytime I needed a View container, because of it's flexibility, even if I just wanted to display something really simple. Is it ok to do so, or should I try...

3

Solved

To give the user of my app an indication which field currently has the focus I am trying to change the background color of some of my fields depending on the current state, however, I am having tro...
Honan asked 17/10, 2010 at 14:25

3

Solved

I have a horizontal linear layout that contains textviews generated dynamically, the problem I'm experiencing is that the textviews are squeezed (see image below) if too many of them are adde...
Pryce asked 25/1, 2013 at 18:46

0

So I have this LinearLayout where I use dividers to add some spacing between the items: <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orienta...
Manometer asked 20/3, 2018 at 15:12

2

In my android application I need to create activities zoom able. I found useful code for zooming linear layout here . But in my application couple of activities start with scrollview and this code ...

4

Some commonly used android layouts such as RelativeLayout and LinearLayout (when weights are nonzero) have onMeasure() implementations that measure their children twice, resulting in exponential ru...
Judi asked 5/7, 2013 at 17:7

1

My child is a LinearLayout having a dynamic height, it can change during runtime, could includes images and consists of varying number of child views(which too might have children). This child Lin...
Shinn asked 30/1, 2018 at 6:27

4

Solved

I have 4 buttons in my linear layout and i need to bring to front first button. Normal order is Button 1 | Button 2 | Button 3 | Button 4 But when I call button1.bringToFront() function , but...
Pickmeup asked 23/5, 2013 at 16:28

4

Solved

As part of an Android App I am building a button set. The buttons are part of a nested set of LinearLayouts. Using weight I have the set resizing itself automatically based on the size of the conta...
Handbarrow asked 23/7, 2011 at 7:2

3

Solved

pI am working with a linear layout and want to set the maximum height of the view. Under "normal" circumstances, I want the view to use "wrap_content." However, occasionally the circumstances may p...
Kootenay asked 29/6, 2013 at 18:13

3

Solved

I am trying to get some text vertically aligned within a TextView, but for some reason it just sticks to the top edge of such TextView. Trust me, I've read several questions here on Stack Overflow...

4

I have a top level ViewGroup, which I call SliderView, in which I want to detect swiping. This is mostly working, but one weird failure persists. The essence of SliderView is to override onInterce...

9

Solved

This is what I have: <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xml...
Agora asked 6/10, 2011 at 7:22

4

Solved

I'm trying to center an edittext vertically and horizontally in a linear layout, but it is not working. Very simple problem really. <?xml version="1.0" encoding="utf-8"?> <LinearLayout ...
Slipknot asked 24/1, 2012 at 15:37

8

Solved

I would like to add only a bottom and a top border on my Linearlayout. I have tried to do this : <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.an...
Prague asked 22/4, 2014 at 10:0

1

Solved

I have tried multiple solutions to this but none seem to work! I am currently using the following Drawable as a divider (this is the horizontal example but the same approach works for vertical too,...
Midvictorian asked 6/12, 2017 at 18:9

1

Solved

I have to programmatically add a view (whose root view can be anything) into LinearLayout but if that view is a ConstraintLayout, it won't work as expected. Why is this happening, because according...

2

Solved

I've created an EditText, a Button and a RecyclerView (composed of 1 TextView and 1 ImageView children) to add TextViews that looks like this . In the EditText at the top, users may enter text and ...

4

Solved

I want to set margins by percentage.. I have 4 imageviews in a linearlayout and want to set default left,right,top,bottom margins that keep same percentage for each screen size. is it possible ? ...
Convenience asked 24/4, 2013 at 19:37

3

I have the following for 3 Imagebuttons. The way the code stands below, the three buttons look the same. Problems: The image doesn't fill the size of the button completely The resolution of the ...
Communize asked 18/1, 2014 at 1:17

3

Solved

Say I have a TextView with some dynamic text. This TextView is being placed inside a LinearLayout with WRAP_CONTENT LayoutParams for both width & height. Problem is that some of the text is -...
Penhall asked 6/2, 2015 at 1:41

3

Solved

I've created a simple LinearLayout with three identical elements: <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> ...
Overpraise asked 10/10, 2017 at 15:24

3

Solved

is it possible to have a LinearLayout inside a LinearLayout with equal height and width dynamically? i don't want to specify the values, just that the height is the same size of the possible width....
Amosamount asked 27/4, 2011 at 11:3

4

My application has one LinearLayout that LinearLayout consists of the 3 Linearlayouts and that each linear layout has one Relativelayout and one linear layout(initially the visibility of these line...
Stative asked 6/7, 2011 at 12:39

2

Solved

I need to add the views in dynamically into my LinearLayout which I already have in my xml file. I tried to add the layouts and able to add it, but the problem is I could not able to set the layout...

© 2022 - 2024 — McMap. All rights reserved.