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

How to build parameterized custom layout?

My app is all about manipulating and showing different views of a particular entity. I have a class called Item that defines an entity in my app. I have created a custom layout that knows how to render a particular version of Items: public class…
i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
1
vote
1 answer

Android keyboard push up all the content

I have a layout that looks like this . When i click on the editText the screen keyboard push up all the content. I want the header (orange area) to stay fixed and shown in the top of the screen. The layout Code XML Code
Zak-Dev
  • 85
  • 13
1
vote
2 answers

Layout stays blank

I have added an ImageView and two TextFields to my Layout but when I look in the preview it just stays blank. It gives me the error "Rendering error". What can I do? I will add my Layout file in the following:
MIsterX
  • 31
  • 6
1
vote
4 answers

Android Toolbar moves up when keyboad show

I have an issue with soft keyboard on my project. I have a chat screen with one EditText ,listview and a send button in my Activity.Whenever Edittext get focus It moves up the toolbar and layout. i need to fix the toolbar and layout while showing…
1
vote
3 answers

Baseline Constraint in Linear, scrollable layouts

I need to make sure that two view elements are right next to each other and vertically at the same height. I'd do it using Baseline Constraint but currently I'm working with a linear, scrollable layout (a linear layout in a scrollview) and when I…
1
vote
1 answer

RecyclerView's height not adjusted when the AppBarLayout is expanded

The code for initializing the RecyclerView private void initRecyclerView() { layoutManager = new GridLayoutManager(this, spanCount); mRecyclerRV.setLayoutManager(layoutManager); mRecyclerRV.addItemDecoration(new…
1
vote
2 answers

My Button is not responding in android studio

When i run the app. The buttons refuse to respond. I set a Toast and a logcat to check for response. but non. please help resolve this is my source code
mitch
  • 67
  • 2
  • 11
1
vote
0 answers

Disable XML layout changes on preview touch (Android Studio 2.2.2)

On the Android Studio 2.2.2, every time I barely touch or click the preview layout of an XML layout file, it does change and I will have to revert those changes. Is there a way to disable that?
Red M
  • 2,609
  • 3
  • 30
  • 50
1
vote
1 answer

android.support.design.widget.FloatingActionButton stop working when add Facebook lib in project

I am developing one app.My android studio version is 1.4. In my app I added android.support.design.widget.FloatingActionButton button when I am design. Its work fine before I add facebook lib. When I add facebook lib then float button stop working…
Farmer
  • 4,093
  • 3
  • 23
  • 47
1
vote
1 answer

which is the best way to create circular image view with border and shadow in android? (through xml or java code)?

I'm new in android and I want to create a circular image view with border and shadow. I searched on internet and I got couple of codes, but some of them are xml layout code and others in java. So can you please tell me which one is better to…
1
vote
4 answers

Incorrect FrameLayout's childs order on android 5.0 and above

Here is my XML layout code:
1
vote
3 answers

Android custom gridview having (imagebutton + imageview) on every grid items

I'm trying to put an imageButton and ImageView on the grid view items, so here is my code shown below, what am trying to do is create an Adapter extending BaseAdapter and then creating a Viewholder and putting both the ImageView and Imagebutton in…
1
vote
2 answers

Runtime navigation drawer items

In my app I'm loading the navigation drawer with the following .xml. In the first group I have an item for current_device and other_device. There is potential to have several other devices listed here, but this is determined at runtime with an api…
ENG618
  • 1,012
  • 1
  • 13
  • 31
1
vote
3 answers

Why does my ViewPager shows contents only when I set a fixed height?

I am putting a ViewPager inside a Fragment. When I set a fixed height to the ViewPager like layout_height=300dp , the ViewPager with its contents are visible. But when I change the height of the Viewpager to either fill_parent,match_parent or…
Tiny
  • 109
  • 12
1
vote
2 answers

How to use listview from different xml layout file

I am working on android ListView and i am getting one issue.I created one list view into the XML file installation.xml and i want to use that list view into my Searchdata.java. so basically what i want that when i click on searchdata button than…
user4549680