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
answer2031
viewsDistorted background image in Android Studio
Personal created an image for the background of my app, I made it according to the resolution of the smartphone I was testing, but it was distorted, then I remembered I was using Actionbar, so the…
-
0
votes1
answer45
viewsUse android layout randomly
Good people, I intend to "call" a layout randomly, the problem is to call it, I thought to store all layouts in an array and based on the randomly generated numbers call the layout at that position…
-
0
votes0
answers56
viewsNull Pointer Android
While running the application, this Adapter error appears: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.LayoutInflater.inflate(int,…
-
0
votes1
answer256
viewsLayout Hierarchy
I want my Toolbar I put in place of Actionbar not inside Scroolview, but always when I take it and create a Relativelayout or Linearlayout on the outside and I put the Toolbar and then the…
-
0
votes0
answers64
viewsInflate Toolbar in Stepper
I need to create a Stepper in my application that I got the library on Github https://github.com/shivasurya/materialsteppers I managed to implement the application, however I want to put a Toolbar…
java android android-layout android-fragmentasked 8 years, 9 months ago Joel Messias Do Nascimento 103 -
0
votes0
answers47
viewsAndroid Toolbar getting behind topbar
What may be occurring, Toolbar is staying behind the topbar as in the image below This is happening in the versions 4.4.2 and 4.1.1…
-
0
votes1
answer1334
viewsWhat is the content_main.xml file for?
I’m starting to study Android, using the tool Android Studio and I have a problem: as much as I search books or video lessons never find one that is updated. I am with version 1.5.1, and in the…
-
0
votes1
answer158
viewsHow to remove automatic items from an Activity
In Android Studio, when it comes to creating an Activity, the IDE already places some items inside it, such as that circle with an envelope inside (image). How do I remove it after created the…
-
0
votes1
answer491
viewsHow to place an imageView and a textView inside a gridView?
I can’t place image and text inside a gridView, someone can help me ???
-
0
votes2
answers2514
viewsAndroid layout with colorful embroidery
Hello, Someone knows how I make rounded and colored edges on an android screen(layout). I believe there should be some configurable item in XML but I don’t know which and I’m not sure if it is…
-
0
votes0
answers497
viewsFix position of Relativelayout in Activity
Good afternoon. I want to fix the position of two RelativeLayout on the screen, but when the user changes the text of the TextSwitcher the RelativeLayout the one it belongs to increases in size, and…
-
0
votes1
answer1060
viewsHow to put Navigation Drawer menu under the Action Bar?
Hello, I started a new project with the standard Navigation Drawer, a standard Android project, it comes with the menu that goes over the Action Bar, so: I’d like it to look like the image below:…
-
0
votes1
answer137
viewsCardview in API 10
With normal background: When changing to another color, a line below the Textview: xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
0
votes0
answers168
viewsMenu with customized layout
I need to create custom menu so it stays that way: so I created a res/layout/layout_menuitem.xml . xml to serve as my app’s menu. <TextView android:id="@+id/text_minha_conta"…
-
0
votes1
answer198
viewsChange the source via xml
I have the sources of my app on : main > Assets >fonts Is there any way to pass directly into xml? (android:typeface="") Or just via Java ?…
-
0
votes2
answers582
viewsChange Toolbar Back Button Color
How I change the color of Back Button (or Button up) of my Toolbar ? When I run the application it appears black.
-
0
votes1
answer224
viewsChange the color of the application footer
I would like to change the color, the footer of the application, where is the button "back" android. Image below: XML: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout…
-
0
votes1
answer73
viewsSplit widget on screen
I want to split two widget within the Layoutlinear, being both Textview . If I use "orientation="horizontal" and in the Textview use the attribute android:layout_weight="1", widgets were split on…
-
0
votes1
answer750
viewsPut Button at the bottom of the screen - Android
I have a Expandablelistview and a button that should only appear when someone gives her the Scroll until the end. I already tried to put as footer but, if the list ends in the middle of the screen…
-
0
votes0
answers25
viewsRenew data in the same
Hello! I would like to know how to go alternating values always in the same Ctivity. I do not know if this is the way to say it, but I will explain by example a tabuada app that I have here and is…
-
0
votes1
answer96
viewsHow to align an element of a Collapsingtoolbarlayout to the title?
I have a CollapsingToolbarLayout with a LinearLayout inside (which contains some texts). Toolbar title has a default margin on the left (at least on LTR devices) when it is expanded and a different…
-
0
votes3
answers1127
viewsHow to add Toolbar in Activity without inheriting Appcompatactivity - Android Studio 1.4
Good night. I updated my Android Studio for version 1.4 and by default, any activity used as an inheritance to AppCompatActivity (public class MainActivity extends AppCompatActivity). I developed an…
android android-studio android-layout inheritanceasked 9 years, 1 month ago Luiz Henrique Ugliano 651 -
0
votes0
answers107
viewsDevelop a Screen equal to SMS Receiving Screen (android). User receive Messages
Good Afternoon, I’m starting on Android. I’m making a app where a user will receive various messages from other users, each message containing 2 fields. The user will access a screen and see this…
-
0
votes2
answers1577
viewsShow all the contents of a layout in the Android Studio preview
Hello, I would like to know how to (if possible) show all the contents of a layout in the Android Studio preview. Follow image of example: The blue dial, is a button that is in the layout, but I…
-
0
votes1
answer654
viewsScrollview only in the desired textView
Good night to you all. I’m with a simple layout containing a textView to control the title and other textView to control the content. What happens is that I have tried several times to include a…
-
0
votes1
answer54
viewsHow to delete Gridview image?
I’m developing an app that contains a gallery, where the user takes photos and the image is shown on GridView, but I don’t know how to delete the selected image I was able to do something like: the…
-
0
votes2
answers784
viewsListview with a button at the bottom of the android studio list
Good afternoon, I have a Listview that is bringing some data, this working smoothly. But at the end of the list, I need to put a button. This button should not repeat itself, as it is happening. I…
-
0
votes0
answers43
viewsDúvidas Tablayout
I have 3 views that inflame Contents from Recycler view. I put all of them extending from one BaseActivity.java to have some common functions like Navigationview(Sidebar) and also the Toolbar. Now,…
-
0
votes1
answer737
viewsCreating a datepicker Android Studio
I’m wanting to create a datepicker as image below. But when I create one, it gets that way. Msm when I use some example that creates one according to the first image, it ends up being equal to the…
-
0
votes2
answers608
viewsHow to change the color of the floating button and insert a text into it
I would like to change the color of the floating button and put a small text but do not know how to do, could help me
-
0
votes1
answer287
viewsHow to make an Edittext Material Design style?
Could someone give me an idea of how I can do this Plain text:…
-
0
votes1
answer103
viewsLinearlayout with 2 textViews to simulate a button
My goal is to have one Button with 2 TextViews inside. So I researched the easiest way is to have a LinearLayout and inside place the TextViews and place the property android:clickable="true". The…
-
0
votes1
answer213
viewsHow to resize Relativelayout while keyboard is active
Good night! I’m a beginner on android, so I’m sorry if it’s a stupid question. I did not find solution to my problem in this forum, so I decided to create this post. I have a very simple…
-
0
votes2
answers61
viewsEdittext with ellipsis
In Edittext, when text cannot be displayed completely and lose focus, has some tag that can be set so that it displays the text with ellipsis?
-
0
votes1
answer297
viewsToolbar toggle(burger) button does not work on Android Pre Lollipop
I created a NavigationDrawer same as the image It works perfectly on Android 5.0 or higher, equal to image. But when I run the application on Android less than 5.0, the button does not work and when…
-
0
votes1
answer582
viewsHow to create "responsive layouts" on Android?
I am doubtful how to create a responsive "Layout" to serve on all devices smarts and tablets, so that the text size, buttons adapt properly to each screen, what is the best way and practice for…
-
0
votes1
answer127
viewsList within Spinner Layout
Hello, I wonder if you have how to put the list that is inside Spinner directly in the layout. Normally I do so: horario = new ArrayList<>(); horario.add(""); horario.add("Aberto Hoje");…
-
0
votes1
answer122
viewsPositioning Imagebutton in XML
I have an imagebutton in a relative layout. When I put the command: "android:layout_marginLeft=" It does the intended (move away from the left edge in x measure), but when I put:…
-
0
votes0
answers69
viewsCustom actionbar does not take up the entire screen width
Well, I was trying to customize my Actionbar, it worked, but it turns out that it doesn’t fill the entire width of the screen, it’s as if it was superimposed on the old one, to better understand…
-
0
votes0
answers90
viewsClick Framelayout does not work with Listview inside
I have the following situation: I have a main layout that contains a listview inside. This listview keeps some distance from the edges of the layout and I positioned an External Layout literally…
-
0
votes2
answers166
viewsMisaligned floatingactionbutton
Hello I have a Tablelayout created dynamically, and I want to insert a FAB on the screen. The problem is I can’t get the normal alignment in the lower right corner. Am I missing a parameter? Follow…
-
0
votes1
answer1844
viewsHow to make text scroll on android screen
I’m wanting to put on a screen a large text. However I have a small problem when it comes to reading more, the text is simply cut and there is no way to scroll to continue reading. Someone tells me…
-
0
votes1
answer422
viewsWhen is/was Absolutelayout used?
I know with this layout it is possible to define manually the positions x and y of the components inserted in layout. In which hypothesis is/was recommended the use of AbsoluteLayout, since it works…
android-layoutasked 7 years, 8 months ago vinibrsl 19,711 -
0
votes0
answers102
viewsError starting Activity in Api 17
I have a code that is working perfectly in api 25, but when I run it in api 17 it gives this error below: 03-25 13:26:59.750 1895-1895/? E/AndroidRuntime: FATAL EXCEPTION: main…
-
0
votes1
answer70
viewsTimepicker as a draggable bar
It is possible to make a timepicker this image shape? So I can put in a range, hours. If so, is there an example or a library? If not, any suggestions? Imagery:…
-
0
votes1
answer582
viewsDynamically add new views
I have an Activity that contains the cardView of the image at the end of the question that has 3 edittext. I was wondering how I can do so that when I click on some button, a new cardview with the…
-
0
votes0
answers261
viewsProblems with startActivity error Channel is unrecoverably Broken and will be disposed!
My application is closing unexpectedly while doing a button event in the top menu. When this happens nothing is appearing in the Logcat I’m following the pattern like this: Within a activity I put…
-
0
votes1
answer134
viewsHow to open a new Activity without closing the Drawer menu?
I have an Activity and in this Activity I have the Drawer menu. How do you call another Activity without the Drawer menu disappearing? I just want to change Activity’s content. I tried to use…
java android android-layout android-fragment android-activityasked 7 years, 6 months ago Lucas Charles 127 -
0
votes1
answer753
viewsHow to change the color of the navigation Drawer text?
How do I change the color of the text , I’ve tried adding textcolor in the XML menu and but it doesn’t work…
-
0
votes1
answer404
viewsText on Progressbar
I’m a beginner in Android, and I’m with a doubt here that for many can be simple, but for me it’s kind of complicated to solve. Ai goes: I have an app that loads a webview, I put a progressiBar to…