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
answer33
viewsSave values and make a comparison
I’m having a hard time making a comparison logic or something better that you can point out to me. I’m developing an app that contains several buttons in mega sena game format. I need to make sure…
-
1
votes1
answer427
viewsHow to send data between Activitys without opening another window? Android Studio
Good afternoon gentlemen, I have a question in my code, I need to pass the data from one Activity to another but when I put the value it opens the same screen twice, it is working but when a value…
-
1
votes1
answer525
viewsCreate a fullscreem and untitled splash
Hi, I’m initiating on Android Studio, and I’m having a question. How to make my splash stay with the image in full screen and without the title bar? My image PNG has 750 x 1334. Follows my code:…
-
1
votes1
answer212
viewsHow to Make Dynamic Tablayout in Android Studio
I created a tablayout in my application, I need that by clicking on one of the menu options, it automatically takes the 0 position. Where the house would be would be an icon to return and the others…
-
1
votes2
answers331
viewsWhite screen before splash screen startup
I created a Splash Screen that works normally, but when opening the application instead of directly entering Splash, it runs a white screen. Splash.xml <?xml version="1.0" encoding="utf-8"?>…
-
1
votes1
answer159
viewsjava.lang.Classnotfoundexception: android.support.v7.widget.Toolbar
OFFICIAL ANDROID DOCUMENTATION ABOUT TOOLBAR I’m following the official documentation of Android, and even so I’m having problems as it generated this error. Caused by:…
-
1
votes0
answers98
viewsQuestions about using Appbar + Toolbar + Fragment - Android Studio
Hello, I have prior knowledge of Java but I’ve just started programming for mobile on Android Studio, someone would tell me if there’s any way to use Appbar + Toolbar (for the sake of design itself,…
android android-studio android-layout android-activity android-fragmentasked 4 years, 8 months ago Davi Massini 26 -
0
votes1
answer3255
viewsChange custom spinner selector
I created a custom spinner and a custom dropdown spinner, when using them, the selector is almost invisible and its color also does not help. I wanted my spinner selector to be bigger, it could be…
-
0
votes1
answer212
viewsAdded components in Xamarin Studio 4.x/5.x and Android Designer
When using the Xamarin Studio 4.x/5.x Designer Interface tool on the Windows 8/8.1 platform I cannot add components on the screen, when trying to drag and drop a component from the toolbar to the…
-
0
votes1
answer945
viewsAndroid Gridview Layout
How to place lines between cells in a gridview. So that it doesn’t look like the items are floating. Example as columns and rows of an excel and if it is possible to change the color of some cell in…
-
0
votes1
answer34
viewsALIGN_BOTTOM in relation to the Parent class
I need the menu to stay ALIGN_BOTTOM compared to my Appbar, but the code below does not work. public class AppBar extends RelativeLayout { public AppBar(Context context) { RelativeLayout menu = new…
-
0
votes1
answer280
viewsAndroid: Align Parent Bottom + Bottom margin programmatically
Does anyone know how I can programmatically add a Relativelayout aligned at the bottom of the parent and include a margin or padding at the bottom of that same Relativelayout? Ex.:…
-
0
votes1
answer965
viewsAdmob - Problems with Ads in APP
I did everything as ADMOB site tutorial says, I put the layout in XML, imported the path from Google Play Sevices and added the tutorial code lines, my application compiles, but no longer opens on…
-
0
votes1
answer1916
viewsAndroid: How to update Actionbar and Drawerlayout title and items at runtime?
I need to update the Actionbar title and each of the Drawer menu items with the runtime language change. I use the following code to change the language of my application but I cannot change the…
-
0
votes1
answer126
viewsRemove Actionbar Tabs indicator on Android
For default Actionbar tabs comes with the blue indicator (how much is selected) and my question is how do I remove this blue indicator. I intend to use icons in these tabs, but as it is shown the…
-
0
votes1
answer151
viewsEnable click on Listview
When I insert a ImageButton in the layout of my ListView, it is no longer possible to click on ListView, ie, the click is disabled. Is there any way to enable the click ListView when you have a…
-
0
votes1
answer656
viewsHow can I within a class extending from Broadcastreceiver make any changes to the graphical interface?
Having an Activitymain(inherits from Activity) calls a broadcast, and then the Broadcast class is started. But when performed some action in this broadcast I want to change information from the…
-
0
votes1
answer1383
viewsWhat tools (Apis, libraries, frameworks) are needed to create graphs and reports?
I’m wanting to take data for example from a database and develop charts of this type, follows the figure below: If possible in various formats in pizza, in bars etc. And then generate a report of…
-
0
votes1
answer495
viewsResize table layout according to screen orientation
I’m a little lost in mounting my screens on Android, I’m not able to make the elements fit the screen dimensions. I put fill_parent in the tablerows and in the elements within it, but the editTexts…
android-layoutasked 10 years, 5 months ago Vinicius 304 -
0
votes1
answer166
viewsHow to add an Imageview to a Relativelayout on a runtimer?
How do I add a ImageView at run time to LinearLayout or even a TableLayout?
-
0
votes1
answer492
viewsChanging the title color of my application
I have tried various codes to change the color of the title that is in the application’s actionbar, but nothing, I think it’s simple, but I can’t figure out how. use the "Theme.AppCompat.Light"…
-
0
votes1
answer701
viewscolor/opacity in selected view
I implemented a Navigation Drawer (no modifications to the Android Developers example) I only changed the background colors of Listview and Text of the items: layout/activity_main.xml:…
-
0
votes1
answer1646
viewsCreating a customized and animated toggle
I am creating an app for Android in which I am using a ToggleButton as one of the interface elements. I am trying to make it have images instead of the button itself and there is a transition…
-
0
votes1
answer484
viewsSetting a view at the bottom
Currently I use this code to put Adview in the Bottom, but when adding a Scrollview, it is fixed at the bottom of the list and not at the bottom of the screen. -- <RelativeLayout…
-
0
votes1
answer1521
viewsHow to take the margins of the Android layout
I want to remove those marginsazul for my line verde catch the layout and not be left with any margin, but without removing the padding of RelativeLayout It is the Actionbar vermelho who is with a…
-
0
votes1
answer114
viewsError reopening Map in Fragment inside Drawerlist
I’m developing an Android app and I’m having a navigation problem between Fragments. I created a drawerList and in it I have some Ragments, in one of these Ragments I have a map, when I initially…
-
0
votes2
answers758
viewsUpdate layout from a button
On the main screen of my app there are two buttons, an arrow to the right and another to the left symbolizing the previous and next months, in them I call an index to reload the page with the values…
-
0
votes0
answers267
viewsImageview Android Responsive for all devices
I have an Imageview and the problem is this: On smaller screens the image gets too big; on larger screens, it gets too small. I’ve made the folders hdpi, xhdpi and similar, but no good, I wanted to…
-
0
votes1
answer2514
viewsHow to create buttons with dynamic size in XML?
I am creating a calculator for android with only the basic functions same. For this I am writing the Layout code directly in XML, however I can not make the buttons grow and occupy the screen both…
android-layoutasked 10 years, 2 months ago paccamicio 163 -
0
votes0
answers401
viewsMy Android app doesn’t update on the device test
When I test the app on the emulator, it displays normally, the way I programmed it. But when I move to the phone, it displays a layout that I have changed completely, IE, it is defecated and it…
-
0
votes1
answer306
viewsGoogle Maps Navigation Material Design
Someone knows reference material to develop an Android app similar to the new Google Maps navigation and animation format? The idea is to position the Marker Infowindow in the region below the…
-
0
votes1
answer191
viewsHow can I make this layout?
How can I make this layout? Above is the image, below is a testo box. In the middle is the problem, are 3 buttons and 1 progressbar…
-
0
votes1
answer369
viewsAdd imageview and break line
I have an image set in my folder assets, but the quantity will always be changing, so I need to add a ImageView via code. But since I don’t know how much, I don’t know when they’d come out the…
-
0
votes1
answer538
viewsHow to compose a Linear Layout in Activity using JAVA only
In my application has a vertical linear layout with id: @+id/items In this layout for each item contained in a list, I would like to create another horizontal Linear Layout called, Row containing 2…
-
0
votes1
answer99
viewsProblems when defining the layout
I am unable to make you accept this layout definition regarding the size of the Web View: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
0
votes1
answer56
viewsAndroid Problems with R
All Layouts of my project are not accepting to be called in Android Studio. What can I do?
android-layoutasked 9 years, 6 months ago Gabriel Manuel 153 -
0
votes1
answer94
viewsHow to add Toolbar and Viewpager in the same Layout
When adding both components in layout XML I get the following error in the Viewpager starting line: error: Error parsing XML: unbound prefix Layout: <?xml version="1.0" encoding="utf-8"?>…
android-layoutasked 9 years, 11 months ago caezar 481 -
0
votes1
answer752
viewsActivity background image distorts when you open the keyboard
I’m developing an app that has a background image of the image. But every time I open the virtual keyboard to fill a field, this image is flattened. How do I make it not happen?…
-
0
votes1
answer198
viewsHow can I switch tabs using a spinner?
I would like to implement the tabs change by a spinner I added inside Toolbar. public class MainActivity extends FragmentActivity { /** * The {@link android.support.v4.view.PagerAdapter} that will…
-
0
votes2
answers424
viewsGreater space between spinner items
I’m creating an app that has spinner, but when opening the items are always glued together, I wonder if only by custom spinner I can give space or there is some style/theme that already has these…
-
0
votes1
answer858
viewsMaterial style button bar layout
I’m trying to create a button bar at the bottom of the screen ("Cancel" and "Save" buttons similar to the one used by Google Drive: However, nowhere in the Material guidelines have I found anything…
android-layoutasked 9 years, 10 months ago Renan Lazarotto 1,025 -
0
votes1
answer180
viewsNavdrawer using activities instead of Fragments
I’m trying to implant a Navdrawer in my app but the example that I saw uses Fragments instead of Activity that I was already using, I found a block that deals with the Fragments. Part of the code…
android android-layout android-fragment android-activityasked 9 years, 10 months ago Allan Chrystian 483 -
0
votes0
answers43
viewsEclipse project error: "no Resource round that Marches The Given name"
I created a project in eclipse but has an error in Mainactivity.java, in class R, in folder res>values>Styles, already dei clear. Error: no Resource round that Marches The Given name '…
-
0
votes1
answer167
viewsHow to use a UI kit (PSD) in an Android application?
Hello! I recently came across several UI kits for Android made in Photoshop (PSD). How do I use them in my application? For example, I have this kit:…
-
0
votes3
answers2523
viewsProgressbar does not change color
I have this problem of changing colors. Code: <ProgressBar android:layout_width="wrap_content" android:layout_height="wrap_content" android:indeterminateTint="#00bfff"/> Appears to have…
-
0
votes1
answer293
viewsList View and Normal Layout in an Activity
Hello, I’m wanting a screen to have a button and, below that button, a list with several items. But it turns out that the buttons are multiplied. Behold: Activity.xml <?xml version="1.0"…
-
0
votes1
answer475
viewsHow do I change the color of cardview after a longclick on it?
How do I make it happen? I would like to after a longClick in the cardview the color of the same change indicating which or which ones I selected! public static class ViewHolder extends…
-
0
votes1
answer163
viewsHow to put the weight percentage of 2 Edittext fields via code without using xml?
I have two Editext fields, name and age I need the name field to be 70% of the line and the age to 30%, in xml it’s easy to solve this, but in Java code I’m not getting, does anyone know how to do?…
-
0
votes1
answer425
viewsEmpty drawable folder Android Studio - None of the resolution options appears
I created a new project in Android Studio Version 1.3.2 and it does not appear any of the folders that specify the resolutions corresponding to them ex: Drawable-hdpi, Drawable-ldpi. I’ve changed…
-
0
votes0
answers83
viewsActivity with bug that is breaking the layout
There is an Activity that gives a bug once in a while, it gets the appearance of the image I posted, then when I click on it, it goes back to normal, but this is random, there are times that do not…