Questions tagged as 'android-layout'

2
answers

How to divide a TableRow into two equal parts?

I am working a screen that will be a menu, there will be 4 options and I am a TableLayout and in a TableRow I have put two buttons, the situation is if there is a way to divide is TableRow in two equal parts, is that it gives the impression of h...
asked by 28.03.2018 / 08:22
1
answer

Intermediate photo in a TextView without cutting the text in two

How can I place text around elements in Android Studio to look like this: Or with the intermediate text without having to chop the text in two like this:     
asked by 11.12.2017 / 18:28
2
answers

Launch Window from the Android background

I am trying to launch a window when an action is executed on my app. The problem of this scheme can sometimes be executed in the background, which is why sometimes I will have to launch it without an activity: I am running this fragment: pu...
asked by 16.02.2017 / 15:38
2
answers

program my content on a 3.2 "mdpi screen and I realize that there is another 5.1" mdpi and its content looks small?

program the content of my app for a 3.2 "mdpi screen and it fits well, but when changing the view mode to a 5.1" mdpi it does not fit, help with this problem. 3.2 "mdpi 5.1 "mdpi     
asked by 27.01.2017 / 05:36
2
answers

Resize icons / images according to screen resolution in Android

I have a main screen in my application that shows a DashBoard. In it there is a container where I have 6 icons, which are buttons to access other activities. I need the margins between the edge of the container and the icons to be 25dp,...
asked by 14.09.2016 / 17:25
2
answers

how can I control the volume with the android screen?

Hello, my friends, programmers, how are you, I hope very well I have a problem with an app I'm doing for the University which has to control the volume by means of the screen, that is to say that if I press the screen up or down the volume of...
asked by 18.09.2016 / 23:31
2
answers

Convert dp to reverse pixels on Android

I need to convert dp to pixeles and pixeles to dp in Android Java. I get the width of the screen of the device, I return a value float that is in dp public static float getWidthDeviceDP(Context cont...
asked by 08.07.2016 / 20:31
1
answer

Problem of Positioning Buttons in Android Studio dynamically created

I have a database and based on this I create buttons with a name, but I can not find a method that puts one button under another.  I know it can be done in the .xml with the layout_below="" but dynamically I do not see a method to position them...
asked by 12.11.2018 / 02:37
2
answers

Remove items from a Linear Layout Android Studio

I have a Linear Layout in Andorid Studio and I want that by pressing a button all the elements it contains are deleted. This is the code that I have, it deletes the elements correctly but when in the same app I reinsert other elements dynamicall...
asked by 03.11.2018 / 22:01
3
answers

How can I stop (stop) a location event on android?

Good evening thank you very much for answering, I would like to know how I do so that only once that event happens ok I mean the AddOnSuccessListener event ok here I put the code. mFusedLocationClient.getLastLocation() .addOnSuc...
asked by 01.09.2018 / 04:12