Questions tagged as 'android-layout'

1
answer

List within the Spinner Layout

Hello, I would like to know if you have how to put the list that is inside Spinner directly in the layout. I usually do this: horario = new ArrayList<>(); horario.add(""); horario.add("Aberto Hoje"); horario.add("Não impo...
asked by 06.12.2016 / 03:36
2
answers

Show all content of a layout in the preview of Android Studio

Hello, I would like to know how (if possible) to show the entire contents of a layout in the preview of Android Studio. Here is an example image: The blue marking is a button that is in the layout, but I can not manipulate or prev...
asked by 08.08.2016 / 23:21
1
answer

Error "Element linear layout must be declared"

I'd like an orientation, please, I'm a beginner in Android Studio. I have searched in many forums and many searches and found no solution for days. When I create a file inside the drawable folder the following error occurs:    Element li...
asked by 03.08.2016 / 15:27
1
answer

Split widget on screen

I want to split two widget within LayoutLinear , both TextView . If I use "orientation=" horizontal " and TextView use the android:layout_weight="1" attribute, the widgets are split on screen at a 50% one! So my question is:...
asked by 30.06.2016 / 04:44
2
answers

How to use ScrollView and LinearLayout with full screen height?

I have my code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tool...
asked by 15.10.2016 / 02:27
1
answer

Enable ListView

When I enter a ImageButton in the layout of my ListView , it is no longer possible to click the ListView , that is, the click is disabled. Is there any way to enable ListView when you have a ImageButton inserted...
asked by 09.09.2014 / 21:35
1
answer

NavDrawer using activities instead of fragments

I'm trying to deploy a NavDrawer in my app but # Part of the code that uses Fragments: private void displayView(int position) { // update the main content by replacing fragments Fragment fragment = null; switch (position)...
asked by 24.01.2015 / 02:48
1
answer

How to create browser tabs in Android Studio

Hello, I'm creating a browser for Android using Android Studio I'm trying to create a resource that has in all browsers that are multiple tabs like Google Chrome, but I'm out of luck and all my attempts are failing, does anyone know how to create...
asked by 10.04.2018 / 02:59
1
answer

Center image in the middle of the Android screen

How do I align an image in the center of the screen on Android? I'm using the code below but it gets centered at the top of the screen: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk...
asked by 29.01.2018 / 12:59
1
answer

image view and text view side by side in linear layout

I have to put the image and the text side by side but I do not know how to do it, my code for now: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/a...
asked by 20.10.2017 / 02:20