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
answer387
viewsTablerow line division - Layout
I was looking over Tablerow and developing a test app with this layout template and a question arose. I have a Table with 1 Row and two columns, whose situation is shown in the figure below. However…
-
1
votes0
answers62
viewsLeave Activity "darkened" when I click and open a listview on top of Activity
I have an Activity with items (recyclerView), when I click on an item, I "show" a listview on top using setVisible(VISIBLE). I want when the listview comes up, the Activity at the bottom will be…
-
1
votes1
answer163
viewsBackground image covering the navdrawer
I have an Activity with a navdrawer on it. And I’d like to put a background image on this Activity. But when I put the image, the Nav disappears, the image is over it. Nav does not lose function, if…
-
1
votes2
answers54
viewsPassing values between screens
I would like a help, I’m new in android development and I’m trying to develop an app. Basically I will need 4 "screens" where the 1 is typed a value, goes to the next, in this "screen" chooses an…
-
1
votes1
answer350
viewsInvisible spinner in form
I’m developing a form where I added the spinner, the code went all right, I was able to add and get the selected item, the problem is in the visibility of the spinner. It only appears on the screen…
-
1
votes1
answer321
viewsAndroid app => Unfortunately name_project has stopped
I’m a beginner on Android and I’ve read some similar questions but I couldn’t solve my problem. While running my app gives error: Unfortunately project name has stopped. Mainactivity.java package…
-
1
votes1
answer374
viewsHow to make this Floatingactionbutton?
Hello, in my project I would like to be able to make a Floatingactionbutton that by clicking on it it deletes the background screen and displays above 3 more Floatingactionbutton with its respective…
-
1
votes1
answer490
viewsHow to close the keyboard?
When I step into this Fragment with the keyboard already open, it remains open, which ruins my layout, how to hide it or not open it?…
-
1
votes1
answer74
viewsImage framing
I’m trying to put a 704x480 image in an Imageview, but it’s floating with spaces above and below. Ex.: <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
-
1
votes2
answers467
viewsNav Header with login
I have the Drawer navigation menu and in the header part I have only one image. I would like to put for the user to perform a login. As kids I would like to leave as in the image below: I would like…
-
1
votes0
answers90
viewsScrolling effect with recyclerView
I am working on an application where I have a Fragment with a title and a recyclerView. This Recycler view is divided into sessions (example, pizza, soda), each session has a header and the items…
-
1
votes2
answers670
viewsHow to hide the background of images in the android studio app?
I’m new in programming I’m programming an app in android studio that is practically ready. When I copy it on my Moto G2 with android 6.0 works perfectly however when I copy on the Moto X1 android…
-
1
votes0
answers348
viewsHow to open an Imageview in full screen using Onclicklistener?
I have an app and would like to display an image in full screen. The screenshot below shows an application example. How could I put it in full screen, using onClickListener? And how could I do the…
-
1
votes1
answer82
viewsLayout is not adapting (XML)
Hello I’m having difficulty in a layout I’m doing in Android Studio, on my phone it is perfect, but when I pass it to my friend with a phone with much lower resolution, Edittext Message just…
-
1
votes1
answer201
viewsToolbar with two different colors
How to make a Toolbar with two colors in half, going from one color to the other?…
-
1
votes1
answer260
viewssoftkeyboard pushing layout up
Hey, guys, I got a problem, and I can’t fix it in any way. already tried adjustpan, resize.. anyway.. I have a layout with recycleview and edittext and a few more views.. when I click in edittext…
-
1
votes2
answers275
viewsSplit a layout into 2 with different percentages
Wanted to know how I do to share one layout in 2 with 70/30 percentage. I’ve devised a way to divide, but that way is not optimized for all devices.…
-
1
votes0
answers279
viewsAttribute drawableTint is only used in API level 23 and Higher
I’m trying to put a colorful icon on EditText but the Android Studio is warning that the attribute that colors the icon (android:drawableTint) is only supported in API's >= 23. What do I do to…
-
1
votes0
answers178
viewsCoordinatorlayout with Recyclerview in another
I have a Fragment with a CoordinatorLayout and a FrameLayout to popular with other Fragments. One of these Fragments contains a RecyclerView. I’d like to know how to do the RecyclerView work with…
-
1
votes1
answer292
viewsKeyboard does not override button in Relative Layout
Good morning, everyone. I have a problem in my application: I have a screen to register devices, as image below, however, when enabling a field for typing, the keyboard does not override the button:…
-
1
votes2
answers313
viewsStatus bar with three-color gradient in Android Studio
How to make a status bar with a 3-color gradient (as in the image).…
-
1
votes3
answers169
viewsHow do I identify the method or command in the code to display a data list in Navigationview?
I found this code on hithub about an embroidery viewer follows the project link, I tried to look in that app where is invoked method or command to display this data list follows screen prints to…
-
1
votes1
answer75
viewsshowing only part of the screen when the android keyboard is active
I have the following screen on android and would like that when the user clicked on one of editText, only the 3 fields (name, date of birth and phone) were shown at the top of the screen (above the…
-
1
votes1
answer48
viewsThe tab is going through the reset button
I wanted the tab to stop just below the FREE THROW buttons, not at the bottom of the screen. How Do I Fix So Design Is Responsive? Because the content gets messy when the screen is in Landscape…
-
1
votes1
answer258
viewsDefault color of app
Hello, I need to find how to set the default color of apps. It wouldn’t be the background or font color, it would be the same app color. For example: in led settings, have the option to show the led…
-
1
votes1
answer112
viewsSign in Textview - Android
I wonder if you have how to do the sign effect on a textview the text is too big, and I don’t want to break line, I want the text to move from right to left horizontally. The text I want to…
-
1
votes1
answer141
viewsAndroid Button below a fixed-size Viewpager
I’m creating a layout where I need a button below Viewpager, in this layout I also click tabs, as in the image below: What happens is that I can not leave this way without being fixing the size of…
android android-layout responsive-layoutasked 8 years, 3 months ago Renan Vinícius Quadros Barbosa 31 -
1
votes1
answer113
viewsHow to reuse a layout?
I want to create a screen with editorial menu, as I do to "reuse" a layout to have multiple essays and fewer layout files (xml).
-
1
votes0
answers46
viewsHow to leave two screens in an Activity, being able to exchange one of them via code
Good day, late or night!! I need to make a screen in android split in the middle, where the screen on top screen a video player, and the bottom a chat, where in a due event will be replaced by…
android android-studio android-layout android-activityasked 6 years, 1 month ago Jean Carlos Sampaio 11 -
1
votes1
answer183
viewsDoubt with correct dpi(dp) density
I am beginner in Android app development, and am with a simple question. The dpi numbers in the image below are also the maximum that an img can have in width & height(dp) in their respective…
-
1
votes1
answer179
viewsRemove Title from menu bar
Can anyone tell me how to remove the title from the menu bar? I saw some materials on the internet but all teach to remove the bar and I just want to remove the title.
-
1
votes1
answer389
viewsHow to place a button with static position on the scrollview
Greetings dear Developers. I have an Empty Activity with the entire screen occupied by a scrollview containing only imageviews and I need it to have at the top of the screen a button with a fixed…
-
1
votes1
answer626
viewsHow to change the font and color of the navigation Drawer side menu
Hello, I have a project created as DrawerLayout and would like to customize by changing the type of font, size and color. but I can’t. Change part to red.…
-
1
votes2
answers355
viewsValidate Edittext within Alertdialog
I have a AlertDialog and inside of it I have a EditText and need to validate and after validate run the method enviarEmail(), how do I do? Man AlertDialog : AlertDialog.Builder caixaDialog = new…
-
1
votes3
answers500
viewsAndroid - Remove White Space Between Recyclerview Items
I have a problem just like this here. I’m using the 'com.android.support:recyclerview-v7:28.0.0'. The XML is as follows, activity_main.xml, problem lies in the recyclerOverlay: <?xml…
-
1
votes1
answer27
viewsHow to change to property android:fontFamily="casual" in a textView dynamically?
I would like to know how to change the font to casual in my textView through java code. TextView text1 = findViewById(R.id.myTextView); I want to change the font from text1 to casual…
-
1
votes0
answers47
viewsTransform recorded audio into a byte array
Hello! I’m developing an app and I want the following: After the user records the audio, he clicks on a button that displays the byte array of the same. In fact, I need to see this vector, to then…
-
1
votes1
answer90
viewsListview and Imagebutton selector does not work
Both the button and Listview do not change when clicked, but the settings when the item is not pressed work. Listview: <ListView android:id="@+id/listaListas" android:layout_width="wrap_content"…
-
1
votes3
answers109
viewsI made a Splashscreen it carries and it does not go to the Activity prixima what should I do?
What I must do ? intro.java public class intro extends AppCompatActivity { protected static final int TIMER_RUNTIME =5000; protected boolean mbActive; protected ProgressBar mProgressBar; @Override…
-
1
votes1
answer205
viewsAndroid error - Must specify preferenceTheme in Theme
I created a layout (preferences.xml) in the res/xml directory based on Preferencescreen. I implemented a class derived from Preferencesfragmentcompat public class PrefsFragment extends…
-
1
votes1
answer102
viewsListview only appears when I click to close the keyboard
I do not know how to solve this problem, but the list-View does not appear when I do the search, it only comes when I click the button to close the keyboard, it seems that when I press the button it…
-
1
votes1
answer201
viewsInsert image in Listview via JSON + SQL
I created a code that perfectly brings the results via JSON from my database and fills my Listview with Strings, but I would like the database to bring the "image" column I created, the address…
-
1
votes1
answer33
viewsEdition in Listview
I created a separate xml to work better with Listview.. but I’m not able to relate his id to my onCreate XML: <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
-
1
votes1
answer1254
viewsChange Listview color when selecting
How can I change the color of a listview when selecting? below goes as is the stuck in my project: listDebitosPendentes.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override…
-
1
votes2
answers50
viewsLayout with listview questions
I’m facing a problem in layout, in this layout I have a Listview and after I have 3 more Buttons only when the list is too big it uses all screen size and I can’t see the Buttons, someone can help…
-
1
votes1
answer305
viewsElement fixed on top of the keyboard
I created a RelativeLayout property match_parent height so you can fill the entire screen. Inside it I insert a LinearLayout property alignParentBottom having value true to secure the element to the…
-
1
votes1
answer941
viewsAndroid - Imagebutton image is not displayed
I’m trying to put 3 Imagebutton on a Linearlayout. The background image I’m using are drawable images that I added by clicking on the following sequence in Android Studio (2.2.2): Right-click on the…
-
1
votes1
answer83
viewsListview Adapter problems with whitespace
I am creating a listview with adpater and I have a problem, I needed to add an image in the middle of the list to stay in the right corner, this image is only an arrow. how can I solve there it…
-
1
votes1
answer57
viewsApplication closing when consuming json
What should I do to fix this crash? My code: public class Tela1 extends AppCompatActivity { TextView textView2; String[] objetos = new String[0]; String url1 =…
-
1
votes1
answer60
viewsRemove selected item bottombar (Lib Roughike)
I have an application that uses Navigationview and Bottombar, I’m having a hard time removing the bootombar item selection when selecting an item from navigationView, I’m using the Roughike Library…