Questions tagged as 'android'

1
answer

Remove date from EditText and add five years

I would like to capture a date with a EditText , and from it create another date by adding another 5 years. How could I do that?     
asked by 04.01.2018 / 18:01
1
answer

Android - How to identify exceptions thrown on mobile phones?

When an unhandled exception is thrown the application is closed (eg NullPointerException) so far so good when you are testing the application through IDE, but when you generate an apk and want your friends to test the application for you , when...
asked by 15.01.2018 / 17:06
1
answer

Pick product prices in an array, add them and display the sum total in a TextView

Hello, guys, so I'm having a hard time solving a problem here, I'm using a MultiAutoCompleteTextView to get products and their prices in the app's Firebase database, I can already display all the products inside the autocomplete, however, I I wou...
asked by 16.01.2018 / 05:24
1
answer

Create a Spinner from a fixed list with more than 1 field

How do I add values to this Spinner? I need to create a Spinner that contains 2 "fields" (cod, option). Default values will be added, but the codes can not be changed later, so I need the cod field when adding other values,...
asked by 25.01.2018 / 19:38
1
answer

Spinner error when popular with SQLite

Error:    Caused by: java.lang.IllegalStateException: Could not read row 0, col   -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it. Classes NewRegistration: Activity class that will...
asked by 25.01.2018 / 12:10
1
answer

Android Studio - Doubt over String Comparisons

I have the following code static String q1 = "select * from faculdade"; if(edit.getText().toString().equals(q1)) { bar.setCurrentPosition(++position); Toast.makeText(getApplicationContext(), "Certa Resposta!", Toast.LENGTH_LONG).show...
asked by 25.01.2018 / 04:19
1
answer

How to get other values from the selected Spinner item in addition to that shown?

Doubt: How do I find the value of the handle field for nome that was selected in Spinner ? Scenario: Table clientes Fields _id, handle, nome The ArrayList of Spinner is created a...
asked by 25.01.2018 / 13:56
1
answer

How do I limit Firebase Storage downloads to a certain maximum amount per time period per user?

I would like to know how I can limit the download demand in my application, 20 per hour ... I use firebase, no login, the only way I recognize a user and with id de anúncio do google the application only works with internet connection....
asked by 28.11.2017 / 00:14
1
answer

ProgressDialog closing before Second Activity opens

I have an Activity called Login_Activity, when the user logs in, I want a ProgressDialog to appear, until the other Activity is fully loaded, because since I'm going to put some things to execute in the onCreate method of the second Activity, th...
asked by 30.11.2017 / 19:05
2
answers

How to call a method of a fragment in an activity?

I need to use a method of a fragment within an activity, but I can not pass a reference to this activity. Can someone help me? The idea is this: public class MinhaFragment extends Fragment{ ... @Override public void onC...
asked by 14.11.2017 / 23:31