android-linearlayout Questions

6

Solved

I am developing small android application in which I set drawable resource as background for linear layout. Now what I want to do change background color of linear layout dynamically, but within dr...
Factor asked 28/2, 2013 at 4:11

7

Solved

Is there a way to obtain a child element of a LinearLayout? My code returns a view (linearlayout), but I need to get access to specific elements inside of the layout. Any suggestions? (Yes, I kno...
Pescara asked 7/7, 2011 at 19:3

4

Solved

Please have a look at the following code <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_pare...
Osher asked 27/12, 2012 at 19:41

2

Solved

I'm playing with the option measureWithLargestChild="true". I don't understand why my layout breaks total, if one of my buttons has a too big text onto it. I think it should keep the basic size of ...
Curtin asked 3/5, 2013 at 10:3

4

I am trying to set the width and height of 2 frame layouts which are the containers for 2 fragments, both being children of a Linear Layout. However whenever I set width and height of the layout w...

3

Solved

Wonder how to resize an image inside a TextView xml in a LinearLayout. I read some solution using setCompoundDrawablesWithIntrinsicBounds method, but cannot get it right. Here is the image: I w...

5

I am trying to programmatically add form fields picked from an HTML file to a LinearLayout. I have a next button at the bottom but it keeps getting cut off in the display. I tried it on a tablet an...

6

Solved

Wanna to split a screen for my app with two LinearLayouts. What parameters should I use to make exact splitting in two equal parts - first LinearLayout on the top and the second one is just under i...
Echikson asked 6/8, 2010 at 14:50

16

Solved

Whenever the software keyboard appears, it resizes the background image. Refer to the screenshot below: As you can see, the background is sort of squeezed. Anyone can shed a light on why the bac...
Expunge asked 26/11, 2010 at 17:38

16

Solved

I have frequent problem in android view, Error parsing XML: unbound prefix on Line 2. <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:orientation="vertical" android:id="@+id/...
Trestlework asked 8/2, 2010 at 11:29

7

Solved

I have the following Layout which does not work: <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:id="@+id/experienceLayout" android:background...
Electrify asked 18/6, 2011 at 2:37

4

Solved

I have a simple layout with a name on the top, and a button which I want to be at the bottom of the screen, or beyond that in case I add more items. So I am using a ScrollView with a LinearLayout ...

4

I have an activity that has a ScrollView with a vertical LinearLayout that has two fragments that are PreferenceFragment instances as shown in the following layout file: <ScrollView xmlns:andro...
Consistent asked 9/4, 2014 at 20:16

8

I have many components in my view controller, and I want to combine them in a single object to scroll them together, what is the procedure to do it (like linearlayout in android) but I need it in I...
Ontogeny asked 13/5, 2013 at 12:40

9

I have a layout that contains some text fields and has a background image that's displayed at the top of my activity. I'd like the background image to scale to wrap the content (don't care about as...

6

Solved

I have a LinearLayout, which contains several child TextViews. How can I get child views of that LinerLayout using a loop?
Packet asked 16/10, 2011 at 12:59

0

I have three views lined up horizontally in a ConstraintLayout. I need the center view to be anchored to the center of the parent. The tricky part is that all three views have dynamic widths. If ...

6

Solved

I required runtime dimensions of Relative/Linear Layout. activity_home.xml: <RelativeLayout android:id="@+id/rlParent" android:layout_width="match_parent" android:layout_height="match_pare...
Querist asked 12/12, 2013 at 15:50

0

I want to know why android developer documentation is recommending to use view groups such as Relative Layout or Linear Layout to arrange views for developing TV Android Apps and not the current st...

3

This is my xml code: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="ve...
Blockhouse asked 25/5, 2015 at 22:3

6

Solved

After a lot of googling I'm unable to find a solution to this problem. I have this layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/adlayout" ...
Stopcock asked 15/1, 2012 at 20:21

6

Solved

i have hard-coded the layout_weight on layout xml.but now i want to give the layout_weight and weightSum from java code. How we do that from our class? <LinearLayout android:layout_width="m...
Pya asked 23/7, 2012 at 11:22

2

Solved

I have used a LinearLayout in a CardView to get a kind of social media login button look and it all runs fine, but Android Studio flags Element LinearLayout is not allowed here. I was wondering why...

9

<Button android:id="@+id/o_pharmacy" android:layout_width="fill_parent" android:layout_height="wrap_content" android:drawableLeft="@drawable/p2" android:text="@string/o_pharmacy" android:t...
Nebraska asked 3/8, 2013 at 4:51

3

Solved

UIStackView is similar to Android LinearLayout but I could not figure out how to set weight for the subviews. Suppose I have a vertical UIStackView and 3 UIImageViews in it. I want to set weights ...
Kazimir asked 8/12, 2015 at 16:15

© 2022 - 2024 — McMap. All rights reserved.