Questions tagged as 'java'

2
answers

Events in Adapters listView

I am in the dilemma of having a listview, with a custom adapter I have the following adapter What I would like to achieve is that if you click on the sign to accept, or if you click on the sign to reject something happens, The fir...
asked by 23.10.2017 / 22:23
1
answer

Android Studio Filter, ListView With Perzonalized adapter

I have the next class public class ContactsListDialog extends Dialog implements DialogInterface.OnClickListener { private ListView list; private EditText filterText = null; AdapterMostrarContactos adapter = null; private sta...
asked by 24.10.2017 / 21:57
3
answers

How to invest multidimensional arrays in java?

I need to invert the values of an array, where if for example I get    1 5 2 4 1 5 9 4 6 See me like this,    9 4 6 4 1 5 1 5 2 This is my method, it prints certain values in 0, I need to see what it can be are 2 vectors,...
asked by 25.10.2017 / 04:39
2
answers

How to add parameters to a button from 'Java Code' in Android studio

This is something I can not get for more than I try, what I want is this: These properties add them but in the Java code ... Can you explain how I would do this ?, I want to add the android property: layout_weight to a Button t...
asked by 27.04.2017 / 20:00
1
answer

Change KEYBOARD LANGUAGE android

Currently I find that using my MASCARA class for the amounts written, as the phone reacts differently, this is my mask class public class Mask implements TextWatcher { private DecimalFormat df; private DecimalFormat dfnd; private boolean...
asked by 03.11.2017 / 14:41
1
answer

Obtain control of an IMAGEVIEW CONTROL

I currently have a menu that is a NavigationView . Where this is made up of the header and the body , in the HEADER I have a image , which is the following <ImageView android:layout_height="100dp"...
asked by 03.11.2017 / 20:03
1
answer

Verification of a Checkbox

Hi, I have a question about a CheckBox of Acceptance of Terms of Use. I have 2 text boxes (EditText) and a CheckBox. What I need to achieve is that if the 2 text boxes are empty and the checkbox is not "checked", it will return an error message....
asked by 05.11.2017 / 22:44
2
answers

Cursor Android Studio Get data

I have the following Cursor that gets the phone number and the calendar Spinner imgpayment = (Spinner) findViewById(R.id.imgpayment); Cursor mCursor = getContentResolver().query( ContactsContract.Data.CONTENT_URI, new String[]{Cont...
asked by 23.10.2017 / 17:07
4
answers

How to parse json to class objects in java?

I'm trying to consume an api with java I use Apache's httpClient library, it consumes me well and shows me the result and JSON all right up there, now the question is that I have a class with the attributes and when trying to obtain the data to...
asked by 10.10.2017 / 21:30
2
answers

Time limit, asynchronous reproduction

I am programming an audio streming app, everything works, the problem is that if one of the url is offline, it stays loading, I would like to set a time limit, for example if in 10 seconds it has not loaded, that stop trying and notify. my code:...
asked by 09.10.2017 / 14:34