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
3
votes
3 answers

Android LinearLayout divider, but percentage?

In happy.xml I have a LinearLayout... Here's the file happy_spacer.xml...
Fattie
  • 27,874
  • 70
  • 431
  • 719
3
votes
1 answer

Android :: Layer-List 3 vertical rectangle stack issue

PROBLEM I want to create 3 rectangles in the vertical. Then, I want the first and the last one transparent. but the result look like the second rectangle height is bigger than it should be (its height big equal 2 rectangle) PICTURE Before it…
Jongz Puangput
  • 5,527
  • 10
  • 58
  • 96
3
votes
9 answers

How to set typeface for the text view xml layout

I have created an XML layout with the name def_list. I have assigned an id for it and that is def_list_textview. I have put a font called bn.ttf in the assets folder. The XML layout is as follows:
Ali Allahyar
  • 341
  • 2
  • 11
  • 22
3
votes
1 answer

Vertical Layout, 2 Elements, Make the Top One Fill the Remaining Space (Bottom One Has wrap_content)

I have the following dilemma. Two elements, one on top of each other. The bottom has wrap_content for height. I want the top element to fill the remaining space without the two elements overlapping (which happens if I use FrameLayout for…
Dzhuneyt
  • 8,437
  • 14
  • 64
  • 118
3
votes
1 answer

Android Eclipse xml editor autocomplete on Mac OX not working

I am using Eclipse on Mac OX (I am new to Mac) and the autocomplete is working normally in the .java files, but it's not working in my .xml layout files. I checked my "Advanced" Java Editor settings according to this post autocomplete has stopped…
Nouran H
  • 1,992
  • 5
  • 18
  • 24
3
votes
1 answer

Children of FrameLayout not clickable on some devices

I have designed a menu that consists of a few buttons in several different LinearLayouts all placed over an animated GLSurfaceView within a FrameLayout. When the user clicks a button in the interface, I set the current layout's visibility to GONE…
Jack
  • 2,625
  • 5
  • 33
  • 56
2
votes
2 answers

Missing theme error occurs while loading graphical layout

While i am opening xml file then There is no option of Opening Graphical Layout to check design without running application
AMD
  • 1,662
  • 18
  • 39
2
votes
2 answers

RelativeLayout doesn't draw children if background is set

I have class CalloutView extended from RelativeLayout. Currently has no any methods, it just redefines constructors. I also have an XML layout for it:
2
votes
1 answer

How to import AndroidViewBinding in jetpack compose

I'm trying to use some fragments within jetpack compose but I can not import AndroidViewBinding from (androidx.compose.ui.viewinterop) and it is always appearing as an unresolved name how to import it ??
2
votes
2 answers

Layout in Android Emulator looks different as compared to the layout file

I have recently started learning Android Development. I am using Android Studio and I created the XML layout file with it. But the layout is looking different on the emulator to the one I created on XML and I have no clue why it is happening. This…
Tanya Gupta
  • 67
  • 1
  • 6
2
votes
1 answer

Android | ScrollView | height wrap_content

How does Android think about ScrollViews? I come from webdev background, so that is my paradigm for implementing a scrolling element. Yet on Android, official tutorials and docs say, I should use height="wrap_content" for the ScrollView. But…
2
votes
2 answers

Can't find DatePicker in XML layouts

In previous Android studio version I used DatePicker but now in 3.1 version doesn't exist anything as the same. Is it any replacement for that?
Ali Bavi
  • 78
  • 6
2
votes
2 answers

Nested Recyclerview of Images not clicked

As shown in image it have recyclerview of list and each recyclerviews item has again new recyclerview which contains list of images. the red area is getting captures click event but from same item nested recyclerview area/item not getting clicked. …
Mohsin Patel
  • 226
  • 1
  • 15
2
votes
1 answer

Suspicious size this will make the view invisible (in child layout)

I have a child LinearLayout inside a LinearLayout the inner Layout is showing a message saying Suspicious size this will make the view invisible I have set the orientation of the layouts the parent layout is Vertical and the inner layout is…
2
votes
2 answers

Reusing Fragment or layout files

I am making an English education app that has an activity that uses viewPager to return a number of fragments. The app will have additional units which use additional activities that use viewPager to return the same fragments(minus some word changes…
Ntwofive
  • 37
  • 1
  • 8
1 2
3
12 13