Questions tagged as 'android'

2
answers

Show more than one item in a Listview item

I need to show 3 fields of a table of a BD within a item in a Listview , what I have so far is that it shows the data but in different items . Any ideas on how to include everything in a single item? jsonArray = new JSONArray(resul...
asked by 12.01.2017 / 14:41
1
answer

Search for a field in the realm database

Someone knows how to perform a query in Realm where the entire table was scanned and the tuples were taken where the name of a field corresponded to the one I have. That is, if we have a database of a library, and we want to take users with a...
asked by 16.04.2018 / 08:06
2
answers

problems perform cast kotlin on "android"

I'm trying to do "castings" in android kotlin mendiante, as I did a couple of months ago ..... but I always get an error, do you know if it's a bug? So far I was casting this guy and they worked for me var variable1:Int=12.11 as Int var var...
asked by 10.06.2018 / 16:26
3
answers

Can you split a String by a String string with a structure?

I collect the data from an xml that has 200 elements and within those elements is the date of each one, being its structure like this: 2018-05-04 00:00:00.0 2018-02-02 12:00:00.0 But for example there are others who instead of having on...
asked by 08.05.2018 / 10:25
1
answer

Any other way to code Base 64 on Android?

java.util.Base64 I want to encode the password to base 64, but I only found that class to code and decode, the problem is that it is only compatible from API 26 and as a minimum compatibility I use API 21     
asked by 02.05.2018 / 16:15
1
answer

Android: Error in requestAudioFocus ()

Create this class to play a sound file on android: link The problem is that when running this application on my cell phone it stops instantly. When reviewing the logcat it appears this error. Using the android studio debugger I was abl...
asked by 27.05.2018 / 16:30
2
answers

How to combine two integers and one text string?

Currently I have the dilemma that I want to do a certain operation with different basic math signs (add, subtract, multiply etc.). But I want the sign to be the only one that changes when doing the operation: Previous code resultado = resul...
asked by 12.10.2017 / 19:14
1
answer

Switch where the case is the value of a cycle for

In my application I have implemented a button where pressing it shows a dialog with options to choose. These options are dynamic, that is to say, they are never going to be the same amount of options, because this makes it difficult for me to de...
asked by 04.02.2018 / 23:18
2
answers

How to get a time range comparing two dates in Android?

Good afternoon friends. What I want to do is get a time range, comparing 2 dates for example: //Ejemplo simple String fechaInicial: "03/09/2016 12:00" String fechaActual: "03/09/2017 12:00" And what I want to get is for example, this is...
asked by 03.09.2017 / 22:49
1
answer

How to load my DatePickerDialog in Android 24-hour format?

How can I improve the following code that I will share so that when I click on a button I will load the DatePickerDialog in 24 hours format if or yes, since at the moment it loads me in the format that the user has configured in his system, eith...
asked by 31.08.2017 / 18:00