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
votes0
answers130
viewsHow does one Fragment call another Ragment method?
Hello, how can I call a method that is in another Fragment through the android:onclick =""
-
0
votes1
answer255
viewsAfter changing Navigation Drawer icon it no longer opens
I customize that icon from the side menu and put an icon of mine. Follow the image: Problem: When I click on the Icon, it no longer opens that menu on the side. Follow the code I used to change the…
-
0
votes1
answer57
viewsHello World differs on Android Studio version
I was watching a video class of a guy who was using Android Studio version 1.3. As much is generated, he was just taking away what was not necessary. I was doing this process, but I realized that…
-
0
votes2
answers39
viewsFramelayout does not show my Textviews
Man Framelayout out of nowhere bugged and is no longer showing the data received from Json in my Texview on the part of Header. Even if I add a text it shows nothing. XML: <FrameLayout…
-
0
votes1
answer122
viewsHow to add Shadow effect to a Framelayout?
I’d like to add an effect shadow which results in a bounce of the screen, like this below: Google image: Code <?xml version="1.0" encoding="utf-8"?> <RelativeLayout…
-
0
votes0
answers29
viewsHelp with sql server and android dats
I have this code to do a search to SQL Server database but give me error: Incorrect syntax next to '19' Here’s the search code: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd…
-
0
votes1
answer587
viewsAdd image to a collapsingtoolbarlayout
I would like to add a background image in a CollapsingToolbarLayout following this example: I tried it this way: <android.support.design.widget.AppBarLayout android:id="@+id/app_bar"…
-
0
votes2
answers27
viewsI can’t add items to scroolview
I’m using this scroolview but I need to put new items underneath , and when I roll down it doesn’t come down, could you help me? follows xml code : https://pastebin.com/x6aVUjr…
-
0
votes1
answer231
viewsHow to create a Cardview like Google Play
Good morning, I’m looking to create a layout like Google Play, but I’m not sure how to design it. Could help me? https://i.stack.Imgur.com/Xw2wt.jpg Link to the XML code…
-
0
votes1
answer70
viewsjava.lang.Unsupportedoperationexception: Can’t Convert to Dimension: type=0x12
<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" …
-
0
votes0
answers42
viewsCan’t Convert error to color: type=0x2
In Xamarin, when debugging the application, this error appears Can’t Convert to color: type=0x2 in the method SetSupportActionBar(...); Excerpt: Android.Support.V7.Widget.Toolbar myToolbar =…
-
0
votes2
answers100
viewsScroolview passing the Toolbar
I’m trying to create a registration screen with a Scroll, with a Scroll. However Scroll is overwriting the Toolbar. I tried to put the attribute…
-
0
votes0
answers622
viewsDisfigured layout in android Studio
Good night! I’m starting my study with Android Studio. I set up my layout but when I simulate it in the simulator of Android Studio, it appears all disfigured.…
-
0
votes1
answer313
viewsEdittext with same size Android
I’d like to leave my components <EditText/> the same size but I’m not getting it. <?xml version="1.0" encoding="utf-8"?> <ScrollView…
android android-studio android-layout android-fragment android-activityasked 7 years, 2 months ago User1999 864 -
0
votes1
answer55
viewsCan the user change colors of the already compiled application?
I’m thinking about creating an app where the user can change their Layout colors as they wish with predefined colors, but I can’t think of a way to do that, if that’s possible. Someone has something…
-
0
votes0
answers528
viewsmake Scrollview scroll down automatically
hello, I have a chat application but as it goes with messages the user is obliged to see tds messages typed from the first, he should scroll the bar until the end to see the last message, already…
-
0
votes1
answer89
viewsandroid studio misalignment login form
I created a login screen in android studio, and I leave everything aligned in the center of the cell screen, but when I run with Avd or genymotion, he plays the form everything to the corner,…
-
0
votes1
answer80
viewsProblem adding spinner to my form
I am developing a form where I want to add the spinner, but when I add it in the xml file, nothing appears on the screen, only the box marked as you can see below: I already added my spinner options…
-
0
votes1
answer334
viewsText inside cardview by half
I wonder how I put the text inside a cardview higher. In my code it’s like this: <android.support.v7.widget.CardView android:id="@+id/card_view8" android:layout_width="fill_parent"…
-
0
votes1
answer239
viewsHow to make different versions of an image for different screen densities?
I have an image that will be placed inside my app (just an example), how can I make a version hdpi, xhdpi, xxhdpi, etc of it? I know I should put in the respective folders, but when I only have one…
-
0
votes1
answer1098
viewsAfter removing app:layout_behavior="@string/appbar_scrolling_view_behavior" unlink from top
When I remove the app:layout_behavior="@string/appbar_scrolling_view_behavior" from my screen solves the problem of the position of the setError. However cause another, after doing this it is no…
-
0
votes1
answer29
viewsRemove gradient
In my side_nav_bar the staining is defined as gradient: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:angle="135"…
-
0
votes1
answer73
viewsHow to have a layout adaptable to all screens?
I wanted more or less this format however, when I will fill the last editext, goes up the keyboard and comes out out of order. <RelativeLayout xmlns:tools="http://schemas.android.com/tools"…
-
0
votes0
answers48
viewsImproper space in the layout! how to solve?
Appeared an improper space in the android project... How can I solve? <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"…
-
0
votes0
answers56
viewsCreate xml elements inside the activity_controller
I have a program that has a dropdown with 3 options. (Option 1 has value 1, Option 2 value 2 and option 3 value 3). Depending on the selected option, I need to create Textedits below this dropdown.…
-
0
votes1
answer285
viewsInsert button dynamically in Relativelayout
I have a Listview and I want to add a button next to each item in the list, but it has to be dynamically: item_listview.xml <RelativeLayout…
-
0
votes1
answer162
viewsScroolview problems in Android Studio
Good morning, I’m new in Android programming and I’m trying to create a program that based on a subject that the user chooses, will open a certain screen, everything I’ve been doing was based on…
-
0
votes0
answers319
viewsProblems with Scroll View, how to solve?
Good morning, I’m new with Android programming and I’m trying to develop an application in which, depending on the subject that the user choose will open a certain screen, but every time the…
-
0
votes1
answer28
viewsWhich view was used in this layout
Guys I’m creating an app that the person makes a registration,and in this registration has name,photos and various information and I wanted to list this information and photos like this,someone…
-
0
votes0
answers39
viewsAndroid Listview - item selection/unselection
I have an application that has a custom Listview. When you click on an item in this Listview, the background color changes to indicate that it is selected. In the same Activity I also have an…
-
0
votes1
answer117
viewsBest dimension to put in the background Android app?
I developed a splash for an android app and included a background image via the command: android:background="@drawable/bg16" The image appeared, but due to its dimensions, it was somewhat flattened.…
-
0
votes0
answers35
viewsProblem in the Fragment
I have a class that uses fragment, but I’m having trouble calling one of these activity. When I do it for my own App. I want to click on the fragment MsgFragment. Below follows the main class and…
-
0
votes0
answers30
viewsHow to make layouts for different device resolutions?
Good guys, I wonder how I do to create layouts for different screen sizes (small, normal, large or xlarge) in the same project in Android Studio? I do the layouts in the same directory: "layout" or…
-
0
votes1
answer185
viewsExpandablelistview - change background color of header title group
I need to change the background color of my Expandablelistview header group to a green color. Anyone have any ideas? Expandablelistadapter public class ExpandableListAdapter extends…
android android-layout android-fragment android-activity android-adapterasked 6 years, 8 months ago Wallace Baldenebre 114 -
0
votes2
answers72
viewsTablelayout Android does not beat
This is the layout I currently have: And this is the code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
0
votes1
answer54
viewsChange visibility
How do I change the visibility of a layout that is in another Active? I want to do this by clicking on an image.. I know how to use the method onClick. only lack the imagination of how to change…
-
0
votes2
answers132
viewsDynamic button layout in Android Layout
I am developing an application that needs to have a series of custom buttons on the home screen. The amount of buttons that will be displayed will be configured. Having this information at my…
android-layoutasked 6 years, 7 months ago Leonardo Paim 1,061 -
0
votes1
answer103
viewsHow to create browser tabs in Android Studio
Hello! , I’m creating a browser for Android using Android Studio I’m trying to create a feature that has in all browser that are the multiple tabs like Google Chrome, but I’m out of luck and all my…
-
0
votes1
answer170
viewsError "Element linear layout must be declared"
I would like a guidance for kindness am beginner in Android Studio. I searched many forums and many searches and found no solution days ago. When I create a file inside the folder drawable following…
-
0
votes2
answers1328
viewsProblem dragging components in Android Studio
I’m starting to use android studio today, this blue box on the right layout side ta? And every time I drag components into the middle, the button goes up by itself, but the button checkbox is still…
-
0
votes2
answers78
viewsCreate frame for item list
I need to create a frame for a listview item but I have no idea how to do this…
-
0
votes0
answers151
viewsAdd login to android project
Guys sorry if this is too trivial, but I’m starting to study android, I have an example project that you add note and edit them, this project is already working with this mainActivity: public class…
-
0
votes1
answer271
viewsCardview inside a scrollview
I’m not getting the scrollview to work on my cardview.... Since scrollview works with a single child, I changed the main layout to Scrollview and created a linearLayout to encompass the rest within…
-
0
votes1
answer596
viewsAndroid - Recyclerview with white spaces between items
Recyclerview is showing large white spaces in the layout. Note: When you start scrolling down, items appear normally, but when you go back up, you start displaying large white spaces between items.…
-
0
votes2
answers465
viewsComponent ID does not appear in Mainactivity
The problem is this, I add a component in my Activitymain, a button for example, but when I go to do the findviewById(ID) of the component, it does not show his ID in Mainactivity, it was working…
-
0
votes1
answer542
viewsListview with dynamic height(without scroll)
Considering the following structure: Listview (1) > Adapter (1) > Listview (2) > Adapter (2) I need to place a listview inside an Adapter, and in that list view there may be several other…
-
0
votes1
answer452
viewsScrollview with Relativelayout
How do I make for the RelativeLayout occupy the entire height of the screen inside the ScrollView? (tried wrap_contet but as I have advertised Admob she gives error with the button) Code: <?xml…
-
0
votes2
answers40
viewsHow to avoid layout destroyer in Tabbed Layout when changed tab?
I am making a system with tabbed layout and with Recycler view, in the first tab are the products, I click on a place the quantity and it marks the product. When I go to the third tab, the marking…
-
0
votes1
answer79
viewsChange Textview from one tab to another in Tabbedlayout
I am using Tabbed Layout ("activity_carrinho"), and have three separate Ragments for each screen, fragment_product, fragment_client and fragment_payment. As it needed the screens to remain intact…
-
0
votes0
answers39
viewsAlertdialog for selecting Numbers
I’m trying to make a Alertdialog or something like that that solves my problem. The point is, I need something similar to the photo, where I can use the numeric value that is selected. Maybe I’m not…