Questions tagged as 'android'

1
answer

Duplicate focus when using requestFocus in an EditText

I created a screen with 2 EditText fields, one with numeric entry and another text. What I want is to perform a validation in the first field when it loses focus, and if it is invalid, return the focus to that first field to be retyped....
asked by 23.12.2017 / 16:56
1
answer

How to make two Retrofit calls in jail with RxJava?

I make a call to retrieve some data and the second call - which should be done within the first - uses one of the fields of the previous call. val restApi = retrofit.create(RestAPI::class.java) testAPI.searchDoc("language", "title_query")...
asked by 12.12.2017 / 00:12
2
answers

How to send JSONObject to a Web Service?

I'm trying for the first time to consume a Web Service in my Android application, sending data in JSON format. To accomplish the task I have a class to make the connection. public class ConexaoHttpJson { public static JSONObject enviarSoli...
asked by 13.05.2014 / 20:47
1
answer

Android MediaPlayer class warning: Should have subtitle controller already set

After updating to Android KitKat (4.4), an object of class MediaPlayer Android generates the following alert in LogCat :    Should have subtitle controller already set As explained in that question of the OS, it would suffice to...
asked by 18.05.2014 / 21:59
2
answers

Count duplicate values in list

I have ArrayList with multiple numbers inside it. I need to identify how many times each number appears and then eliminate redundancies. I was able to eliminate redundancies, but I'm having great problems in identifying how many of them e...
asked by 17.05.2015 / 00:51
2
answers

How to create bitmap of a Layout keeping the same dimensions whatever the density of the screen?

I have a layout file and I'm passing it to a bitmap that I then send to a bluetooth printer in bytes. According to the mobile resolution, it changes font sizes of textviews - the higher the resolution, the larger the font. How do I g...
asked by 21.06.2017 / 16:36
1
answer

How to call youtube API with several parameters?

I'm trying to get data from multiple videos, however the Youtube API is separate for videos and playlist , so I used the playlist API to get the VideoID of each video that is in a certain playlist, but to call the videos API I want to...
asked by 29.06.2017 / 17:12
1
answer

Simple login Firebase

I already have a main login with Firebase auth. But I need to implement another login inside that system because the client can add other administrators. The login will be simple, just check the password and email. I have this method that log...
asked by 16.02.2017 / 23:22
1
answer

Android using findViewById from another activity

I need to assign a value to an element that is in another activity I'm trying this way: MainActivity activityprincipal = new MainActivity(); WebView view = (WebView) activityprincipal.findViewById(R.id.webView);     
asked by 22.02.2017 / 17:42
1
answer

How to customize an android toolbar?

How do I add more buttons to my toolbar?     
asked by 29.12.2016 / 20:55