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
answer28
viewsAndroid capture device rotation without rotating the application
I have an application with Android Webview, my Activity is configured to portrait: <activity android:name=".activity.MainActivity" android:screenOrientation="portrait"…
android android-layout android-activity rotation orientationasked 5 years, 8 months ago Leonardo Patricio 1,656 -
0
votes1
answer78
viewsandroid:layout_height="fill_parent" from Viewpager does not work
I have a ViewPage that does not work the android:layout_height="fill_parent", shows nothing on the screen, but if I determine an ex value: android:layout_height="500dp" the determined height…
-
0
votes3
answers414
viewsCustom dialog
Good morning, I made a custom dialog using a Fragment to customize it, but I need to make it have rounded corners. <RelativeLayout android:layout_width="match_parent"…
-
0
votes1
answer1770
viewsAndroid Relativelayout align items
I am not being able to align vertically in the center the items of the third line marked in the image. This is a layout of items in a listview. I’ve tried Gravity="center", layout_gravity="center",…
-
0
votes0
answers26
viewsClick on the Recycleview Item
I have a project and use the Navigation Drawer As layout, and inflate all fragmentos, well there was the need to have RecycleView, in it I get the result done by a select, only I also need it to be…
android android-studio android-layout android-fragment android-adapterasked 5 years, 6 months ago Ari Melo 131 -
0
votes2
answers73
viewsLine limit in Recycleview
I have a RecycleView which returns many lines, configure the layout_height for a specific size, more than one cell phone to another the amount of line increases or decreases, I would like to adjust…
android android-studio android-layout android-activity android-adapterasked 5 years, 6 months ago Ari Melo 131 -
0
votes1
answer246
viewsChange the color of the Recycleview line
have a RecycleView and would like to change the color of the line when selected, click the selection I have already implemented and working.
-
0
votes1
answer47
viewsCreate alternate layout
I have a project and I need to adjust to the various types of screens, I have tried with the ConstraintLayout more to what I want doesn’t work, I researched and found something about Alternative…
-
0
votes1
answer37
viewsWith Constraintlayout no more match_parent?
With the Constraintlayout feature, match_parent is no longer used?
-
0
votes0
answers210
viewsNot all additional attributes appear in android studio
Great community, I’m starting now in Android Studio and face already I came across a "problem" that I could not solve, I need the help of gentlemen. I need to link a function to a button, however,…
-
0
votes1
answer21
viewsCannot reolve Symbol "@drawable/", image exists and application runs ok
Android Studio shows this warning, but the application runs normal and the picture is shown normally. My question is why the IDE shows the error if everything is ok. Image in the folder: Error in…
-
0
votes0
answers251
viewsXML layout with problems
I have a problem, I have a layout with some fields Edit Text, what happens is that the Scrollview that I use works for all fields of Activity except for the button that ends up going down the…
-
0
votes1
answer18
viewsHow to call a method from another Activity using checkbox?
I’m mounting a simulated app and want to call the questions that are in an Activity through another Activity, where have checkbox to select the theme. button.setOnClickListener(new…
android android-studio android-layout android-activity checkboxasked 3 years, 9 months ago Daniel Diniz Marques 26 -
0
votes1
answer95
viewsError implementing Facebook login button
I’m trying to implement a custom Facebook login button. But the following mistake happens: C: mala_App mala_App mala_App app src main res layout activity_new_login.xml Error:(117) No Resource…
-
0
votes1
answer83
viewsLandscape mode does not work
I already made the layout for the Portrait mode and created the layout-land folder and pasted all the xml files I already have to be able to adjust. From what I read, just do it but it’s not…
-
0
votes2
answers1178
viewsHow to use Scrollview and Linearlayout with full screen height?
I have my code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"…
-
0
votes1
answer95
viewsAndroid composite control Textview + Switch - click method
I made a layout of a Textview + Switch button. How do I set the onClick method in prefs_activity.xml and receive notification in the class implementation? layout/preference_switch.xml <TextView…
-
0
votes0
answers40
viewsGridview displays blank area at footer in Lenovo Vibe K5 (API Level 22)
I have a Gridview that displays 4 images that must fill the screen but that doesn’t happen. I have not added any padding or margin in the layout and have tried using the fillViewPort and…
-
0
votes2
answers938
viewsHow do I keep the Imageview ratio in Android Studio?
I had a problem creating a Splashscreen. The 512x512 image imported into the drawable directory does not maintain the same ratio after running the code. The height gets larger than the width, and…
-
0
votes0
answers40
viewsListview does not present first item on android
Hi, how are you? i have a problem using android listview, I realize that it shows only from the second item, and in case of only one item in the list it shows nothing. I’ll show you my codes…
-
0
votes1
answer81
viewsInflate Layout in a Service
In Cassso this code makes a floating window with a button to end the activity, so as I do now to inflate in it a layout, or another way to build a layout within the service. public class…
-
0
votes2
answers160
viewsHow do I resolve the distortion that occurs when I switch from Portrait to Landscape?
Normal view (Portrait) For the display mode it looks normal, as you can see, now when I put it in Landscape mode... I would like the background not to be distorted, as in the image above. For this I…
-
0
votes1
answer782
viewsHow to reference an xml button of another Activty?
This is the mistake: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.octupus.ramonteste/com.example.octupus.ramonteste.projetoEscolaAluno.MainActivity}:…
-
0
votes2
answers121
viewsAnimation when modifying Linearlayout height
I’m changing the height of a LinearLayout of WRAP_CONTENT for 0 (zero) and vice versa listening to the event onClick of a Button. I would like this change to occur gradually over a few milliseconds,…
-
0
votes1
answer70
viewsHide Keyboard when sending message
Hello, then.. I’m looking for a solution for when the user sends the message the keyboard closes automatically. Thanks in advance. <Button android:id="@+id/singleComentBtn"…
-
0
votes2
answers534
viewsGuidance from Recyclerview
How can I make to recyclerview instead of filling from top to bottom start from bottom to top. EDITED when I open my activity with recyclerview and it has several messages so that it exceeds the…
-
0
votes1
answer359
viewsCentral alignment appears correctly in the Activity preview, but not when running the app?
I put alignment to the center for all textView and in the preview of Activity, still in android studio, all right: But when I run the app the same doesn’t happen: Even if you set the layout_width of…
-
0
votes1
answer146
viewsHow to show the old android timePicker ? the one that appears only the numbers
I’m using a code from the own documentation of android to create the timepicker as dialog, but it is appearing like this And I want him to show up like this Class that creates timepicker public…
-
0
votes2
answers257
viewsScroll of the slow, heavy Gridview,
I’m trying to create an app that is a kind of gallery. Search the photos on mobile and shows the user. The app is already working, but it turns out that the gridview scroll is slow. I don’t know…
-
0
votes1
answer953
viewsWhy isn’t the menu showing?
I’m taking an online course and the menu part is not working in my Android Studio. First, I deleted the Contents who came, left only what is Activity in the Layout. About the code: The App starts in…
-
0
votes1
answer272
viewsFloatingactionbutton does not work
My Floatingactionbutton does not work. In my application I have a Fragment and two tabs. In one of the tabs, floatingActionButton works, in the other not. This is the layout of the main Fragment,…
android android-layout android-fragment floatingactionbuttonasked 7 years, 6 months ago Flavio Luiz 81 -
0
votes1
answer703
viewsInsert Scrollview into all Activity
Hello, I need to insert a ScrollView throughout layout. But I’m not getting it. Follow my code. <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
android android-layout android-fragment android-activityasked 7 years, 6 months ago Lucas Charles 127 -
0
votes1
answer29
viewsProblems with multicones in the android menu
I’m trying to create two buttons but it’s only working when I click one of the buttons. My Activity is as follows: <?xml version="1.0" encoding="utf-8"?> <menu…
-
0
votes2
answers36
viewsActivity does not return the view
I’m trying to compile but it’s not giving, my layoute is like this: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
0
votes1
answer59
viewsHow to save the id of a relativeLayout?
Hello, good afternoon. I’m new to Android programming and am unable to save the ID of a relativeLayout to be compared. Example: <RelativeLayout android:id="@+id/idAmc"…
-
0
votes0
answers26
viewsList picking entire android page
People of mine listview is coming out, I need her to take only parts, I’m terrible at layout android and the expectation is totally different from the reality kkkk I need you to stay like this: And…
-
0
votes1
answer207
viewsChanging label and color of pie chart entries - Android
I have the following code: public class Pontuacaouseractivity extends Appcompatactivity { PieChart graficoUser; int pontosCor, pontosNumero, pontosObjeto; FirebaseUser user; FirebaseAuth auth;…
-
0
votes0
answers124
viewsI have a problem in Cardview to pull on a layout on Tabsadapter
Hi! I can’t pull my Cardview. I use Tabs to scroll the pages more easily. Instead of just pulling a list of things using Reciclyerview, I pull the Layouts I created. That said, my cardview on the…
-
0
votes4
answers645
viewsHow do I insert a button after a listview?
Hello, I need to insert a button right after my listview. I mean, when I finish sliding my listview will have a button at the end. I’m trying to do it this way: <LinearLayout…
-
0
votes1
answer807
viewsHow to hide keyboard when leaving Edittext?
I have three edittext, I want that when I click out of them or finish filling my keyboard sum. Being that they are a Fragment. How to do this? My XML with editText. <RelativeLayout…
-
0
votes1
answer68
viewsMethod setEmptyView is not working on my listview
I am setting the setEmptyView method in my listview but when it is empty it does not show the desired view, and also does not give any error in the log. public class ListaNotificacoes extends…
-
0
votes2
answers261
viewsProblem with animation in Android Studio
I created a Float Buttom to start an animation, but when I click on it, the animation does not occur. I have already done the debug to check the method that starts the animation and it occurs…
-
0
votes0
answers67
viewsHow to maintain a radiobutton marking when scrolling a listview?
Good afternoon, I have an edited listview and inside it I own a radioGroup. I need that when scrolling the listview, the marking on the radioGroup does not lose its marking. Follows the xml.…
-
0
votes0
answers26
viewsCreating Responsiveness with Types of Densities
I have some huge curiosities in the following question: For each type of Density we created types of folders, as an example: drawable-xxhdpi - [Imagery] layout-xxhdpi - [XML] values-xxhdpi -…
-
0
votes1
answer239
viewsChange the Drawableleft property of a Textview
I have a Simpleadapter that I use in a listview to show data coming from the database. Follows the code Map<String, String> map; for(int i = 0;i < buscaCombustivel.getCount();i++) { map =…
-
0
votes1
answer33
viewsError while editing through SQLITE
I’m trying to edit information that’s saved in the SQLITE gang. I’m working with fragments. But I’m making the following mistake: FATAL EXCEPTION: main Process:…
-
0
votes1
answer412
viewsRetrieve past information in a Bundle
I have a Fragment that calls another Fragment by passing login information to the other. I do this with the following code through the Bundle. Follow the code : ImageView editarBt = (ImageView)…
-
0
votes0
answers328
viewsCampo dinamico Android
<RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:id="@+id/relativeLayoutPacient" > <TextView…
-
0
votes1
answer262
viewsTextview Imageview Constraintlayout Android
I am creating an app in android studio 2.3.3, but when placing an image using Imageview and a Textview it presented the following this view is not constrained.view <?xml version="1.0"…
-
0
votes1
answer387
viewsHow to use a Listview inside a Scrollview
Hi, I’m trying to use a Listview inside a Scrollview. The goal is to work similar to other apps that do this, such as instagram and the young nerd. Below my comment will be the code in xml and below…