Completely renaming a project in Eclipse

I have done Refactor -> Rename in Eclipse and the project has been renamed successfully in Eclipse. But when I copy/paste it in a folder, it still keeps the old name. How can I completely rename it?

Use object array list as spinner adapter

I got this ArrayList of objects, and i need to set it as my spinner‘s adapter like this: ArrayList<Contact> contactlist= new ArrayList<Contact>(); contactlist.add(“Gabe”); contactlist.add(“Mark”); contactlist.add(“Bill”); contactlist.add(“Steve”); ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, contactlist); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); contactsSpinner.setAdapter(adapter); This is a example of my Contact object, it only have two variables, Name and ID Contact contact = new […]

Android listview using ViewHolder

I have a problem. I’m attempting to change an icon in my listview after it has been clicked. It works correctly although are not modified only the clicked icons but also those who are not displayed. For example if I click the icon in the first item of the listview, also the fifth icon changes. […]

Changing position of a button

I have one button in an AbsoluteLayout in an XML file. From there I am able to set the (x,y) position of the button. How can I get and set the (x,y) coordinates of the button programmatically? Thanks all.

Error: No resource found that matches the given name (at 'theme' with value '@style/AppTheme')

![give me error : ( ] i tryed every thing … [2014-11-15 17:56:06 – LoginActivity] C:\Users\Different\workspace\LoginActivity\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at ‘theme’ with value ‘@style/AppTheme’). [2014-11-15 17:56:06 – LoginActivity] [2014-11-15 17:56:07 – LoginActivity] C:\Users\Different\workspace\LoginActivity\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at ‘theme’ with value ‘@style/AppTheme’). […]

get Android permission dynamiclly

i’m wondering if it’s possible to get Android permission dynamically without using AndroidManifest just with some codes, because i’ve some OSGi bundles running on Android and without Android permission they are restricted in functionality. Thanks Thanks for your answers, yes it complicates the user experience and it’s also dangerous for the user if that mechanism […]

How do I prepend a String to an Android TextView?

There’s TextView.append(), but that adds the text to the end of the TextView. I want what I append to go in the beginning (ie, show up on the top of the TextView box).

Understanding what Looper is about in Android

I had to add Looper to the following code: public class MyRunnable implements Runnable { @Override public void run() { Looper.prepare(); final Looper looper = Looper.myLooper(); new Handler().postDelayed( new Runnable() { @Override public void run() { try { } catch (Exception ex) { } finally { looper.quit(); } } }, 100); Looper.loop(); } } Notice […]

Custom Alert Dialog looking weird on Android 4.x

I want to customize the alert dialog in my Android app, so I started by changing the alertDialogTheme attribute of my app’s theme as follows: res/values/themes.xml <resources> <style name=”AppTheme” parent=”Theme.AppCompat.Light.DarkActionBar”> <item name=”android:alertDialogTheme”>@style/AlertDialogTheme</item> </style> <style name=”AlertDialogTheme” parent=”Theme.AppCompat.Light.Dialog.Alert”/> </resources> Just by doing that, I didn’t expected the dialog to look differently from the standard, because the new […]

Displaying icon for menu items of Action Bar in Honeycomb android 3.0

hi I am developing an android application using Honeycomb android 3.0 . I am tryig to display a menu in Action Bar . The menu has an icon and tiltle. When we click the menu item it displays its items in the form of a dropdown list .It was the items in drop down list […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.