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
answer75
viewsShow android layout for x seconds
Good, I intend to show a layout for 5 seconds. I’ve seen examples of how to do this as soon as the application opens, but what I want to do is show a layout for 5 seconds while running the…
-
1
votes1
answer185
viewsRecylerview Horizontal as Whatsapp
I would like the help of you how to make this layout of the "Media" part in a particular Whatsapp Contact. Would this be CardView whole called "Media". It would be almost exactly the same way, I…
-
1
votes0
answers86
viewsHow do I make one image not run over another?
All right? I have a code where I can move several images with the mouse but when dragging an image it goes over the others. I want to move it without going over. Follows the codes: package…
-
1
votes2
answers271
viewsLinear Clickable Layout
How do I make my layout clickable? For example, I divide the screen into 2 layouts, 1 green with 50% of the screen and the other red with the other 50%. How to make them clickable?
-
1
votes1
answer279
viewsandroid.widget.Linearlayout cannot be cast to android.widget.Listview
When running my application, this error appears: 05-28 05:33:33.773: E/AndroidRuntime(28824): java.lang.RuntimeException: Unable to start activity…
android android-layout android-fragmentasked 9 years, 6 months ago Vinícius Venancio dos Santos 329 -
1
votes1
answer72
viewsColor by Actionbar
I wonder how I can change the color of Actionbar dynamically ? I’ve tried to take getSupportActionBar but I couldn’t get.
-
1
votes1
answer86
viewsI cannot create a new Activity
I’m doing a project that uses the v4 support jar. However, when I create a new Activity, the project gets errors, as it informs that support v7 is required. There is possibility to continue…
-
1
votes1
answer313
viewsProportional area use with Gridlayout
I’m having the following difficulty, after searching exhaustively on Google and not finding an answer to this my doubt, I decided to ask here, I would like to place a Textview next to a Button, so…
-
1
votes1
answer84
viewsHow to create a Double Toolbar?
I googled, but I never found a way to make a double Toolbar(material design) like the image: https://chris.banes.me/content/images/2014/11/layout-structure-toolbars-toolbars-04_large_xhdpi.png…
-
1
votes1
answer689
viewsHow to put a scrollView inside a Textview if I already have a scrollView in the layout?
I put a scrollView in the layout and still needed to put a scrollview in Textview, but only one of them works, if I already have the layout, textView does not work. Does anyone know a way to leave…
-
1
votes0
answers42
viewsrequestLayout() improperly called by Listview
I have the following error, when I call my screen of categories they load normally, I go to the second tab called expense that loads a list, so everything well, when returning to the first tab, the…
-
1
votes1
answer125
viewsAnimate Linearlayout with Layoutanimationcontroller
Good Afternoon! I have a Linearlayout that will be displayed when the user selects a Switch For this I created two methods, for fadein and fadeOut. Follow: private LayoutAnimationController…
-
1
votes2
answers449
viewsColor Spinner Progressdialog - Android
How do I change the default color of Progressdialog (Spinner) on android? Below is the code I’m using: ProgressDialog progress = new ProgressDialog(this); progress.setTitle("Título);…
-
1
votes0
answers183
viewsAndroid Complex layout using Fragment
I’m having trouble creating a footer (footer). The problem is in the horizontal position of the tablet where I have two framelayout and need to include the footer occupying all the bottom (below the…
-
1
votes1
answer171
viewsRemove shadow from Tablayout API 21
I want to remove the shadow of TabLayout, but in API 21 nothing is working. I tried to define windowContentOverlay or the elevation for null and nothing works. The rendered screen looks like this:…
-
1
votes1
answer370
viewsBackground function - Android
Hello, I need to place an animation on the screen, it can only be visible for 10 seconds, after that time it disappears, and if the user clicks a specific button the animation comes back. Can…
-
1
votes1
answer60
viewsRemove title space in Alertdialog
I have the following dialog in my application As you can see, in it I will not use Titulo (nomequalquer.setTitle("blabla")) nor Message. I would like to know what I can do so that this white space…
-
1
votes2
answers69
viewsAlternative to Absolut Layout
I saw that the AbsoluteLayout has been discontinued for reasons of standards on different phones. Currently use the RelativeLayout, but if by it keep the objects in relative positions, if I change…
-
1
votes1
answer46
viewsApplication returns null when instantiating custom component
Good night. I need to make a component AutoCompleteTextView search the information directly from the server and for this I am following the following article:…
-
1
votes1
answer219
viewsUser Resize photo in Imageview
Good morning, I would like to request some information source, tutorial or example, how to resize a photo in an Imageview, because I did not find anything about it in my searches. I am developing a…
-
1
votes1
answer29
viewsGray button on an old version of Android
I’m making an app, where the buttons are green,and turn green when I test on Android 6.0, but when I test Android Kikat the button turns gray.
-
1
votes1
answer84
viewsHow to upload a video to a screen?
I’m making an application in Android Studio where I have the main screen (Mainactivity) that has a menu with several links and one of them calls a Fragment(Videofragment) where when loaded should…
-
1
votes2
answers1195
viewsRemove shadow between Toolbar and the rest of the layout
I’m working on a project where I need to put one CalendarView next to a Toolbar. The problem is that the Toolbar gets a shadow on the bottom, where I’d like you to join the CalendarView. I tried to…
-
1
votes1
answer602
viewsResize bitmap without blurring
I’m using a code to make the Imageview circular. The problem is that I need to use "scaleType:centerCrop", what leaves the image oval instead of circular, depending on its resolution. I tried to use…
-
1
votes1
answer340
viewsButton that overwrites all screens
How to make a floating button that overlaps all screens , mainly the screens outside the application. in the image has 2 examples of floating buttons…
-
1
votes1
answer1233
viewsHow to adjust screen according to Android virtual keyboard?
I would like to know how to resize the screen according to the display or not of the Android Virtual keyboard, Evernote’s home screen style, that when the keyboard appears the image decreases and…
-
1
votes1
answer65
viewsHow to rebuild the XML of a Fragment layout when it is expanded?
I have a screen with a Fragment, that without being expanded, it just shows the user and password field and the sign up button, and I wanted that when I expanded it, fields like name, date of birth,…
-
1
votes1
answer841
viewsCustom searchview
I need to do a searchView like this: I need to put the white icon and the hint too.…
-
1
votes0
answers135
viewsIs there any framework for android?
I’d like to find a framework for Android similar to Bootstrap used in the layout web pages, is there any? Which is the most suitable?
-
1
votes1
answer808
viewsMark/Deselect Radiobutton Component in Expandedlistview
In a question I asked here at Stackoverflow a few days ago I was instructed to use the Expendedlistview component to represent a dynamic list of items. After the implementation I saw that the list…
-
1
votes0
answers140
viewssetOnItemClickListener not working when clicking on a Listview line
I’m beginner in android development, and I came across a problem that I can’t solve. Well, I put a listview within a view_pager (content_main) which is included in activity_main. When I click on a…
-
1
votes2
answers916
viewsLayout occupying the entire screen
I’m working on a project where I have a screen that contains some elements separated by different layout types. All these elements needed to be grouped within a single LinearLayout so that I could…
-
1
votes1
answer54
viewsError when trying to set custom Actionbar: java.lang.Nullpointerexception
I’m trying to customize my Actionbar but whenever I try to emulate the application it closes and returns me the following error in Logcat: 01-07 16:21:57.092 1388-1388/br.com.jeiferson.agenda…
-
1
votes1
answer1010
viewsLayout does not occupy full screen
I’m putting together a layout and the layout isn’t occupying the entire screen. I’ve tried it in many ways, but it’s never possible that it will, so it’s not fitting everything I need. Problem…
-
1
votes1
answer145
viewsImages in different types of screen
Right now I have these layout s to support the different screen sizes When I test the app on 4-inch or 4.5-inch devices, both will use the layout activity_main.xml which corresponds to normal size…
-
1
votes0
answers85
viewslinearlayout at the bottom of the screen
Where I have seen for the layout or component to stay at the bottom of the screen(bottom) would have to be put in the xml that: android:Gravity="bottom" but I’m doing this because I want to make the…
-
1
votes2
answers939
viewsAndroid - Invalid Resource Directory Name
I tried everything searching the internet, saw various responses about giving Clean Project, rename, update IDE and nothing worked. Still giving the following problem: I just want to better organize…
-
1
votes2
answers1423
viewsHow to change the app title source?
I want to change the title of the app with a custom font, the source is already in the folder assets/fonts.
-
1
votes2
answers1100
viewsIntent stopping the App in Android Studio
I have a problem with Intent, something that was supposed to be simple is causing me problems... I’m trying to create a second button for call another screen, but as soon as I add the following code…
-
1
votes2
answers6645
viewsWhat is the function of wrap_content?
RelativeLayout onCreateLayout = new RelativeLayout(this); onCreateLayout.setBackgroundColor(Color.CYAN); RelativeLayout.LayoutParams ClickMeParms = new RelativeLayout.LayoutParams (…
-
1
votes1
answer5258
viewsHow to take the value of a Spinner and continue the form
Good afternoon, I have a simple form in my android app, where the user writes name and register an alert, but in the alert frequency field I inserted a spinner(selectbox android) with options of…
-
1
votes0
answers197
viewsHow to implement Navigation Drawer with Bottom Navigation in the same application
In a app that has NavigationDrawer with Bottom Navigation, what would be the recommended path for implementation? I searched for tutorials and did not even find in the official documentation. I…
-
1
votes1
answer64
viewsSwipe Refresh in api 15
I am making an application that uses Swipe refresh a lot, I would like to know how to implement Swipe refresh in Androids with api 15? If it is not possible how can I create the Swipe for android…
-
1
votes0
answers33
viewsHow to fix the icon size of an Expandablelistview?
I’m using a Expandablelistview, where I have a content expansion icon, but every time I increase the height of the option, the image gets the same height, distorting the image. How do I fix the…
-
1
votes0
answers243
viewsLow performance in Recyclerview with Constraintlayout, inside a Viewpager on Android
I have a Recyclerview with about 20 items. It takes a long time to render and blocks the UI. I’m using the Constraintlayout to position items on each line. They’re not as complex as you can see in…
-
1
votes0
answers111
viewsHow do you make a Gridview like that?
Hello, I am learning Android and I learned a lot about Listview... But not much about Gridview, so I would like to know how to develop a Gridview similar to the below: (The title "POPULAR" Never…
-
1
votes0
answers229
viewsHide Toolbar with Coordinatorlayout + Tablayout + Viewpager
Good morning, I’m trying to implement the features of google Material Design and wanted to hide the Toolbar when I scroll in Viewpager (has a Recyclerview inside), however I’m not getting the…
-
1
votes1
answer322
viewsMy layout has stopped working
I’m mounting a screen for an android application, I made the screen layout and was working, but after updating the android studio my layout no longer works. The code is this: <?xml version="1.0"…
-
1
votes0
answers77
viewsAdjust text in recyclerview
Good night! I’m having trouble adjusting the text of a textview within a list, as the image shows, the end of the text is overwriting the button. How to fix? Picture how it’s getting. <?xml…
-
1
votes0
answers59
viewsError when choosing theme for form
I am making a form and when choosing the Dialog theme it informs that: Missing Styles. Is the correct Theme Chosen for this layout? as you can see below. If you cannot really use this theme, there…