Questions tagged as 'android'

2
answers

Problem when counting with decimals on Android

I want to get 5% of any number and it has occurred to me in the following way: public class Main4Activity extends AppCompatActivity { EditText uno; TextView tres, tresinvisible, multiplica, divide, haciendocuenta, haciendocuenta2;...
asked by 18.05.2017 / 02:02
2
answers

Up and down volume of an audio channel with the physical buttons on Android

I would like to synchronize the physical buttons of volume up and down synchronized with a specific audio channel. When clicking, the dialogue of the image will be shown, with the seekbar icon and increase or decrease the volume.     
asked by 15.05.2017 / 15:40
2
answers

Get ViewPager index displayed on Android screen

I have a ViewPager located at the bottom of my app, and I'm trying to get its index, id or any reference to the ViewPager that is displayed on the screen so that depending on which is displayed, the button they share makes an action u another in...
asked by 25.05.2017 / 10:20
2
answers

problem when running apk on cell phone

You see then I have the following code and I just started on this android, well I have a problem running the app on my cell phone (it says that it has closed unexpectedly), which I can not find the error because in the emulator of my laptop runs...
asked by 25.05.2017 / 06:31
5
answers

List view shows only one result

I'm creating a listview with Realm and it only shows the first result. With debugger I have seen that the variable position does not increase in value and the one covered by the List is always with the same value. In the s...
asked by 14.05.2017 / 11:08
1
answer

Is it possible to deactivate the gps to reduce the battery consumption in an app?

I am using the GPS in my application to define the exact location of Smartphone , ( latitud and longitud ), coupled with this I receive the coordinates in a Geocoder to get the name of the street according to the...
asked by 10.07.2018 / 22:22
1
answer

Assign different actions to a Floating Button on Android

I have a FloatingActionButton general and 3 Fragments that are loaded with a ViewPager Following the Google Design Guide , show that FloatingActionButton is in parent and not in each fragment video: lin...
asked by 21.07.2018 / 11:21
1
answer

How to detect the user's language and do one thing or another?

I just need to know if it's English go to url2 and if it's Spanish url. I have some layout with strings in Spanish and English and I know how to use them so that it comes out depending on the language of the user, but being a URL, I am not able...
asked by 05.02.2017 / 10:09
1
answer

SQLite and listView does not list

It shows me the following: And the logCAT: The app consists of showing the business of my town in a listView. The Business class I have the getter and setters methods. I have the class: public class NegociosDBOpenHelper...
asked by 15.10.2018 / 16:26
1
answer

Save images in SQLite? [closed]

I wanted to know how to save images (business photos) in the SQLite database. I'm with an app that shows all the businesses in the city where I live. This is the code that creates the table: public static final String TABLE_CREATE =...
asked by 17.10.2018 / 18:12