Questions tagged [xml-layout]

Android uses xml files to layout its components on a window.

Android uses xml files to layout its components on a window.

182 questions
63
votes
11 answers

Android: Creating a Circular TextView?

My current simple XML is below, however i would like the 3 TextViews within it to be circular, rather than rectangular. How can I change my code to do so?
codeme2020
  • 773
  • 2
  • 12
  • 19
48
votes
8 answers

Shape Drawable Size not working

I have a very simple shape that I want to set the width of: However, when I assign this to the background of a EditText it just…
chubbsondubs
  • 34,812
  • 24
  • 97
  • 134
26
votes
3 answers

How can i change included xml layout to another layout on java code?

i have a problem. I develop android application. I included second layout to first layout like this:
UurYsr
  • 263
  • 1
  • 3
  • 6
18
votes
4 answers

Why i am not able to create the round border for specific corner?

In My android xml layout i am applying the border by using the borderframe.xml as a background. borderframe.xml file is looks like below:
Shreyash Mahajan
  • 22,310
  • 34
  • 106
  • 187
18
votes
2 answers

How to fill the empty spaces with content below the Image in android

I have one ImageView and a TextView in my xml layout. I want to show the text below that i got by webservice on the right side of the ImageView. Can i show that text by using that one TextView ? I tried to give android:singleLine="false" in xml…
Victor
  • 883
  • 3
  • 11
  • 21
11
votes
4 answers

Theoretical question: load external XML-Layout file in Android

I thinks it's probably not possible for security reason but just want to be sure: is it possible to create layout in Android from an external XML file? To be exactly: I'm creating XML output with XSL on a remote server. I could create the necessary…
Radek Suski
  • 1,240
  • 1
  • 13
  • 22
9
votes
1 answer

Android Warning : Grows due to localized text expansion

I am getting this type of warning @id/order_row_date can overlap @id/order_row_amout if @id/order_row_date grows due to localized text expansion. If relative layout has text or button items aligned to left and right sides they can overlap each…
Pratik Butani
  • 51,868
  • 51
  • 228
  • 375
9
votes
5 answers

Button under ListView not visible in Android

I am working on some ListView I want to display a Button under it I am using the following code but that is not working.
Muaz Usmani
  • 1,199
  • 5
  • 24
  • 48
8
votes
4 answers

Use special symbol (<, >) in layout design in Android

I need two navigation buttons with their texts are < and >. However, the compiler doesn't allow me use those symbols, even if I use \< and \>. Is there anyway to put these symbol into the XML design file?
Luke Vo
  • 12,823
  • 19
  • 79
  • 132
8
votes
1 answer

How to use viewpager inside nestedScrollView with a view top of viewpager

I am unable to scroll nestedScrollView because of viewpager. So let me explain here is layout design that i want to create: There is FrameLayout inside NestedScrollView and a viewpager with tab layout. Viewpager load three fragments with endless…
8
votes
3 answers

match_parent not performing as expected

I imagine this should be a fairly easy one to answer, if you understand XML Layouts better than I do that is. I don't seem to get what I was thinking I should when using the match_parent layout_height. I have a LinearLayout root element with…
Dewald Swanepoel
  • 1,561
  • 3
  • 12
  • 33
8
votes
2 answers

Android ListView with Button is not selectable(Clickable)

I am facing a strange problem, I have added a Custom row in my ListView when I am removing the Button row is selectable, but as I add Button I am not able to click the row, please see the xml below.
Ali
  • 9,900
  • 10
  • 53
  • 83
7
votes
5 answers

Android - Change background color of margin

I have a fragment named HostFragment which nests one to four other fragments. This is the layout of HostFragment:
pez
  • 2,582
  • 10
  • 35
  • 61
7
votes
1 answer

Horizontally center Views inside Android GridLayout

We are writing an app targeting ICS+ and believe a GridLayout is the best layout paradigm, but it seems very little has been written about it, and we are having some alignment issues.
6
votes
3 answers

android (change string in java code)

In the /res/values folder of my android project i have a string and that is referenced in a text view in my xml file, i want to change the string in my java file. As you can see below in the code i have made a string variable and then below that i…
Jack Trowbridge
  • 2,975
  • 9
  • 28
  • 47
1
2 3
12 13