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.

187 questions
2
votes
1 answer

Circular Shape within Rectangle

I have the following drawable being displayed within a rectangular togglebutton:
zorro2b
  • 2,227
  • 4
  • 28
  • 45
2
votes
1 answer

Align TextView widths in different LinearLayouts

I have this interface: Using the below fragment XML. Is it possible to align the widths of the TextViews so they are all the same width? For example, ODOMETER appears to be the longest word in a textview. How can I adjust all the other TextView's…
user-44651
  • 3,924
  • 6
  • 41
  • 87
2
votes
1 answer

The following classes could not be found -android.support.v7

I have just installed android studio and the following errors have just emerged on my xml layout file The following classes could not be…
lorrainemutheu
  • 115
  • 1
  • 17
2
votes
4 answers

Retrieve RelativeLayout inside included layout get null

i get null pointer error in line : rl.setBackgroundResource(R.drawable.headerbackground); MainActivity code: LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); View mainLayout =…
mk72
  • 1,307
  • 2
  • 8
  • 15
2
votes
6 answers

Scroll view with two buttons at the bottom of the layout

I want to create a layout which will have a scrollview, inside the srollview at the top of the layout there will be two Textviews. In the center there will be two Edittexts and at the bottom of the layout, there will be two buttons. But everything…
kittu88
  • 2,451
  • 5
  • 40
  • 80
2
votes
2 answers
2
votes
1 answer

Magento - unexpected template being used

To cater for Magento's (1.7.0.2) omission of discount code in the checkout process (madness!), I installed a small extension to add the same. That works fine, but owing to Magento's limited support for enhancing individual blocks, the extension has…
Adam Lavery
  • 210
  • 3
  • 11
2
votes
1 answer

Android, horizontal scroller in a textView

I want the text in a button to scroll...so for this i am using Text View on the button. I have set following attributes in the layout. but it's not working. I am using this in a RelativeLayout...can anyone tell me whats wrong with my…
Nipun David
  • 29
  • 1
  • 3
2
votes
1 answer

Android: set xml layout to table row?

I have table, which is described in main xml layout. I need to know, if there is any chance to set layout to each table row, so I don't need to recreate each time? Where layout is simple, I can do that by code, but at this time layout is pretty…
Paulius Vindzigelskis
  • 2,121
  • 6
  • 29
  • 41
1
vote
1 answer

How do you refer to a custom XML layout from another custom XML layout?

Given an XML layout (call it the "inner" layout), how do you refer to that inner layout from another custom XML layout (call it the "outer" layout)? Is this possible using XML alone, or are the only solutions programmatic? Inner layout:
Jacob Marble
  • 28,555
  • 22
  • 67
  • 78
1
vote
3 answers

Android LinearLayout Line Breaks in XML

I have an activity designed to get customer information. First line gets name, 2nd line street address, third line is city, state and zip. I can achieve what I want using a RelativeLayout and by using android:layout_below and…
jmease
  • 2,507
  • 5
  • 49
  • 89
1
vote
3 answers

How to add chip to edit text in Android Studio

I found a dependency that I thought might help me, and it looked promising. But when I try to implement it I get a "Failed to resolve: com.hootsuite.android:nachos:1.1.1" : https://i.stack.imgur.com/qgbEx.png And the thing I'm trying to accomplish…
1
vote
1 answer

Block layout is different when called outside Magento

I used snippet suggested here Load block outside Magento, and apply current template to display a block outside Magento. Here is my code: Mage::getSingleton('core/session', array('name'=>'frontend')); $layout =…
pasine
  • 11,311
  • 10
  • 49
  • 81
1
vote
1 answer

Android Studio 3.6 Canary 12 XML layout doesn't resolve

I have updated my Android studio to latest version and I am facing some issues. When I create a package and inside the package I create an empty activity, for some reason it doesn't recognise the R.layout.Name of XML layout. I am not sure what is…
Behzad.P
  • 61
  • 3
1
vote
1 answer

How to show admob ads vertical in landscape mode? (Android)

I want to show the admob ads like the following. My game is locked in landscape mode, and I want to show the ads vertically. I used the XML layout to placed my ads.
pixeloverflow
  • 579
  • 1
  • 5
  • 23