Questions tagged as 'android-layout'

2
answers

Why is the gravity attribute of the LinearLayout.LayoutParams object not working like the setGravity () method of View?

Problem I'm working on a UI library to android , where hedge the layout parameters ( height , width , weight and gravity ) dynamically via code in a LinearLayout.LayoutParams object but the gravity attribut...
asked by 27.03.2014 / 21:24
2
answers

Misaligned images

I'm using the following .xml as the main screen: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_p...
asked by 14.12.2016 / 18:53
1
answer

How to maintain the same layout for different versions?

How can I keep the layout of my apps for different versions of Android? Example: A EditText has layout in version 2.1 and another in versions 4.x, how to keep the layout of version 4 in previous versions? >     
asked by 06.11.2014 / 04:35
2
answers

How to apply attributes of a ViewGroup from parent to child in android studio?

How do children in a ViewGroup inherit an attribute from the parent? For example, I would like to set layout_marginTop="16dp" to all TextView daughters <LinearLayout android:layout_width="match_parent" android:layout_heigh...
asked by 27.10.2017 / 15:39
1
answer

How do I do the layout of an android app in Photoshop using PX if google just gives me DP?

I'm trying to draw the layout in photoshop, but I can not understand this story of DP in photoshop, in code okay, the compiler understands, but in photoshop I can only work on PX. Can anyone help me with this? Type, height of bar status or ac...
asked by 19.11.2014 / 11:56
1
answer

Layout Render Error

I used Android layout support, specifically Login Layout. When it was rendered this error appeared:    Exception raised during rendering: String In details appeared: java.lang.StringIndexOutOfBoundsException: String index out of...
asked by 24.03.2016 / 02:18
1
answer

Add layouts dynamically

I created an XML with LinearLayout, in it I have a Spinner and an EditText. On my screen I have a LinearLayout that should receive that other layout I created. My question is: how can I add this custom layout to my screen within the other lay...
asked by 01.03.2014 / 18:37
1
answer

Apply Material Design (android: Theme.Material) for Android versions smaller than API 21?

I was studying a little bit about the Android layout guidelines like: Colors ; Material design ; And how to implement these guidelines ; So I tried to customize my theme , like this: <resources> <!-- inherit from the...
asked by 08.04.2015 / 21:32
2
answers

How to change the color of StatusBar?

How do I change the color of this part of the app? I wanted everything from the same green color like this one down.     
asked by 07.07.2017 / 14:47
1
answer

AlertDialog Android "comment" PopupMenu

How do I get this result? The3dotsinthisimagehavealreadybeenpressed.Mylayout<android.support.v7.widget.CardViewxmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:to...
asked by 13.02.2017 / 23:45