Questions tagged as 'android'

2
answers

How to get id from an ImageView in android?

How do I get an id of an image from an ImageView. Example, for me to set an image in my ImageView I use the following code.    imageView.setImageResource (R.drawable.icone_x); How do I reverse the process? For example, I want to get an in...
asked by 27.10.2014 / 20:12
4
answers

How to use AsyncTask on Android?

I'm trying to make my application download an XML (RSS Feed) and read its tags to display it on the home screen. However, the application closes after downloading before attempting to start the onPostExecute method of AsyncTask getFeed and A...
asked by 25.03.2014 / 02:33
1
answer

Scrolling between screens

I want to scroll between different screens. For example, create an equal scrolling of the mobile or desktop menu that when pulled one will occupy the space of the other. How can I do this?     
asked by 26.03.2014 / 18:33
1
answer

Fragment adapter issues

I'm having a problem with adapter in Fragment. My Fragment: public class HomeActivity extends Fragment { private final DataBaseHandler db = new DataBaseHandler(getActivity()); public View onCreateView(LayoutInflater inflater, View...
asked by 03.06.2014 / 03:31
1
answer

ListView in numerical order - Android

In my project, I have to leave an option for the user if he wants to view the list in order of mileage or by price. In my case, I'm populating is listed by ArrayAdpter , through a class to inflate ArrayAdapter , where it will be popu...
asked by 13.04.2015 / 19:10
1
answer

Start a new Fragment when searching

I need to know how when people give enter in the search bar, the application passes what was typed to another fragment and starts it. Currently I have arrived at the following code, but it is not working. @Override public void onCrea...
asked by 11.04.2015 / 05:21
3
answers

How do I use ActionBarActivity in an application that runs with android 2.2 or higher?

I want to use Action Bar in my application that will also run on devices running Android 2.2 or higher. I know I should use Class ActionBarAcitivity , which is the API made available by Google. I already downloaded the Android Su...
asked by 12.02.2014 / 22:38
1
answer

How to create new folder in an Android Studio project

I'm a beginner in Android Studio and I'm trying to create new folders (values-ldpi, values-mdip, and so on) in the project structure, but I have no option.     
asked by 18.02.2014 / 16:56
2
answers

Make two items in a ListView switch position

I am creating a button called upload, to make an item in the listview go up, while the one that was above goes down. But I've tried everything and it will not, I do not know if I'm wrong in logic. But I tried to do it in two ways. The first (...
asked by 07.02.2014 / 14:23
2
answers

How do I know if the keyboard is visible?

Is there a method that tells me when the keyboard appears and disappears?     
asked by 12.02.2014 / 00:31