Hmmm, I tried to clone the repository via the GUI but it always fails... :((

On Sun, Jul 18, 2010 at 2:43 PM, Victoria Busse <[email protected]
> wrote:

>
> Oh great thanks, I am downloading and installing GIT now...
>
>
> On Sun, Jul 18, 2010 at 2:30 PM, Victoria Busse <
> [email protected]> wrote:
>
>> I am targeting Eclair and Froyo, so that shouldn't be a problem. I also
>> found the MediaStore.Video.Thumbnails, but so far all my attempts to include
>> it into my code failed completely, so I wasn't sure if what I am trying is
>> possible. Well I have to say that I am a complete Android Newbie and right
>> now really confused and stuck...
>>
>>
>> On Sun, Jul 18, 2010 at 2:18 PM, nation-x <[email protected]>wrote:
>>
>>> After this peaked mt curiosity I did a little looking and found
>>>
>>> http://developer.android.com/reference/android/provider/MediaStore.Video.Thumbnails.html
>>> which is in the newer SDKs. I think what you will have to do is if you
>>> are targeting cupcake devices you will have to use
>>> MediaMetadataRetriever which is now gone it appears.
>>>
>>> Shawn
>>>
>>> On Jul 17, 5:38 pm, kivy <[email protected]> wrote:
>>> > Hi,
>>> > I am working on a video app. And I have created a GridView that shall
>>> > display any video stored on the sdcard. Currently it only displays the
>>> > name of the video file.
>>> >
>>> > I wanted to ask if and how it would be possible instead of showing
>>> > only the name to also display thumbs (or a frame preview) of the
>>> > videos ?!?
>>> >
>>> > I would be grateful for any help...thanks.
>>> >
>>> >  I wanted to ask if and how it would be possible instead of showing
>>> > only the name to also display thumbs (or a frame preview) of the
>>> > videos ?!?
>>> >
>>> > I would be grateful for any help...thanks.
>>> >
>>> > This is the code I have used 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;
>>> >        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 mThumbIds.length;
>>> >               return count;
>>> >            }
>>> >
>>> >            public Object getItem(int position) {
>>> >                //return null;
>>> >                return position;
>>> >            }
>>> >
>>> >            public long getItemId(int position) {
>>> >                //return 0;
>>> >                return position;
>>> >            }
>>> >
>>> >            // create a new ImageView for each item referenced by the
>>> > Adapter
>>> >            public View getView(int position, View convertView,
>>> > ViewGroup parent) {
>>> >              System.gc();
>>> >              TextView tv = new
>>> > TextView(vContext.getApplicationContext());
>>> >              String id = null;
>>> >              if (convertView == null) {
>>> >                    video_column_index =
>>> >
>>> > videocursor.getColumnIndexOrThrow(MediaStore.Video.Media.DISPLAY_NAME);
>>> >                    videocursor.moveToPosition(position);
>>> >                    id = videocursor.getString(video_column_index);
>>> >
>>> >                    tv.setText(id);
>>> >              } else
>>> >                    tv = (TextView) convertView;
>>> >              return tv;
>>> >            }
>>> >
>>> >        }
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]<android-developers%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to