GridView - setting selection to last item also loads first item

by Mark Murphy » Mon, 19 Jul 2010 22:54:36 GMT

Sponsored Links

setTag() is 1.0+. Indexed setTag() is 1.6+.

Mark Murphy (a Commons Guy)  |  | 

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!


Other Threads

1. How to catch event from the virtual keyboard ?


Everything is in the title : How to catch event from the virtual
keyboard ?

In fact, I want to know if the screen is touch for instance.

Thank you in advance !


2. Extending the Intent class

I was experimenting with extending the Intent class but don't seem to make
it work properly. I am wondering if extending is even possible. Here is the

Code for custom intent:

public class MyIntent extends Intent {

   private MyClass myClass;

   public MyIntent(String name, MyClass myClass) {
      this.myClass = myClass;

  public MyClass getMyClass() {
    return myClass;


Code for Intent broadcast:

        MyClass myClass = new MyClass();
        Intent intent = new MyIntent("my_intent",myClass);

Code for BroadcastReceiver.onReceive(Intent intent):

        MyClass myClass = null;
        if(intent instanceof MyIntent) {
           // do something
        else {
          // probelm...

When this application runs, I don't see the MyIntent received properly. In
fact, 'intent instanceof MyIntent' seems to return false.

What is wrong?



3. Initial Doubt

4. a simple code to draw a circle

5. convertView with wrong type

6. Android OS Storage

7. Table header alligment