Questions tagged as 'android-studio'

2
answers

How do I make the titles of my viewpager multi-language?

I have a tabbed activity with 3 sections or viewpagers, and since the data type is charsequence it does not let me take the name from the string like this: @ string / conversionunidades so that it is multi-language. How do I make it multi-langua...
asked by 29.04.2018 / 06:30
1
answer

Attempt to invoke virtual method 'void android.widget.ListView.setAdapter (android.widget.ListAdapter)' on a null object reference

I am trying to make an item list view with titles, prices and category of gasoline, to be seen in this item list view. I am new to android and I am not sure that I could have failed in my code. My project manages to compile and execute but wh...
asked by 07.05.2018 / 06:54
2
answers

Problem Because of the Context

I have a custom ListView and a button that when I press it saves a data, in this button I use "SharedPreferences" the shared preferences, the problem is that the adapter (Java Code) is like this: public class Adaptador extends BaseAdapter{...
asked by 13.05.2018 / 20:54
1
answer

How to save a shopping cart in Android Studio?

I am designing a shopping cart on android, and I would like to know how to store the data it stores. or what ideas can you give me to save this data in a database. Because if I only save the variables, only enter the last element shown...
asked by 14.05.2018 / 03:03
1
answer

Error with android studio 2.3.3: Failed to find target with hash string 'android-26'

What can I do to solve the following error? Error:Failed to find target with hash string 'android-26' in: E:\ARIEL\Carrera\Programas\AndroidSDK Install missing platform(s) and sync project I currently have version 2.3.3 of android studio,...
asked by 17.04.2018 / 22:03
1
answer

Put the item that I want from a list in the Android spinner

What I am trying to do is for a user to select an element through a spinner, I save that element through the position and what I want is that when the user returns to edit the spinner he will be shown the one he marked first. I leave here par...
asked by 31.03.2018 / 18:29
2
answers

Get data from SharedPreferences

I have 2 stored strings with sharedpreferences in a login class, inside the onClick of a Button. SharedPreferences.Editor editor = getPreferences(MODE_PRIVATE).edit(); editor.putString("rut",loginText.toString()); edito...
asked by 16.04.2018 / 18:06
1
answer

Error photos with poor Android quality

I am trying to take a photo from my phone and display it in an ImageView. I follow the steps of the web of Android Studio in which it indicates how to take a photo and show it but when showing it in the ImageView it comes out with very little qu...
asked by 26.03.2018 / 19:42
1
answer

Which component to use for this drop-down list?

I need to make the following component for my application and I have the doubt to use if a listview or an ExpandableListView.     
asked by 16.03.2018 / 12:34
1
answer

Sometimes creates the cardview and sometimes does not

A query. In my code I am creating a list of CardViews from a JSONArray that I record with a for and I am filling a list to create the CardViews, only that sometimes if I create them and sometimes I do not know why, I leave my code. @Override p...
asked by 05.04.2018 / 23:09