Most voted "android-layout" questions
A layout defines the visual structure of the user interface. Normally declared in XML files, they are used by Activities and Fragments to interact with the user.
Learn more…699 questions
Sort by count of
-
4
votes1
answer1023
viewsLayout Rendering Error
I used the Android layout support, specifically the Login Layout. When was render appeared this error: Exception Raised During Rendering: String index out of range: 0 In details appeared:…
-
4
votes5
answers12363
viewsOne component on top of the other
I’m in trouble that I do not think how to solve, I have an Activity as in the photo below, the problem is, that when I emulate the application, the Button and the textView go down the two colored…
-
4
votes1
answer1039
viewsHow to change the color of the line below Edittext via xml
How to change the color of this line below Edittext via xml?…
-
4
votes1
answer306
viewsAdjust Alertdialog with Open Keyboard
I have the following problem I have a Alertdialog When the keyboard is opened, the dialog goes up, but part of the dialog is hidden.. it does not adjust the height as per keyboard XML dialog:…
-
4
votes1
answer2307
viewsHow to format text in a Textview?
I want to add a formatted text (can be in html) on my Textview screen but I’m not getting it. I have string in values: <string name="lbl_explicacao"> <![CDATA[ <b> TESTE </b>…
-
4
votes2
answers829
viewsHow to support various types of screens/screens
I started on Android recently (self-taught) and came across the following situation: support for several screens. I saw some tutorials and doubts of other people but found nothing to help me with…
-
4
votes2
answers123
viewsHow to apply attributes of a parent Viewgroup to child in android studio?
How to make children of a Viewgroup inherit a parent attribute? For example, I would like to set up layout_marginTop="16dp" for all Textview daughters <LinearLayout…
-
3
votes3
answers6724
viewsHow to set the size of layout buttons in version 2.2
For example if I have a Linearlayout that occupies all the space horizontally, if I have two buttons, for each occupy half of the screen, how do I do? Gridlayout doesn’t work in 2.2 right?
-
3
votes1
answer1494
viewsHow to run javascript in Android webview
I have a Activity with the following layout: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"…
-
3
votes1
answer672
viewsWhat better way to make animations for android?
I’m about to start an android system that has several animations that interact according to what the user does, I would like to know what is the best tool or framework to be able to develop these…
-
3
votes1
answer1426
viewsIs it possible to create a Listview Android Horizontal?
Problem I need to implement a ListView horizontal, to create a horizontal navigation bar over my Product Gallery in my Sales Catalog. With the intention of making navigation but intuitive and easy…
-
3
votes1
answer4720
viewsHow do I put a CSS box-shadow-like effect on an Android layout?
Ex.: <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:layout_marginTop="10dp" android:background="@drawable/bg_white"…
-
3
votes3
answers2263
viewsHow do I show icon in the Bar action when item is in overflow?
I wanted the item called also to appear on your side your image: The result I would expect would be this: Activity code with help from @Alexandre Strevenski: import android.app.Activity; import…
-
3
votes1
answer3160
viewsDrawable folders for different dpi do not appear in Android Studio
I can’t find the drawable folders with the proper resolutions in Android Studio. It only has a drawable call, where I should place the images with different resolutions?…
-
3
votes1
answer256
viewsToolbar with separator at the bottom
I’m using the Toolbar, but wanted the bottom of it to have a line of another color that delimited it, as shown in the image, To achieve this effect the only thing I remember is using a ImageView. Is…
-
3
votes1
answer690
viewsHow to add reticence if content leaks from Android layout?
How to add ellipsis if content leaks from Android layout? For example: I have a very large text in my Actionbar, and instead of having to decrease it in size, I want it to add reticence in case…
-
3
votes1
answer753
viewsSpinner to select Color
Good night, I am developing a Personal Finance APP and in my Category registration it will need to select a color, and I would like to do the same as the image. Someone knows how I can do or how to…
-
3
votes3
answers1571
viewsTextview is getting behind other objects
In my application, I have a textview that is getting behind the other objects on the screen, I wanted it to end where Imageview starts on the screen. This layout is used and filled in an Adapter for…
-
3
votes1
answer54
viewsHow to implement UI like the recent Lolipop
I am trying to implement UI like the recent Lolipop need to know if it is possible and if I can do it with Recyclerview and Cardview?…
-
3
votes2
answers376
viewsPinch android zoom
Personal my problem is the second. I need to enlarge a ImageView with that movement of forceps well known, but I’m already in the third day researching on the internet how to do and banging the…
-
3
votes2
answers3886
viewsHow to change edittext line color programmatically
I need to change the line color of Edittext programmatically, as I do? I tried to set an xml in the drawable folder, but it does not change the line color anyway...
-
3
votes1
answer1618
viewsSplit layout in 2 columns
I have my home screen code that needs to be divided into two equal parts. How I share a linear layout in two columns of equal size?
-
3
votes2
answers382
viewslayout problems in Android Studio
I’m having a little problem with my layout looks like this in Android Studio and how it looks on Avd: xml code: <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"…
-
3
votes1
answer484
viewsChanging the text of a Textview that is inside an Arrayadapter entry
I made a Adapter that extends of ArrayAdapter. My layout contains only a series of TextViews, one below the other, very simple. I want some event in the system to be watched by my Adapter and that a…
-
3
votes2
answers787
viewsHow to view pager images as free market app and others
I’d like to ask you for help on how to make this layout like the Free Market app and so on, like Live Real Estate. The layout I need is equal to this image I’m putting below, It would be a Toolbar…
-
3
votes1
answer126
viewsDesign material properties do not appear in API 19 appliance
I added the support library for Apis below 21 and am testing the property elevation in my components. In the layout view, when I click on the design tab, I can see the elevation but when I run to my…
-
3
votes2
answers81
viewsToolbar is behind the Layouts
Hello, I am developing a home screen, and has 1 Toolbar and 2 linearLayouts dividing the screen into 2. The problem is that Toolbar is "behind" the layouts and does not appear when it runs. how I…
-
3
votes1
answer963
viewsHow to change the color of the bottom bar, where the buttons "Back", "Home" and "Active App" are located?
I would like to know first what the name of the component (bar) where are located the buttons "Back", "Home" and "App active" on android. In devices that do not have physical buttons for this…
-
3
votes1
answer1470
viewsHow to customize a Toolbar on android?
How do I add more buttons to my Toolbar?…
-
3
votes2
answers483
viewsDynamically change the layout of Buttons
I have two Buttons on the screen, these are visible or not visible depending on the situation. There is a third situation, which should leave both visible, but does not fit on the screen. So I’d…
-
3
votes2
answers4807
viewsHow to use gradient in any component of Android?
How to use the degrade effect on any component of Android? As for example the navigation bar , or a simple TextView?
-
3
votes2
answers4919
viewsHow to change the color of the Statusbar?
How do I change the color of this part of the app? I wanted to put everything in the same green color as this one below.…
-
3
votes3
answers3871
viewsHow to put hint on a spinner?
I have a Spinner, where the user should select his gender: So far everything works well, but I need to leave a hint written the word sex in the spinner component, as well as in the image below: Code…
-
3
votes2
answers4139
viewsHow to set placeholder in Edittext?
I created a small app for Android containing only one Activity. In it I put two components Edittext. I wish to define placeholders in them, as in HTML5 inputs, but find no solution.…
-
3
votes1
answer5357
viewsHow to center the entire layout
I have the following layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"…
-
3
votes1
answer68
viewsWhat is the difference between a Toolbar and another view?
I’m learning to use the toolbar on Android development and saw that the use of it is very similar to other views, I saw that you can put it without being at the top, that you can put items inside it…
-
3
votes1
answer1380
viewsProblems with the layout of the application in several cell phones
I have an app that I made and emuiled using my cell phone lg G2 mini, when emulo it gets all straight, the form the way I designed in its proper corner. When I install the same apk on other phones,…
-
3
votes2
answers219
viewsHow to create custom Toolbar like Acmarket
I want to create a Toolbar same as Acmarket, but I don’t intend to use CollapsingToolbar, I just want to create a similar Toolbar, someone help? <android.support.v7.widget.Toolbar…
-
3
votes2
answers154
viewsToolbar stands in front
I have a problem where my Toolbar is in front of my view. I have a scroll view and when I slide it up it looks like this. Follows the xml: <LinearLayout…
-
3
votes1
answer979
viewsHow to change the color of the icon in drawable layout on android
Hello, I need to change the color of the icon q triggers the Drawablelayout menu, but I can’t find the property or where I can customize this icon. How do I change the color of that icon? Where do I…
-
3
votes1
answer98
viewsHow to remove this shadow that appears when it reaches the "end" of the screen?
How do you remove this shadow using Android Studio? It appears when you finish scrolling the page.…
-
3
votes1
answer1726
viewsChange color of radio button
I have an application that has black background. In one of the screens of the application I have a RadioButton. I need to change the color of this Radiobuttom so that it appears on the screen.…
-
3
votes1
answer177
viewsHow to remove a Custom Dialog title?
I have this Custom Dialog And I’d like to know how to take that part of the title because in this case, it’s unnecessary. Code private void acertou() { final Dialog certo = new Dialog(this);…
-
3
votes1
answer1313
viewsCreating custom Toolbar, action bar
Guys I’m creating a separate Toolbar to facilitate the development I’m looking to make a very simple Toolbar but I can’t how I want to do: http://prntscr.com/cuipex my code: <?xml version="1.0"…
-
3
votes1
answer116
viewsHow to change the background color of Popupmenu?
To change the background color of the Popupmenu and set the height of the shadow. The only result I had was setting the popupBackgound in Styles.xml the problem is that it loses the shadow.…
-
3
votes3
answers1120
viewsAlign visual components
I’m having trouble aligning the buttons/icons on my Active. I’m using relative layout to position the buttons, but when compiling it gets out of order. Follows the code: <?xml version="1.0"…
-
3
votes2
answers62
viewsMisaligned images
I’m using the following .xml as a main screen: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent"…
-
3
votes1
answer328
viewsHow do Admob banner fill full width?
Hello zeroes padding of XML and put wrap_content, but the banner of AdMob does not fill all width is spaces as solve? Code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout…
-
3
votes3
answers2785
viewsHow to have a full-screen Webview?
My specific question: How to open a WebView in full screen at Android Studio? Change Theme in Manifest? Change Theme in XML? Force a JAVA script? Change view margins? Change code in Style? All these…
-
3
votes1
answer175
viewsAlertdialog Android "comment" Popupmenu
How do I get this result the 3 dots on this image have already been pressed. My layout <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"…