Nested activities question

by jb » Fri, 23 Apr 2010 00:48:09 GMT


Sponsored Links
 I have an application that allows the user to "drill-down" into data.
At each level of data the user can choose a Tableview item or a
Listview item. This will result in a startActivity() call for display
of new data.

I can get back to the top (Parent activity) by using the Back button,
which can take a while. Is there a way to "POP" back to the Parent
activity and dismiss all previously allocated activities, and not have
to go back through all the activities previously created?

TIA,

jb

--



Nested activities question

by ~ TreKing » Fri, 23 Apr 2010 01:48:27 GMT


 



See this thread:


Sponsored Links


Nested activities question

by krox » Fri, 23 Apr 2010 02:03:01 GMT


 Hi!

rootActivityIntent) with the flag FLAG_ACTIVITY_REORDER_TO_FRONT set
for rootActivityIntent. Hope this is what you were looking for, for
more information see:

 http://developer.android.com/reference/android/content/Intent.html #FLAG_ACTIVITY_REORDER_TO_FRONT

Cheers,
Erik



>



Other Threads

1. Don't know how to show Video Thumbnails

Hi,

I have been trying to display thumbnails of videos that I have stored
on the SD card of the emulator.

On stackflow someone posted the following code to a similar question
of somebody else:

int id = **"The Video's ID"**
ImageView iv = (ImageView )
convertView.findViewById(R.id.imagePreview);
ContentResolver crThumb = getContentResolver();
BitmapFactory.Options options=new BitmapFactory.Options();
options.inSampleSize = 1;
Bitmap curThumb = MediaStore.Video.Thumbnails.getThumbnail(crThumb,
id, MediaStore.Video.Thumbnails.MICRO_KIND, options);
iv.setImageBitmap(curThumb);

And I also read about MediaStore.Video.Thumbnails  on the android dev
site...but I have to say, that I don't fully understand it yet and I
just have no idea, if, how and where I could use that in my code. I am
really getting a bit desperate at the moment. If someone could help me
by explaining or showing me what I should do, I would be really
grateful.


This is the code I have so far...


package com.mobilevideoeditor.moved;

import android.app.Activity;
import android.content.Context;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.TextView;




public class EditGalleryView extends Activity {
        private Cursor videocursor;
        //private int video_column_index;
        private static int displayNameIndex = -1;
        int count;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.videogrid);

        init_phone_video_grid();

    }

        private void init_phone_video_grid() {
                System.gc();
                String[] proj = {
                                MediaStore.Video.Media._ID,
                                MediaStore.Video.Media.DISPLAY_NAME,
                                MediaStore.Video.Media.DATA
                };



                        videocursor =
managedQuery(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, proj, null,
null, null);
                        count = videocursor.getCount();

                        GridView vGrid=(GridView) findViewById(R.id.vgrid);
                        vGrid.setAdapter(new VideoAdapter(this));
        }




        public class VideoAdapter extends BaseAdapter {
                private Context vContext;

                public VideoAdapter(Context c) {
                    vContext = c;
            }

            public int getCount() {
                return count;
            }

            public Object getItem(int position) {
                return null;
            }

            public long getItemId(int position) {
                return 0;
            }



            public View getView(int position, View convertView, ViewGroup
parent) {
               TextView tv;
                String id;

                if (convertView == null) {
                    // Need to create a new view
                    tv = new TextView(vContext);
                } else {
                    // Otherwise, we can recycle the one given to us
                    tv = (TextView) convertView;
                }

                // Cache column index (or just hardcode it)
                if (displayNameIndex == -1) {
                    displayNameIndex =
videocursor.getColumnIndexOrThrow(MediaStore.Video.Media.DISPLAY_NAME);
                }

                // Bind cursor data to UI
                videocursor.moveToPosition(position);
                id = videocursor.getString(displayNameIndex);
                tv.setText(id);

             // Bundle video URI into the view
                String videoUri = videocursor.getString(2); // column
index of Media.DATA
                tv.setTag(videoUri);

                return tv;
            }



    }

}

-- 

2. How to let OpenCore can make files under AVI parser node folder

-----  ----
 RockNCode <alexgarci...@gmail.com>
 Android Developers <android-developers@googlegroups.com>
2010/7/18 ( 3:29:10 PM
€€ [android-developers] Re: How to let OpenCore can make files under AVI 
parser node folder

Hi

I think you just need to add the paths to your makefiles under
opencore_dynamic and also to your aviparser node to external/opencore/
Android.mk and rebuild.

- Alex




-- 

3. OOT WTA: Siapa aja yah yang masih pake BB di sini?

4. OOT : Paging SA (urgent).

5. SQL and SQLite

6. Howto pass pointer to char parameter to kernel via copy_to_user()

7. Issue with starting two instances of an activity with flag Intent.FLAG_ACTIVITY_REORDER_TO_FRONT and a new extra information in the Intent does not override the original Int