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
1
vote
1 answer

Sudden appearance of action bar in android studio 1.1.0

Anyone who have experience this? My Android studio updated from 1.0.1 to 1.1.0. When i open my existing application , it was corrupted ( URI are not register error appears, java sources cannot be found, a lot of error) . So i close it and re-import…
jhaypee
  • 71
  • 1
  • 9
1
vote
1 answer

Shape as background, border so small

I tried to add a thin border around my rounded imageView. To do this, i decided to add a shape as background with a padding. The result is good, there is a thin border around my imageview but this border is so small. I would like to have a border…
wawanopoulos
  • 9,614
  • 31
  • 111
  • 166
1
vote
1 answer

Android: Making elements randomly move around screen?

I currently have a very simple Android Activity and corresponding XML. (shown below) I would like to add the ability that each TextView moves randomly around the screen slowly, so that it is more fun for the user to look at. How can I do so?…
codeme2020
  • 853
  • 2
  • 13
  • 20
1
vote
0 answers

Android progress bar with circular drawable and filling from bottom to top

I am currently working on creating a custom progress bar and have so far managed to get the correct image I want to display, however I am trying to customise it so that it fill the white space within my drawable from bottom to top (bottom being 0…
SingleWave Games
  • 2,618
  • 9
  • 36
  • 52
1
vote
0 answers

Approaching to this layout, no way to recreate it from the design:

thank you in advance for your time: I'm trying to recreate the design you can see below into an Android Project. Desired design: I tried the next XML code but when I change the screen resolution (Nexus 5 to other) the all thing blows…
Nikos4Life
  • 101
  • 1
  • 9
1
vote
3 answers

ImageView does not fill parent as expected

I have an imageview which I have set to fill_parent and I have set the scaleType to fitCenter - however it does not seem to fill to the edge of the screen as expected. I'm not sure why this is occuring - but it looks very strange. Any input is…
user3063132
  • 133
  • 2
  • 14
1
vote
2 answers

Linear Layout background not shown on Galaxy Nexus

I have an app which uses list view to show information and I have put sections to divide different types of data. Here is a screenshot how it looks on Android 4.1.2 http://postimg.org/image/ujv765wf1/ It looks the same way on Android 4.0.3 which is…
Georgi
  • 674
  • 7
  • 21
1
vote
1 answer

Get LayoutParams of the root xml layout that is used as a customised row of a list view

To set the layout params (width, height and margins) or to set the LayoutParams it self to a specific Layout programatically, the layout type of the parent must be known. Example 1 LinearLayout.LayoutParams lp = new…
hasan
  • 23,815
  • 10
  • 63
  • 101
1
vote
2 answers

Xml layout to Java code generator

Does anybody know a tool to create java code from a xml layout file. It would be useful, to create quickly a custom view (I do not want to create a separate library project) that I would like to include in an activities layout. So lets say my custom…
sockeqwe
  • 15,574
  • 24
  • 88
  • 144
1
vote
1 answer

How to inflate Quick contact badge in android using Layout inflater?

I am unable to inflate a xml(layout containing QuickContactBadge) file using LayoutInflater, to use it inside ListView. It is not producing either compile/run time error or proper expected output. After I removed QuickContactBadge from XML Layout…
1
vote
2 answers

Edit Text and Text View not visible when ListView is set in Android

here my xml layout of my Android app (where I show all of my contacts)
FrankBr
  • 886
  • 2
  • 16
  • 37
1
vote
1 answer

Set button flashing in XML?

Hey guys i have a problem. I made a button flashing animation by coding button7.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent me) { try{…
user2161301
  • 674
  • 9
  • 22
1
vote
2 answers

Defining a specific xml layout with a nested layout

I am in the process of designing my first Android application and I am trying to get the hang of creating an XML layout. (I have a great deal of experience with Java) Essentially what I wanna do: Where the outlines describes: Blue: A basic View…
1
vote
4 answers

Layout change drastically on orientation change

I have created a layout for an activity. The layout contains some image buttons and text views. The problem is that when I am setting the orientation of my device to portrait, its working fine, but when I am changing the orientation to landscape,…
kittu88
  • 2,451
  • 5
  • 40
  • 80
1
vote
1 answer

Adding elements to a ListView expands it below other elements using RelativeLayout

In my activity i hava a ListView which has an ArrayAdapter as its adapter, and is updated dynamically. I am using RelativeLayout. At first, the ListView is empty, but I can see that it takes up space on the screen compared to before i added it. As…