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
-
0
votes1
answer255
viewsPosition Textview Android Studio 2.2.2
I’m hoping that one TextView is positioned on top of a text, but it is on the side <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
-
0
votes1
answer287
viewsAdd content to a listview (Android)
Viva comunidade. I was trying to develop an android application that receives JSON data, and I wanted to re-leverage some of this specific JSON data to add to an Android listview. I started by…
-
0
votes1
answer408
viewsSpace between image and content Android studio
I am developing a mobile application using android studio 2.2.2 and wanted to leave my application with this look. But I’m not getting , by placing the image it gets a space between the image and…
-
0
votes1
answer246
viewsPositioning of Gridlayout Android images
UPDATE I am developing a mobile application, using gridLayout and I would like to leave an image on the side of the other, in case the imageView1 on the side of the imageView 2 , underneath…
-
0
votes2
answers963
viewsScrollview with Images and Linearlayout
I am developing a mobile application I would like to leave the application with this visual a horizontal application with an image side by side and with a Scrollview I already tried to take the…
-
0
votes1
answer431
viewsButton with text Android
I am developing a mobile application and wanted to make my application look like this But I’m not able to put the text under the button and put a gray background color on the button because I’m…
-
0
votes1
answer57
viewsLayout weigth does not work Android
I’m willing to leave mine <button/> and <ImageButton/> with the same size "same weight" but the command android:layout_weight="1" does not work like this leaving the size of each…
-
0
votes1
answer200
viewsError inflating class android.support.design.widget.Navigationview Android Navigationview
Good night, you guys! I am trying to create an application with navigationView pwla first time and am encountering problems at the time of setContentView(R.layout.activity_main) call; the…
android android-studio android-layout navigation-drawerasked 7 years, 2 months ago Eduardo Rafael Moraes 710 -
0
votes2
answers4197
viewsHow to put an edge on an Android Textview
Hi, I’m having difficulty in setting an edge in Textview Android. I tried so: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"…
-
0
votes0
answers55
viewsWhat is the correct/user friendly way to perform this operation?
Usually in desktop/web applications, we have a field código where is inserted the code of something and next another field that shows the description of this "something" after the search in the…
-
0
votes1
answer161
viewsError:(44) No Resource Identifier found for attribute 'srcCompat' in package 'my package name'
Hello, When I open my project, the following error occurs: Error:(44) No Resource Identifier found for attribute 'srcCompat' in package. And the R of my layout, does not find the layouts and with…
-
0
votes1
answer250
viewsChange Hint Gravity - Edittext
In the xml of my edittext I put the property Gravity to always leave the cursor at the end, however I needed to leave the text hint at the beginning. It is possible to set a Gravity property for the…
-
0
votes1
answer738
viewsimage view and text view side by side in linear layout
I have to put the image and the text side by side but do not know how to do, my code for now: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout…
-
0
votes0
answers23
viewsAndroid Appbarlayout with tabs
How can I do the tabs of App Bar Layout be functional? I believe only the component Tabslayout won’t be enough, so I’m pretty sure I’ll need to use a Viewpager to manage the exchange (Swipe) between…
-
0
votes1
answer622
viewsHow to change the width and height of a Relativelayout by Java code
I want to know how I adjust the width and height values of each relative layout, independently of my XML through the respective Java class. I already know how to adjust the width, height and other…
-
0
votes0
answers140
viewsIs it possible to create an Options Menu without an Action Bar on Android?
I am creating a Profile screen, and would like to put a Options Menu with the options 'Edit Profile' and 'Quit'. The problem is that I don’t have an Action Bar on this screen, and I don’t want to…
-
0
votes1
answer1146
viewsProblems trying to change a nav_header_main.xml text view
I am working for the first time with Navigation Drawer Activity, and would like to change (by java) the text that appears in the nav_header_main.xml menu In red is the text I want to change. Below…
-
0
votes1
answer254
viewsCustom Recyclerview Blanks
I’m having trouble in my custom list is with too much blank item space for each other Follows code <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"…
-
0
votes0
answers68
viewstwo listview on the same screen but only one appears after execution, helps
I’m trying to make a screen for an app, where I want to put a text, a listview and then one more text and another listview. I made the codes, but at the time of execution only appear the two texts…
-
0
votes0
answers117
viewsI am unable to modify the layout when opening the keyboard
I’m trying to "decrease" the layout when opening the keyboard, but I’m not getting it, it’s inside a ScrollView and I realized that he ignores the free space below the views (where there are no…
-
0
votes1
answer495
viewsBotao FAB does not stay in place
I do not know what is happening the FAB button climbs on top of another component when compiling, but in the preview it is right. <?xml version="1.0" encoding="utf-8"?>…
-
0
votes2
answers306
viewsAlertdialog Custom Layout - Nullpointerexception Error
You guys talking beauty? So I tried to create a Custom Aler Dialog, but every time I try to save it, it gives a Nullpointerexception error, but I don’t know what the cause is. The code of the method…
-
0
votes1
answer77
viewsAndroid - Method Invocation 'setOnClickListener' may Produce 'java.lang.Nullpointerexception'
I’m new to Android. Android Studio always warns me about this but I don’t know what it means. Method invocation 'setOnClickListener' may produce 'java.lang.NullPointerException' I would like to…
-
0
votes1
answer33
viewsEdittexts in wrong position
I am creating a list of Edittexts programmatically. In all I give a margin of 20dp and place one below the other. The problem is that textbox2 is always on top of 1, the other textbox is in the…
-
0
votes1
answer22
viewsThis xml works perfectly in Android studio emulators, but not on physical device. I ask for help
<TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="20dp" android:gravity="center" android:text="@string/Mensagem_Principal"…
android-layoutasked 6 years, 10 months ago Luis Aransegui 1 -
0
votes1
answer53
viewsWhy does my recycleview not respect Match Parent?
I have a cordinatorlayout that contains a recycleview, however it fills the whole screen, and this all set as match_parent, including the recycleview card XML:…
-
0
votes1
answer427
viewsChanging Navigation Drawer Activity Image
I’m creating an app by Android Studio and chose Navigation Drawer Activity as the system screen. But I would like to know how to change the green background and place an image. I believe it’s the…
-
0
votes2
answers68
viewsProblem with Bottonnavigationview
As you can see I’m with a little problem of layout in this form on Android, this form is opened inside a Fragment normally where I will send this data. 1- To my surprise the EditText does not expand…
-
0
votes2
answers130
viewsShow Edittext by clicking the Floatingactionbutton
See if you can help me I’m starting to work with Floatingbutton like when the user click on the button appears an Edittext for typing and a button at the end to delete the text as picture below: I…
-
0
votes0
answers151
viewsdiary app with messages
I have a deadlock here, I’m setting up a screen for my app, where there’s a calendar, where the dates appear and when I touch the date appears the notes that another user made, but I wanted to know…
-
0
votes1
answer243
viewsError creating onClick Android
I have a button on Android where when clicking, will be directed to another screen. The structure of the page is like this: <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
-
0
votes1
answer477
viewsNo specific details appear in android studio when configuring application for various screen sizes
Please ask that in reply do not indicate me the link of the documentation of android to read. I am developing an application that has that be adapted to more or less 8 different inch screen formats,…
-
0
votes0
answers113
viewsImage getting behind the background
I would like to put an image in front of another image. I’ll explain it better. I have a background and want to put an image on the dividing line between Relativelayout and Scrollview. On native…
-
0
votes1
answer682
viewsHow to put back icon on a Toolbar inside a Fragment that hides the main Toolbar?
I’m having a problem putting the back icon on a Toolbar inside a Fragment that is hiding the main Toolbar. I use android studio, and created a Navigation Drawer Activity, where I work with Fragments…
-
0
votes1
answer199
viewsI can’t adjust the image size to the layout
Hello I would like to change the layoutgravity of the image, which will always be filled on the sides and at the top. I change the layoutgravity but does not change anything. Example below: Screen…
-
0
votes1
answer79
viewsExpandablelistview: Change header title by clicking an item in the list
I need to get the name of the items in the Expandablelistview list, and settar header according to his position, but he’s only getting the last one. Below is my code: Mainactivity public class…
android android-layout android-activity android-adapterasked 6 years, 9 months ago Wallace Baldenebre 114 -
0
votes1
answer125
viewsButton does not appear in an Active and appears in another
I have a problem I don’t know where it is. I have a layout that runs a video, with a button in the front, only that the button does not appear although when I click on the area of the button it…
-
0
votes0
answers27
viewsHow to automatically reset items when item is visible or invisible
Example: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"…
-
0
votes1
answer208
viewsHow to make a View overlap?
I have this XML: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"…
-
0
votes1
answer203
viewsAndroid Bullet style menu in Recyclerview item
First of all I already have an intermediate knowledge about android and I already have some apps in google play. Recently I’ve been updating the layout of my app, I have a video gallery in my app…
-
0
votes1
answer67
viewsConstraint Bugado Layout
I made an app on Android Studio using Constraintlayout. After finishing I tested in two different devices, a Vibe K6 and a Moto G 1st Generation, and in both everything was perfect. But when I…
-
0
votes0
answers37
viewsChange text from Textview
I have a Textview to which I use a String as the text, I wanted to know if it is possible through a click to change this String(text) to a new text that is typed. public class Texto extends Activity…
-
0
votes1
answer298
viewsclose alertdialog open with inflate
I have a project with an open dialog box with an inflate giving the user the option to type a text to change the value of a String. I’m having trouble closing this box and going back to the previous…
-
0
votes1
answer161
viewsSet the width of a Textview by the maximum number of characters
I’m creating a layout_item for my Listview, but I want all elements to be aligned, but some Textview can have size variation (they take the value of a numeral that can vary from 0 to 1000) so I’m…
-
0
votes1
answer69
viewsData from a Selected Recyclerview
Good afternoon, I need that when the person clicks on a take the data from Animeactivity and is passed to Start screen ? insert image description here…
-
0
votes1
answer51
viewsAlign kids layouts
I own an android project that is basically an app to download and watch videos online, I was using a custom code from a video controller to the player I picked up on the internet, however I decided…
-
0
votes1
answer172
viewsHow to change the course color of my Searchview
For now it is white and I need to put it in black color, I found several tutorials, but I did not find one that works, how do I do it? Code: searchViewPesquisa = (SearchView)…
-
0
votes0
answers41
viewsError opening Android app project
When opening the Android app project of a friend of mine on my PC, I came across these errors. How do I fix it ? screen images : Grandle code ( app module ) : apply plugin: 'com.android.application'…
android android-studio android-layout android-activity android-fragmentasked 6 years, 2 months ago jhonatan santos 103 -
0
votes0
answers110
viewsHow to set the Navigation View menu by code?
For now I’m setting the menu through xml, this way: <android.support.design.widget.NavigationView android:id="@+id/navView" android:layout_width="match_parent"…
android android-layout material-design navigation-drawerasked 5 years, 11 months ago Luis Felipe 162 -
0
votes2
answers127
viewsAndroid - Edittext does not return typed value
I am trying to recover a value to generate a random password, however the field "size" is not returning what was typed. The error occurs in the following block: int tamanho =…