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
-
2
votes1
answer65
viewsAlertdialog.Builder with undue space
I have a space at the bottom of my custom Alertdialog. I don’t know why it’s happening, knowing that I didn’t set any margin or padding at the end of my view. If anyone can help. Here’s a real print…
-
2
votes2
answers609
viewsLayout does not fit on the screen after rotation
I developed an application that works normally but when I turn the screen to landscape orientation the app is cut and not to go down and view the rest of the content and also the Admob I implemented…
-
2
votes2
answers1151
viewsHide the Webview address bar
How I needed to develop an app like WebApp, followed a tutorial and succeeded (the tutorial used Android Studio IDE 1.0.2). The application works satisfactorily, however there is a detail that I…
-
2
votes1
answer9344
viewsHow to make a Floating Action Button?
I am developing an application for Android, I would like to know or some example to include a Floating Action Button? This Floating Action Button would be a shortcut to a system action, in my case…
-
2
votes0
answers377
viewsDrawable isn’t picking up images
Guys, I’m making an app that has a Drawer, and the menu that appears laterally is a navigationView. So far so good, but in the code . xml I want to add icons, is not picking up the images. The code…
-
2
votes5
answers1896
viewsChange Button Background
How can I change the background of a Button click on it? For example: I have the shape01 and the shape02, for default the Button this with the shape01, when clicking on it I need to change to the…
-
2
votes1
answer60
viewsToolbar repeating
Hello, I’m having a problem, my Toolbar is repeating every time I add a new record. how do I fix it? follows the codes: public class ListarReportes extends BaseActivity{ Usuario usuario;…
-
2
votes1
answer108
viewsActivity with background design
Good morning! Friends, I need a light to carry out the development of an Activity with the following layout, as below. The area in orange color should be designed programmatically according to…
-
2
votes1
answer91
viewsUse Datepicker in an Activity
Hello! , I am trying to make a datepicker part of the Activity layout as shown below: I’ve been searching the Internet, but all the examples I find speak of Datepickerdialog, and that’s not what I…
-
2
votes2
answers58
viewsLinearlayout dimensions, defined in java, do not maintain proportionality between resolutions
I have a View in which I am programmatically defining its somersault and width in this way: LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) linear.getLayoutParams(); params.height =…
-
2
votes2
answers675
viewsError while trying to start another Activity via a button
My program runs, but when I click on the q button I should open a new Activity, the program closes saying there is an error. FATAL EXCEPTION: main Process: com.example.Raissa.calencon, PID: 2142…
-
2
votes1
answer530
viewsScroll View on Android Studio, Basic question
I have a very basic question, how do I see the content that is below the Scrollview visible in the editor itself? Since content exceeding the selected resolution does not appear?
-
2
votes1
answer2545
viewsWhat’s the difference between a Toolbar and an action bar?
I’ve researched a lot about it and I haven’t found anything that could explain it. Is there a difference or is the same thing?
-
2
votes1
answer11112
viewsMostar / Hide Button and Textview
I’m making my first App on Android Studio, but I’m having trouble doing something relatively easy. I need Click a Button to show Textview and another Button (which will hide Textview when clicked…
-
2
votes1
answer320
viewsUse a layout folder for more than one size
I have a Tablet(7") and a smatphone(5"). My layout folders are: layout > Has almost all layouts layout-large > One of the screens(Screen A) will behave differently to wide layout-normal-land…
-
2
votes2
answers190
viewsHow could I get an image inside a <Scroolview to stay fixed and all the content "scroll" through the "bottom" of the image?
Hello, I wonder how I could do to keep a picture fixed and the information rolls underneath it, with all this inside a Scrollview, follows layout print and XML Code: <ScrollView…
-
2
votes1
answer13850
viewsWorking with Radiobutton and Radiogroup
I’m trying to make a screen where the user would have to choose between the options on <RadioButton and if he chooses the right one counts for the right one and otherwise for the wrong one,…
-
2
votes1
answer3874
viewsChange the edittext and selection color in edittext
I am using a Autocompletetextview and an Edittext, for email and password, respectively. Is it possible to change their color? Here is an image: Change the selection color and the color on the…
-
2
votes2
answers574
viewsHow can I change the Edittext selection and pointer color?
I want to change the color of seleção of the text in a EditText and also change the color of bolinha (name is pointer if I’m not mistaken) by java. It has to be the same as the image that follows…
-
2
votes2
answers397
viewsEdittext Spacing Help
I can’t get a hold of Edittexts on my project. the amount of Edittexts are generated according to the amount informed by the user, that is, it was programmed in the Java Code.…
-
2
votes1
answer229
viewsRemove an Imageview
Is there any way to remove an image in a Imageview or leave it empty via code? For example: I "Seto" img1.setImageResource(R.drawable.icon_circpreto); It has how to remove it via code?…
-
2
votes2
answers749
viewsHow to use Android Studio Interface Editor only?
I program for Android with Xamarin in the Visual Studio, but I don’t like his design editor at all, I can only use his editor Android Studio when I need it? I changed the design extension from .axml…
-
2
votes3
answers135
viewsEdittext style texts - Underline in Zigzag
I have an edittext that when it detects a specific word it highlights it for example: print("Destaque") The word print will be deployed. Only so far so good but I want every time it detects a…
-
2
votes1
answer1008
viewsError inflating class android.support.design.widget.Navigationview
It is working correctly on most devices, however on other devices the following error is occurring: android.view.Inflateexception: Binary XML file line #16: Error inflating class…
java android xml android-layout navigation-drawerasked 8 years, 5 months ago Giancarlo Abel Giulian 3,999 -
2
votes1
answer808
viewsOrganize layout files in Android studio
Following, I have a project that will be huge in the end. currently I finished 1 module of a total of 4 modules and it is already full of layouts, etc. Follow an image just for you to be aware of…
-
2
votes1
answer193
viewsSpinner does not load data from the.xml string
My spinner only appears the arrow. no 1 has to show the States and so informed 2 shows the cities of that state This is the java code. public class PropertyRegisterActivity extends AppCompatActivity…
-
2
votes0
answers64
viewsCircular Reveal with background color change and status bar in Tablayout
I would like to make an effect that when clicking on Tabitem the background colors and bar status change with the circular effect of revelation, similar to the Google Play Store as shown in the…
-
2
votes0
answers55
viewsStick header recyclerView fixed header
I’m implementing the effect of stick header in a recyclerView in my app. I created a subclass of RecyclerView.ItemDecorator and made my implementation, the effect was applied to Recycler, however…
-
2
votes1
answer139
viewsTake view position on the screen and apply in another view
I’m trying to make a transition effect when I open a DialogFragment but for that I need the photo(CircleImageView) of DialogFragment is in the same place as the photo of Activity which opens it. If…
-
2
votes2
answers412
viewsReuse code on multi-button onClick
I’m developing an app where it will contain several buttons. I need your help to see if I can improve the code. Actions do the same thing just change the background color and pass me the button…
-
2
votes1
answer203
viewsIs it possible to use variables to set the size of a View?
I am beginner in the development and applications and the application I am working in need that the user give me a value (distance in meters) and from this value I will adjust the size of the image…
-
2
votes2
answers982
viewsLinearlayout Over Other Linearlayout
I have a layout in Android Studio that I would like to have on another layout, but I can’t do it in any way. I would like you to be on top, because it is a menu that appears when someone presses the…
-
2
votes1
answer105
viewsBreak line when components inside Recyclerview occupy full screen width
Is it possible to make that when the width of the components of a list occupies the total width of the screen, the next component drops a line? I don’t want to use scroll if it’s not possible to do…
-
2
votes1
answer273
viewsSeparate Item clickable in android Layout
I have a Listview, and a layout of the Adapter item that follows its basic image Problem is that when I click on any area of the item, in the list, every component is "selected" I would like to get…
-
2
votes3
answers969
viewsCreating an Activity and calling multiple Layouts can be harmful?
As I am still walking in the study of Android applications and read things in this regard, I wonder if, for example, I have only one Activity and several layouts being called from it, there is a…
-
2
votes1
answer1020
viewsHow to fix the size of a button on android?
Could someone give me a tip on how to avoid the problem below? I have these buttons and I would like to leave them in a fixed size, so they do not ditor when the phone is rotated. I am using…
-
2
votes2
answers336
viewsHow to eliminate the space left by invisible views on the screen?
I am working on an android application and my question is: When the user logs in the application, it checks the permissions of the same. How can I make this button invisible and organize so as not…
-
2
votes1
answer137
viewsButtons added underneath Reciclerview do not appear
I’m using a Linearlayout with a Reciclerview and 3 buttons underneath it. I’m doing this, but Reciclerview takes up the whole screen and the buttons don’t appear. <?xml version="1.0"…
-
2
votes2
answers457
viewsHow to create dynamically several times the same layout?
I created a layout called with a "+" button at the end so that I would like, when clicking the button, to be added a new Linearlayout below the current layout with the same content, allowing the…
-
2
votes1
answer96
viewsHow to correctly position a piece of the View created in java?
After charging my View, if the user clicks the button then a menu appears in front as shown in the image: The top layer of this menu is a FrameLayout, I’d like to leave you with Gravity RIGHT and…
-
2
votes0
answers763
viewsIframe opens in full screen in webview in Android Studio
Every time I put an iframe, instead of opening it inside the page, the iframe opens in full screen. It follows project codes Mainactivity.java package com.example.duff.webviewoficial; import…
-
2
votes2
answers5047
viewsHow to properly organize DP and DPI for each screen type on Android?
Is there any kind of formula or way to know the following questions without having to "build" all the time to check? How to know if that Image/Text/Button or whatever is visibly good for the user on…
-
2
votes1
answer636
viewsHow does the use of DPI Layouts and Redeemers work?
In the Android there are so-called "DPI", who are pixel densities. Each screen has its kind of DPI as an example: Smartphones: layout [?] layout-ldpi [240x320 & 240x400] layout-mdpi [320x480…
-
2
votes1
answer329
viewsComponent on another Android
I am developing an application using android studio 2.2.2 and would like my application to look like this: But when putting textView on the imageView it is under the image, I tried to use…
-
2
votes1
answer896
viewsChange icones colors dynamically
I have the following question: I have several icones in my design, some white and others black. Is it possible to change the color of the icon without importing an icon already in the specific…
-
2
votes1
answer785
viewsChange the color of a Button that already has an assigned Background
Hello, in my application there is a table (Alert Dialog) that will be used to select the color of a component. In this table there are several equal buttons with the background already set so that…
-
2
votes2
answers3586
viewsWhy does the 'preview' of the layouts no longer appear after upgrading to Android Studio 3.0?
I made the updating of Android Studio 2.3.3 for 3.0. From there, only headache: ready designs with problem. Both in the design tab of layouts as in the preview window (preview), the drawing of the…
-
2
votes3
answers1206
viewsPreview Android stopped working after update
I work on an android project and, after updating to Android Studio 3.0, my project started to give problem. Preview of my activities has stopped working, although the app is built and I can install…
-
2
votes2
answers1102
viewsHow to add an icon at each end of an Edittext?
I want to add two icons to Edittext from android according to the image below. This is the code I’ve used to add the image to the right side. <RelativeLayout…
-
2
votes2
answers155
viewsChange visibility of xml layout with the change of orientation of the device
I need to change the visibility of an xml layout when the device orientation is from Portrait (standing) to Landscape (lying down). I intend to add 2 columns when performing this action. I used the…