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
-
1
votes1
answer82
viewsHow to play a layout component up?
Good afternoon I’m making an app for studies, and I’m encountering a small problem is not enough to be a bug, but come on, this is my home screen: As it is in the print below, I have a relative…
-
1
votes2
answers637
viewsHow to place a texView inside a Circle
Gentlemen I would like to leave richer a textView leaving it within a Circle, is a Product List with the name of the product and the value and this that would be within the circle, I tried to make a…
-
1
votes2
answers250
viewsTwo Layouts.xml for the same Fragment, is it possible?
My question is this:: It is possible to use two layouts in one Fragment? The context of my doubt, is the following: I wanted a form, where the user entered several information, only I can not put…
-
1
votes0
answers198
viewsCounter + Tablayout text
I have a Tablayout with 4 options, the notification option is for notifications received via Firebase. What I need is to add an unread notification counter. The code for counting unread…
-
1
votes2
answers1372
viewsWhen changing Fragment, the previous one is visible below the new one
I’m using Fragments instead of Activity, only when I call the second Fragment with the replace method, it doesn’t completely overlap the previous Fragment, it’s on top, but the drawing of the other…
-
1
votes1
answer1077
viewsWhen should I use Constraintlayout?
Beyond the RelativeLayout, FrameLayout, LinearLayout, TableLayout, among others already existing, which sufficiently meet the needs related to layout, Google announced on Google I/O 2016 the…
-
1
votes0
answers57
viewsConflict between Listview’s latest Ell and Floatingactionbutton
On the last Cell of mine ListView there is a conflict because the FloatingActionButton screen is covering two buttons as shown in the image: I wish I could enlarge the scroll area of my ListView or…
-
1
votes1
answer1077
viewsCannot resolves Symbol
I’m following the tutorial (Android Studio 2.3 Development Essentials) but this giving this error cannot resolve Symbol in that part of the code ConstraintLayout myLayout =…
-
1
votes1
answer779
viewsDotted Line (Dotted/Dashed Line)
I’m trying to create a division line in my App as shown below. drawable/dotted.xml: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"…
-
1
votes0
answers104
viewsTextview does not align below with the android property:layout_gravity="bottom"
I have two Texts views that will appear in a Listview and I want one to be aligned above and one below, but it’s not working the way I’m doing.…
-
1
votes1
answer396
viewsScreen and Keyboard Settings
Well, I have a certain difficulty: I created a form in android studio to insert some information, as in figure 1. In all fields, I can enter the information smoothly. However, when I enter the last…
-
1
votes1
answer173
viewsWhy does Progressbar hide behind the button?
I created a RelativeLayout with a button and a circular Progressbar. This way below: <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content"…
-
1
votes0
answers747
viewsStructure of Android Folders
Hello! I’m starting my studies in Android development, I’m trying to list and link the folders of Android Memory, whether internal or external. I can already list and display in a Listview or…
-
1
votes2
answers471
viewsPlace text under the image
I’m developing an application and I put an image with a text underneath but when I run the application it looks like, the text next to the image: <?xml version="1.0" encoding="utf-8"?>…
-
1
votes1
answer1267
viewsProblem in making Textview display updated value
I’m making a simple application, it’s just a counter, with two buttons, "+"e"-", which consists of displaying an initial value of 0, and if I click any of the buttons, the value displayed on the…
-
1
votes1
answer370
viewsImagebutton does not display properly image background
I have a school system with schedule of each course and I have an Activity where the user must select his course to have access to his schedule. This Activity has 5 imageButtons but these…
-
1
votes1
answer523
viewsText does not appear in the land/Activity.main app in Android Studio 2.2.2
I’m developing an application in the land version of android land/Activity.main and put an image, and two texts one with the name Donald Knuth and another a text but when running the mobile…
-
1
votes1
answer133
viewsLinearlayout over a listview
I have a Linearlayout that I want that when it gets VISIBLE it overlaps a listview, how to do this? I want my optional Linearlayout to override listview when it is set to VISIBLE. <RelativeLayout…
-
1
votes2
answers7146
viewsround edge on Edittext Android
I am developing a mobile application using Android studio 2.2.2, and I wanted to leave my application with this look. But I’m not able to put the edge and line on top of editText <?xml…
-
1
votes1
answer79
viewsSpace between Imagebutton Android
I wanted to leave a space between the Imagebutton, and a space between the Imagebutton and the Laterias, but I’m not getting it. I would like the application to be more or less like this: But she’s…
-
1
votes2
answers1379
viewsobject problem on top of each other in Android Studio
I’m learning to create android apps, but face appears an error when I test the app on mobile, and text is on top of each other, or any object I add. in Android studio is like this: xml: <?xml…
-
1
votes1
answer430
viewsHow do I place Edittext in the middle of the screen?
I used Gravity.CENTER, what centered the text in Edittext and not Edittext in Activity. package com.example.wbsoftware.testetcc; import android.content.Intent; import android.graphics.Color; import…
-
1
votes0
answers178
viewsListview android
How can I separate the returned fields from one Sqlite database in a listview? I’m using: SimpleCursorAdapter adaptador = new SimpleCursorAdapter(this, R.layout.row_item, registros, from, to, 0); It…
-
1
votes1
answer52
viewsWhen the keyboard is hidden the space is not rendered
I have a problem in one of the Activitys, in this Activity I have a lot of content, so I’m using a Scrollview. The problem is that once I finish typing in Edittext and the keyboard is hidden the…
-
1
votes1
answer79
viewsPopulando Spinner
I have the following doubt I have to use some Arrays List in my project they are... List Restaurant Dishes Restaurant 1 Dishes Restaurant 2 Price Restaurant 1 Price Restaurant 2 Within my Activity I…
-
1
votes1
answer235
viewsError while trying to run android emulator without android studio
I installed android studio and studied how to use Avd without the need of android studio, I learned how to make the machines via command line and it worked perfectly, but when I went on another…
-
1
votes1
answer1354
viewsHow to change the color of the Statusbar
I am trying to change the colors of my Statusbar, but when trying to change the colorPrimaryDark (first bar, where it is battery, time, etc...) the color is not changed. I created an xml with the…
-
1
votes0
answers19
viewsStatusbar - Change color with scrolling on a Collapsingtoolbar
Currently I have an image on a profile screen and Statusbar is "transparent". Running straight!! Problem: The problem is the scrolling of the screen, because in this case I’ve managed to make the…
-
1
votes1
answer830
viewsElevation Button is not showing Shadow
Hello, I’m trying to use Elevation on the buttons of the following screen: But it’s not working, Elevation’s not casting a shadow. Follows the XML: <?xml version="1.0" encoding="utf-8"?>…
-
1
votes1
answer990
viewsHow to center the string of the bar action title and how to change its size?
JAVA package togglebutton.cursoandroid.com.togglebutton; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override…
-
1
votes1
answer185
viewsHow to create a split between views?
I’m creating an app that uses a ListView to show items and wanted to know the best and most customized way to create splitters between them, also wanted to know how to use another splitter between…
-
1
votes2
answers106
viewsImage inside a Scrollview is blank on one device but usually appears on another
I have a Alertdialog whose content is a Scrollview with an image and a button inside. Scrollview works (I can "scroll" the bar), but the image does not appear (it is empty), although the button…
-
1
votes0
answers69
viewsWorking layout on Android
Only I am having difficulties to format the layout screens in Android Studio after version 3.0.0 or I am no longer knowing how to do? My screens are mostly a Scrollview. To access the objects at the…
-
1
votes1
answer67
viewsAdd admob after a Listview in a Relativelayout
Goodnight! I’m trying to add an admob to the end of a Listview in a Relativelayout and the banner doesn’t appear at all! I’ve tried several different ways in the layout to see if Listview wasn’t…
-
1
votes1
answer1014
viewsPosition button at the bottom of the layout
I would like to position the Exit button at the end of my layout. I am using Linearlayout. Some hint on how to position ? This is the Linear Layout code: <LinearLayout…
-
1
votes0
answers257
viewsSearchview error layout
Every time I click to search the search pushes tabs down I would like the tabs to stay fixed and the searchview to expand without pushing the tabs. <?xml version="1.0" encoding="utf-8"?>…
-
1
votes1
answer237
viewsWhy inflate a Layout in Fragments instead of setting one already ready? Ex: setContentView(R.layout.activity_example)
I’m learning about Android and would like to better understand how this part of the system works. Instead of inflating a layout, it would not be simpler to do as when creating an Activity, for…
java android android-layout android-fragment android-activityasked 6 years, 10 months ago Nakamoto 1,341 -
1
votes1
answer27
viewsButtons of a Linearlayout are getting giant
I want to adjust the buttons so that they are underneath each other, but when I try to put, they are wide and not like a normal button. See: The xml is like this: <?xml version="1.0"…
-
1
votes0
answers185
viewsAndroid app with colorful background on buttons and text
I’ve been playing with an android app, and I don’t know how it started to give problems...it didn’t start at all, as soon as the message appeared saying that the app crashed and if it wanted to…
-
1
votes1
answer171
viewsAdjust Constraintlayout
I’m trying to adjust a layout using the new ConstraintLayout, but I’m not getting it, could you give me a help? follows below my layout: <android.support.constraint.ConstraintLayout…
-
1
votes1
answer80
viewsHow to use tabs with items within the same xml without using Fragments?
I have a Activity where I’ll just need 2 tabs, one that will open right away telling a story using simple textview, and another about members of a team using gridview. I didn’t want to use Fragments…
-
1
votes2
answers30
viewsComponent with same height
There is a way to make a Linearlayout to have the same height as a Textview? <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"…
-
1
votes0
answers25
viewsTextfield with initial value in Constraintlayout
I am unable to identify the error in the XML specification, with each character added at the Textfield startup, which is inside the Constraintlayout, the root Linearlayout increases the height. In…
-
1
votes1
answer279
viewsHow to change Apptheme?
I have 2 Styles files. With a click on a button I want to change from Apptheme to Apptheme2. how to do? Manifest.xml <application android:allowBackup="true" android:icon="@mipmap/ic_launcher"…
-
1
votes0
answers46
viewsBack to Android menu
Have a menu inside a menu, like going back to the previous menu? <menu xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"…
android xml android-studio android-layout android-xmlasked 6 years, 1 month ago João G. Hartmann 31 -
1
votes2
answers706
viewsMake Floatingactionbutton Overlay Linearlayout
Hello, I’m making a kind of Actionbar and precise with the Floatingactionbutton overlap the Linearlayout that is fixed at the bottom, it needs to be in the same position put on the front of the bar.…
-
1
votes3
answers45
viewsCiclo Activity android
My app has 4 Activitys. When I get to the Activity number 4 user has option to return to Activity number 2 that this in onStop(). The problem is that when I go back to Activity number 2 she runs…
android android-studio android-layout android-activity android-fragmentasked 5 years, 8 months ago Paulo Castelo 71 -
1
votes2
answers114
viewsImageview Visible with onClick becoming invisible again?
Talk to you guys, I have an Image that starts invisible and when clicking the button it becomes visible, but I need it to be invisible again because when clicking the button again, it has to appear…
-
1
votes0
answers49
viewsEqual text field from facebook
Does anyone know how to let the field insert text equal to facebook ? I need my text to look the same. When I copy and paste the song’s cipher on facebook, it looks the same as the site. But if I…
-
1
votes1
answer47
viewsError when taking photo with android camera - Glideexception - Onloadfailed
I’m trying to implement the function of taking the photo with the camera in my app, but without I’m falling into the treatment of failure in Glide onLoadFailed. I have tested other logics and can…