Questions tagged as 'android-layout'

2
answers

Problem displaying layout on multiple devices

I'm having a hard time putting together a layout. In the emulated it gets the way I want as below: Butthecellphoneiscompletelyunconfiguredasbelow: XMLCode:<?xmlversion="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://...
asked by 26.08.2015 / 00:07
1
answer

How to add a border in a TextView by code?

I'm doing a dynamic form and would like to add an embroidery around a set with a TextView and an EditText like in the code below: TextView tv = new TextView(this); tv.setText(vet[0]); EditText et = new EditText(this);...
asked by 17.07.2015 / 21:14
1
answer

How to make a Floating Action Button?

I'm developing an Android application, would you like to know or some example to include a Floating Action Button? This Button Floating Action Button would be a shortcut to an action on the system, in my case it would call an activity. This b...
asked by 19.08.2016 / 18:57
1
answer

Layout Alignment Between Class Swapping - Android Studio

I'm implementing a program that uses database and interacts with different layouts of entries and editing users. I'm working with RelativeLayout on all screens. In one of the layouts , I enter a perfectly aligned button...
asked by 18.02.2015 / 01:00
2
answers

Layout of images dynamically after photo is captured

How do I create a layout exactly like this (The layout is the same as the left and the right): I will explain how I intend to do this and if possible help me because I do not know how to do this: I'm browsing in my app and pressing a b...
asked by 08.05.2014 / 16:49
1
answer

Prevent repeat animation by changing device orientation

I'm working on a screen that contains an animation that is repeated every time the screen is rotated. I looked for but I did not find any precise information on what I need to do so that the animation does not repeat itself when changing the ori...
asked by 16.06.2014 / 07:24
2
answers

How to leave the fields with the same style?

I do not like to keep repeating code and I believe there is a way to leave, for example, two fields or more with the same formatting style: Below I have two EditText they have something in common, like the left and right margins and th...
asked by 23.06.2014 / 21:17
1
answer

How to change two place buttons?

I'm developing an Android application that's basically a game. In one of the Activities there are a few buttons, and I wanted that when one event occurred (it could even be the trigger of another button) two buttons changed position in the layou...
asked by 01.04.2018 / 18:56
1
answer

Remove an ImageView

Is there any way to remove an image in an ImageView or leave it empty via code? For example: I "hedge" img1.setImageResource(R.drawable.icon_circpreto); How do you remove it via code?     
asked by 31.10.2017 / 04:52
3
answers

Position Button in the center of a LinearLayout with layout_gravity

I would like to know why I can not center the button, I would like to center vertically and horizontally, but it seems to me center only centered horizontally on vertical layout and vice versa. <?xml version="1.0" encoding="utf-8"?> <...
asked by 03.02.2018 / 15:09