[android-developers] Gallery

2013-02-12 Thread Arun Kumar K
Hi Guys,

I want to get the height of the gallery at run time
and i want to change the height of the gallery at run time..
How can i do this..
Can any explain me

-- 
*Thanks  Regards*
*K.Arun Kumar*

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Gallery issues

2012-12-13 Thread Vivek Malavade
Hi,
I have created CoverFlow effect using Gallary view and in each gallary item 
consist of my custom view(view contains buttons, imageviews, gridviews, 
etc.). On the top of item view ther are two buttons (i.e. prev and next). I 
creared two different clicklisteners for buttons. When I going to click on 
Next button, then my prev click listener get called. So next item not 
showing. 
I see that, the prev button of next screen is just behind current items 
Next button. 
In my adapter getView method get current view but i m not understanding 
that why next item button get called while it focus on current view.

Please help me.
Thanks in adavance.

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

[android-developers] Gallery with Zoom Application needed

2012-10-03 Thread vamshi ch
Hi All,

I created simple Gallery App, But i need Zoom in/out by hand touch not with
zoom controller. if you have any idea or have code pls share me code
snippet,apps,source code,etc.

Thanks In Advance.



Best Regards,
Vamshi.

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

Re: [android-developers] Gallery widget selection.

2012-05-17 Thread Nikolay Elenkov
On Thu, May 17, 2012 at 1:28 PM, Put_tiMe putt...@gmail.com wrote:
 Nothing actually, here's my gallery definition.

 Gallery
                     android:id=@+id/Gallery
                     android:layout_width=match_parent
                     android:layout_height=70dip
                     android:spacing=25dip
                     android:gravity=center
                     android:unselectedAlpha=1.2 /

 Is it mandatory to provide a selector?

 I also tried adding the following 2 parameters:

 android:listSelector=@drawable/selection_image
 android:drawSelectorOnTop=true

 Even that didn't help.


You need to use something like this for the background of the *items*
displayed in the gallery:

selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:drawable=@drawable/border_selected
android:state_selected=false
android:state_pressed=true /
item android:drawable=@drawable/border_unselected /
/selector

And then provide appropriate drawables for border_selected and
border_unselected. For example, this will give you a rectangle
with rounded corners, you can use it to mark selected items
by setting different colors for selected/unselected.

Or provide your own 9patch images, etc.

shape xmlns:android=http://schemas.android.com/apk/res/android;
padding android:left=1dp
 android:top=1dp
 android:right=1dp
 android:bottom=1dp /
stroke android:width=1dp android:color=# /
corners android:radius=1dp /
/shape

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


Re: [android-developers] Gallery widget selection.

2012-05-17 Thread Justin Anderson
Oh yeah... It has been awhile since I've done any work on my Gallery
widgets... I forgot they were a little different from normal views with an
adapter.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, May 17, 2012 at 6:52 AM, Nikolay Elenkov
nikolay.elen...@gmail.comwrote:

 On Thu, May 17, 2012 at 1:28 PM, Put_tiMe putt...@gmail.com wrote:
  Nothing actually, here's my gallery definition.
 
  Gallery
  android:id=@+id/Gallery
  android:layout_width=match_parent
  android:layout_height=70dip
  android:spacing=25dip
  android:gravity=center
  android:unselectedAlpha=1.2 /
 
  Is it mandatory to provide a selector?
 
  I also tried adding the following 2 parameters:
 
  android:listSelector=@drawable/selection_image
  android:drawSelectorOnTop=true
 
  Even that didn't help.
 

 You need to use something like this for the background of the *items*
 displayed in the gallery:

 selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:drawable=@drawable/border_selected
android:state_selected=false
android:state_pressed=true /
item android:drawable=@drawable/border_unselected /
 /selector

 And then provide appropriate drawables for border_selected and
 border_unselected. For example, this will give you a rectangle
 with rounded corners, you can use it to mark selected items
 by setting different colors for selected/unselected.

 Or provide your own 9patch images, etc.

 shape xmlns:android=http://schemas.android.com/apk/res/android;
padding android:left=1dp
 android:top=1dp
 android:right=1dp
 android:bottom=1dp /
stroke android:width=1dp android:color=# /
corners android:radius=1dp /
 /shape

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Gallery widget selection.

2012-05-16 Thread Put_tiMe
I'm using a 'Gallery' widget. And I've registered for a item-click callback.

And I'm getting the callback when I click on an item.
But the problem is that I don't see any selection UI.
How do I fix this?

Thanks

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

Re: [android-developers] Gallery widget selection.

2012-05-16 Thread Justin Anderson
What are you using for your selector?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, May 16, 2012 at 10:25 AM, Put_tiMe putt...@gmail.com wrote:

 I'm using a 'Gallery' widget. And I've registered for a item-click
 callback.

 And I'm getting the callback when I click on an item.
 But the problem is that I don't see any selection UI.
 How do I fix this?

 Thanks

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Gallery widget selection.

2012-05-16 Thread Put_tiMe
Nothing actually, here's my gallery definition.

Gallery
android:id=@+id/Gallery
android:layout_width=match_parent
android:layout_height=70dip
android:spacing=25dip
android:gravity=center 
android:unselectedAlpha=1.2 /

Is it mandatory to provide a selector?

I also tried adding the following 2 parameters:

android:listSelector=@drawable/selection_image
android:drawSelectorOnTop=true

Even that didn't help.


On Wednesday, May 16, 2012 10:51:42 PM UTC+5:30, MagouyaWare wrote:

 What are you using for your selector?

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Wed, May 16, 2012 at 10:25 AM, Put_tiMe putt...@gmail.com wrote:

 I'm using a 'Gallery' widget. And I've registered for a item-click 
 callback.

 And I'm getting the callback when I click on an item.
 But the problem is that I don't see any selection UI.
 How do I fix this?

 Thanks

  -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] gallery issue on 3.2.2

2012-04-22 Thread chillipig
Hi Guys,

I have an issue with a gallery view only on the new Motorola Xoom 2
which is running 3.2.2. The gallery has each thumb on top of each
other so you can only see one image at a time.

Here is the code:

XML looks like this:

FrameLayout
android:layout_width=fill_parent
android:layout_height=324dp
android:layout_alignParentBottom=true

Gallery
android:id=@+id/GalleryHorizontalListView
android:layout_width=fill_parent
android:layout_height=324dp
android:spacing=0dp/Gallery

/FrameLayout

Adapter looks like this:

public class MoviesGalleryAdapter extends BaseAdapter
{
ListMovie MovieItemObjects = new ArrayListMovie();

private View currentView;
private int currentPosition = 0;
private int totalCount = 0;

public void setTotalCount(int total) {
totalCount = total;
}

public void setModel(ListMovie items){
this.MovieItemObjects = items;
notifyDataSetChanged();
}

public void updateModel(ListMovie items){
this.MovieItemObjects.addAll(items);
notifyDataSetChanged();
}

public void SetCurrentPosition(int pos) {
currentPosition = pos;
}

public View getSelectedView() {
return currentView;
}

 //   public void setActivated(int position) {
   //   currentlySelectedItem = position;
//}

@Override
public int getCount() {
//return count;
if (MovieItemObjects.size()  0) {
return this.MovieItemObjects.size();
}
return 0;
}

@Override
public long getItemId(int position) {
return position;
}

@Override
public Object getItem(int idx) {
return (MovieItemObjects != null) ? 
MovieItemObjects.get(idx) :
null;
}

@Override
public boolean hasStableIds(){
return true;
}

@Override
public int getItemViewType(int pos){
return 0;
}

@Override
public int getViewTypeCount(){
return 1;
}

@Override
public View getView(int position, View convertView, final 
ViewGroup
parent)
{
ViewHolder holder = null;

if (convertView == null) {
convertView =
LayoutInflater.from(parent.getContext()).inflate(R.layout.movieitem,
null, false);

holder = new ViewHolder();
holder.iv = (ImageView)
convertView.findViewById(R.id.image);

convertView.setTag(holder);
} else {
holder = (ViewHolder)convertView.getTag();
}

if (currentPosition == position) {
//convertView.setActivated(true);
//MovieItemView = convertView;
}

if (MovieItemObjects.size()  0) {
try {
Movie item = MovieItemObjects.get(position);


_ImageLoader.DisplayImage(item.coverImageMedium, holder.iv,
172, 250);
} catch (Exception e) {}
}

return convertView;

}
};

and the xml to inflate looks like this:

?xml version=1.0 encoding=utf-8?

LinearLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical
android:layout_width=wrap_content
android:layout_height=wrap_content

ImageView
android:id=@+id/image
android:layout_width=172dip
android:layout_height=250dip
android:scaleType=fitXY
android:layout_gravity=center_vertical
android:layout_marginTop=18dp
android:layout_marginRight=10dip
android:paddingLeft=3dip
android:paddingRight=3dip
android:paddingBottom=3dip
android:paddingTop=3dip/

!--  ImageView android:id=@+id/throbber
android:layout_width=wrap_content
android:layout_height=wrap_content
android:src=@drawable/ic_popup_sync_1
android:visibility=gone/--

/LinearLayout

Any help would be appreciated.

Cheers,

-- 
You received this message because you are 

[android-developers] Gallery app... bitmaps exceed memory in listView

2012-04-02 Thread Farhan Tariq
Hello everyone,

I populate a list of image urls and pass it to a listAdapter. The getView
gets the 3 successive urls (from the list) for the position in list it is
called for, and downloads them, and adds it to a row of the list. The list
works fine. But when I click on a picture to fire an intent and show a
bigger picture (by modifying the url passed as intent extra), my
application crashes, saying that bitmap exceed memory.

I am pretty sure that an image can not be that big in size to take all
space from heap! Any suggestions on how to go about the issue? I need to
keep the images from the listView, so I can't remove them from the
imageViews when I go to the next activity. For the same reason, I can not
finish() my list activity too, when an image is clicked. I feel I am stuck
here. Any help is much appreciated

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

[android-developers] Gallery Sources URL

2012-02-03 Thread M0n5terbunny
Hi im fairly new to this im trying to use image urls as sources for my
gallery pictures but im having difficulty finding how this works, this
is the code so far.



public class ImageAdapter extends BaseAdapter {
private static final int ITEM_WIDTH = 232;
private static final int ITEM_HEIGHT = 150;

private final int mGalleryItemBackground;
private final Context mContext;

private final Integer[] mImageIds = {
R.drawable.pic1,
R.drawable.pic2,
R.drawable.pic3,


};

where would i put the urls ?

regards

me

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


Re: [android-developers] Gallery Sources URL

2012-02-03 Thread TreKing
On Wed, Feb 1, 2012 at 5:01 AM, M0n5terbunny
joshfisher.18051...@gmail.comwrote:

 where would i put the urls ?


http://developer.android.com/resources/tutorials/views/hello-gallery.html

Look at getView(). See where they set the Image resource. Then replace the
hardcoded images with images from your URLs.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Gallery Intent to pick image --- Picasa-based images are invalid (Android 4.0+)

2012-01-04 Thread Andrew
Hello,

I'm trying to launch a Gallery Intent to allow the user to select an
image. The issue is that the code works on 2.x but fails occasionally
on 4.x (I haven't tested 3.x). I've narrowed it down to issues
specific to Picasa-sourced images. For example, from my google+ posts
(still in the Gallery app).

The problematic URI is content://
com.google.android.gallery3d.provider/picasa/item/some ID.
Attempting to retrieve the image local path gives me the error : W/
GalleryProvider( 8091): unsupported column: _data

My code is below:

Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType(image/*);
startActivityForResult(photoPickerIntent, PROFILE_PIC_RESULT);

and then in onActivityResult(int requestcode, int resultcode, Intent
data) :

if(requestCode == PROFILE_PIC_RESULT  resultCode == RESULT_OK){
 Uri selectedImage = data.getData();
 String[] filePathColumn = {MediaStore.Images.Media.DATA};
 Cursor cursor = getContentResolver().query(selectedImage,
filePathColumn, null, null, null);
 cursor.moveToFirst();

 int columnIndex =
cursor.getColumnIndexOrThrow(filePathColumn[0]);
 String filePath = cursor.getString(columnIndex);
}

In 2.x, filePath will contain a useful string. In 4.x, filePath is
null on some images because of the issue noted above.

I found a similar bug report that seems to be suffering from the above
problem: http://code.google.com/p/android/issues/detail?id=21234

Can anyone confirm? I might need to submit another bug report on this
issue.. because it's frustrating that some images a user might pick
will be invalid while others will be okay.

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


[android-developers] Gallery Select Pic

2011-12-07 Thread Mukesh Srivastav
Hi All,


I have a question on Gallery Intent. After taking a pic, I am calling
the*Gallery Intent
* which shows all the pics. I am able to select the pic from the
Galleryview and taking it to a next activity everything works fine.But
the real problem is, if i change the Gallery Intent to *Landscape Mode*, *and
try selecting an image, it is getting forceclose.*

is there any way to restrict the Gallery Intent to portrait mode only ?

Note: I had tried the below solutions, but none of them are working.
 1. I had already tried with setting Activity i portrait mode in
android.manifest file.
 2. I had also tried
with setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); in
my activity ,but it is also failing.
3.Tried writing onConfigurationChanged(Configuration newConfig) Method, but
tat is also failing.
4. I tried Calling
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
Method in onActivtyResult, but fails.

Need Help on this.

Regards,
Mukesh

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

[android-developers] Gallery and multiple calls of getView

2011-09-15 Thread Kiko Llaó Garcia
Here is the code:

public class HelloGallery extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Gallery g = new Gallery(this);
g.setAdapter(new ImageAdapter(this));
setContentView(g);
}
public class ImageAdapter extends BaseAdapter {
int mGalleryItemBackground;
private Context mContext;
private Integer[] mImageIds = {
R.drawable.sample_1,
R.drawable.sample_2,
R.drawable.sample_3,
R.drawable.sample_4,
R.drawable.sample_5,
R.drawable.sample_6,
R.drawable.sample_7
};
public ImageAdapter(Context c) {
mContext = c;
}
public int getCount() {
return mImageIds.length;
}
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return position;
}
public View getView(int position, View convertView,
ViewGroup
parent) {
System.out.println(position:+ position);
ImageView i = new ImageView(mContext);
i.setImageResource(mImageIds[position]);
i.setLayoutParams(new Gallery.LayoutParams(150,
100));
i.setScaleType(ImageView.ScaleType.FIT_XY);
i.setBackgroundResource(mGalleryItemBackground);
return i;
}
}

Why Gallery calls getView several times??? output:
position: 0
position: 0
position: 0
position: 0
position: 0
position: 0
position: 0
position: 0

if i change image now:
position: 1
position: 1
position: 1
position: 1
position: 1
position: 1
position: 1
position: 1
...
..
..
..
..
and much more

What is happening with Gallery widget

Thanks a lot

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


[android-developers] Gallery View and SQLite database

2011-09-13 Thread Abhi
Hi all,

I have a sqlite database of 100+ low res images saved as Blob data. I
am creating an App that has a GalleryView and I would like to display
the 100+ images from my database in this view. The user can scroll
through the horizontally scrolling list and select the one he wants to
see full screen.

I am using a sample app that takes sample images from 'res/drawable'
folder to display them on the gallery view. I would like to do the
same but pull images from the database instead. Can someone guide me?

Thanks,

AB

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


[android-developers] Gallery Problem

2011-08-30 Thread Perry168
Hi,
Today, I wrote a gallery example to show the photos. My problem is how
to set the init 'position' isn't started from zero?
For example: it has 9 photos. 1 to 9.jpg (array from 0 to 8)
When the program started, the 1.jpg (position 0) always showed in
gallery firstly. I would like the default is 5.jpg (position 4).
How to do this? Thanks!

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


[android-developers] Gallery sets position after TextView.setText()

2011-08-24 Thread Matthew Patience
I've got a fairly complicated layout going on that consists of 2
galleries which hold layouts themselves as the children, and also an
additional timer counting down to an event.

My issue is that I'm updating the countdown using a Handler that runs
every 1000ms that calculates time until the event and then displays it
using setText(). Whenever setText() is called, if the user is
scrolling through the gallery and is halfway between views, it snaps
to lock in one of the views. Some sort of invalidate going on I
assume?

Anyone know of a solution so that my Galleries don't snap every time
the countdown updates?


Thanks.

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


[android-developers] Gallery view image zoom option in multi touch..

2011-07-25 Thread ragupathi ragupathi
Hi every one,

   i did gallery view program in this gallery view have some
images it will be displayed one by one. i need to zoom which images is
viewed. so anyone know the idea share with me...

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


[android-developers] Gallery: change center position?

2011-07-22 Thread Devomat
I have a gallery that center the selected View in the middle of the
gallery view. I want to decenter the selected view to x -=60

Is this possible?

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


[android-developers] Gallery center item in the middle

2011-07-11 Thread vani reddy
Hi,
How to make the  first image in the gallery to start from the leftmost side
of the device,since images are displayed  starting from center, as seen in
the snapshot attached.
Please reply.
-- 
Regards,
Vani Reddy

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=enattachment: devicegallery.png

Re: [android-developers] Gallery center item in the middle

2011-07-11 Thread TreKing
On Mon, Jul 11, 2011 at 8:55 AM, vani reddy vani.reddy.bl...@gmail.comwrote:

 How to make the  first image in the gallery to start from the leftmost side
 of the device,since images are displayed  starting from center, as seen in
 the snapshot attached.


Use the functions available to you to set the selected item such that the
effect you desire is achieved.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] gallery images onSignalStrengthsChanged Error

2011-07-04 Thread ragupathi ragupathi
hi every one,


im developing small project, in this project i will getting all images
from the android phone gallery its working fine. but when im
displaying that images in android grid view means some images only
loaded, remaining images are showing like  07-04 14:06:53.965: DEBUG/
StatusBarPolicy(26819): onSignalStrengthsChanged  in logecat. so any
one knows pls help me i need to urgent this... pls

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


[android-developers] Gallery question: loading the current image from a context menu to wallpaper

2011-05-29 Thread Spooky
I'm looking at the Gallery example from the Android-sdk samples
(android-7/ApiDemos/src//view/Gallery1.java), and am trying
to load the currently-displayed image, from the long-press
context menu, as wallpaper.

In that example, I have the index number within the array of
R.drawable.filename values (i.e., for mImageIds[position], I have
position, but what I need, is the value of mImageIds[position].

Is there a way to query the Gallery code for the resource value
for the current image?  I've looked, and I've been trying to do
this for days, and have gotten nothing but one error after
another, where correcting one error causes another, for which the
correction is to reverse the correction for the first error
(that, or declare variables that change constantly to static
and/or final).

How would I go about this?

Later,
   --jim

--
73 DE N5IAL (/4)   Running FreeBSD 7.0 
ICBM / Hurricane: 30.44406N 86.59909W

No, try rm -rf /
As your life flashes before your eyes, in
the unit of time known as an ohnosecond
  (alt.sysadmin.recovery)

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


[android-developers] Gallery with Adapter witch is return layouts

2011-05-28 Thread Károly Holczhauser
Hi all !

 I would like to make my custrom gallery, but when I'm implementing the
adapter it have to be return an View. I would like to use the gallery to
display my own LinearLayout-s, so the adapter have to return these !

 Any idea how can I use gallery to display my own , custrom linearlayouts ?

 Thx: Károly from Hungary

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

Re: [android-developers] Gallery with Adapter witch is return layouts

2011-05-28 Thread B Lyon
LinearLayout is a view, isn't it?

View -- ViewGroup -- Linearlayout

2011/5/28 Károly Holczhauser holczhau...@gmail.com:
 Hi all !
  I would like to make my custrom gallery, but when I'm implementing the
 adapter it have to be return an View. I would like to use the gallery to
 display my own LinearLayout-s, so the adapter have to return these !
  Any idea how can I use gallery to display my own , custrom linearlayouts ?
  Thx: Károly from Hungary

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Gallery image should navigate with textview

2011-05-13 Thread gaurav gupta
Hti guys
m making a gallery that contain 10 images , each images have a different
name . i want that if i scroll the gallery , selected or focused image's
name should be appear.
Name  should change on onFoucs or OnItemSelected.
Suggest me.
Thanks in advance.

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

Re: [android-developers] Gallery image should navigate with textview

2011-05-13 Thread Justin Anderson
The way I did it in AppSwipe! was with a RelativeLayout that contains a
Gallery and a TextView.  I used an OnItemSelectedListener to change the text
displayed in the text view.

http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html

It is pretty straightforward once you get the design figured out...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Fri, May 13, 2011 at 12:56 PM, gaurav gupta gaurav.gupta...@gmail.comwrote:

 Hti guys
 m making a gallery that contain 10 images , each images have a different
 name . i want that if i scroll the gallery , selected or focused image's
 name should be appear.
 Name  should change on onFoucs or OnItemSelected.
 Suggest me.
 Thanks in advance.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Gallery image should navigate with textview

2011-05-13 Thread gaurav gupta
Thanks Justin
Its works ,
:)

On Sat, May 14, 2011 at 12:32 AM, Justin Anderson magouyaw...@gmail.comwrote:

 The way I did it in AppSwipe! was with a RelativeLayout that contains a
 Gallery and a TextView.  I used an OnItemSelectedListener to change the text
 displayed in the text view.


 http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html

 It is pretty straightforward once you get the design figured out...

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Fri, May 13, 2011 at 12:56 PM, gaurav gupta 
 gaurav.gupta...@gmail.comwrote:

 Hti guys
 m making a gallery that contain 10 images , each images have a different
 name . i want that if i scroll the gallery , selected or focused image's
 name should be appear.
 Name  should change on onFoucs or OnItemSelected.
 Suggest me.
 Thanks in advance.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Gallery image should navigate with textview

2011-05-13 Thread gaurav gupta
HI ,
i have a new issue , my using small dots to show the current image position
of a gallery.
these images are creating in runtime using this code


for (*int* i=0;itracks.size();i++)

{

LinearLayout imgview_layout=(LinearLayout)findViewById(R.id.*sub_layout*);

ImageView imageview=*new* ImageView(HotelViewScreen.*this*);

imageview.setImageResource(R.drawable.*gray_dot*);

imageview.setPadding(5, 2, 5, 2);

imgview_layout.addView(imageview);

 }

Now i need that i have to change this imageview's Src everytime when
gallery's Selected item will change.

should i set id for every imageview??

Suggest me.

Thnks



On Sat, May 14, 2011 at 12:42 AM, gaurav gupta gaurav.gupta...@gmail.comwrote:

 Thanks Justin
 Its works ,
 :)

 On Sat, May 14, 2011 at 12:32 AM, Justin Anderson 
 magouyaw...@gmail.comwrote:

 The way I did it in AppSwipe! was with a RelativeLayout that contains a
 Gallery and a TextView.  I used an OnItemSelectedListener to change the text
 displayed in the text view.


 http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html

 It is pretty straightforward once you get the design figured out...

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Fri, May 13, 2011 at 12:56 PM, gaurav gupta gaurav.gupta...@gmail.com
  wrote:

 Hti guys
 m making a gallery that contain 10 images , each images have a different
 name . i want that if i scroll the gallery , selected or focused image's
 name should be appear.
 Name  should change on onFoucs or OnItemSelected.
 Suggest me.
 Thanks in advance.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Gallery image should navigate with textview

2011-05-13 Thread Justin Anderson
I'm not entirely sure what you are trying to accomplish...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Fri, May 13, 2011 at 1:23 PM, gaurav gupta gaurav.gupta...@gmail.comwrote:

 HI ,
 i have a new issue , my using small dots to show the current image position
 of a gallery.
 these images are creating in runtime using this code


 for (*int* i=0;itracks.size();i++)

 {

 LinearLayout imgview_layout=(LinearLayout)findViewById(R.id.*sub_layout*);

 ImageView imageview=*new* ImageView(HotelViewScreen.*this*);

 imageview.setImageResource(R.drawable.*gray_dot*);

 imageview.setPadding(5, 2, 5, 2);

 imgview_layout.addView(imageview);

  }

 Now i need that i have to change this imageview's Src everytime when
 gallery's Selected item will change.

 should i set id for every imageview??

 Suggest me.

 Thnks



 On Sat, May 14, 2011 at 12:42 AM, gaurav gupta 
 gaurav.gupta...@gmail.comwrote:

 Thanks Justin
 Its works ,
 :)

 On Sat, May 14, 2011 at 12:32 AM, Justin Anderson 
 magouyaw...@gmail.comwrote:

 The way I did it in AppSwipe! was with a RelativeLayout that contains a
 Gallery and a TextView.  I used an OnItemSelectedListener to change the text
 displayed in the text view.


 http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html

 It is pretty straightforward once you get the design figured out...

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Fri, May 13, 2011 at 12:56 PM, gaurav gupta 
 gaurav.gupta...@gmail.com wrote:

 Hti guys
 m making a gallery that contain 10 images , each images have a different
 name . i want that if i scroll the gallery , selected or focused image's
 name should be appear.
 Name  should change on onFoucs or OnItemSelected.
 Suggest me.
 Thanks in advance.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Gallery image should navigate with textview

2011-05-13 Thread gaurav gupta
hi justin
 i want to just change my textview and imageview with gallery.
my imageview showing the current position of gallery . like if gallery's
currenit position is 2 , the 2nd imageview will be  yellow,now it is gray
its just like a indicator in footer that will show the postion of gallery's
selected image.



On Sat, May 14, 2011 at 12:58 AM, Justin Anderson magouyaw...@gmail.comwrote:

 I'm not entirely sure what you are trying to accomplish...

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyareware


 On Fri, May 13, 2011 at 1:23 PM, gaurav gupta 
 gaurav.gupta...@gmail.comwrote:

 HI ,
 i have a new issue , my using small dots to show the current image
 position of a gallery.
 these images are creating in runtime using this code


 for (*int* i=0;itracks.size();i++)

 {

 LinearLayout imgview_layout=(LinearLayout)findViewById(R.id.*sub_layout*
 );

 ImageView imageview=*new* ImageView(HotelViewScreen.*this*);

 imageview.setImageResource(R.drawable.*gray_dot*);

 imageview.setPadding(5, 2, 5, 2);

 imgview_layout.addView(imageview);

  }

 Now i need that i have to change this imageview's Src everytime when
 gallery's Selected item will change.

 should i set id for every imageview??

 Suggest me.

 Thnks



 On Sat, May 14, 2011 at 12:42 AM, gaurav gupta gaurav.gupta...@gmail.com
  wrote:

 Thanks Justin
 Its works ,
 :)

 On Sat, May 14, 2011 at 12:32 AM, Justin Anderson magouyaw...@gmail.com
  wrote:

 The way I did it in AppSwipe! was with a RelativeLayout that contains a
 Gallery and a TextView.  I used an OnItemSelectedListener to change the 
 text
 displayed in the text view.


 http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html

 It is pretty straightforward once you get the design figured out...

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Fri, May 13, 2011 at 12:56 PM, gaurav gupta 
 gaurav.gupta...@gmail.com wrote:

 Hti guys
 m making a gallery that contain 10 images , each images have a
 different name . i want that if i scroll the gallery , selected or focused
 image's name should be appear.
 Name  should change on onFoucs or OnItemSelected.
 Suggest me.
 Thanks in advance.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Gallery Infinite Loop

2011-04-18 Thread James Liu
That's a good point. And I have tried it, but still hard to get a solution.
So, i have to implement a new gallery in the google code server. If anyone
also wants to use this widget, you can check it there:

*Android Infinite Loop
Galleryhttp://blog.jmsliu.com/138/android-infinite-loop-gallery.html
*


On Wed, Mar 16, 2011 at 10:37 AM, TreKing treking...@gmail.com wrote:

 On Mon, Mar 14, 2011 at 7:06 AM, James Liu james.liu.p...@gmail.comwrote:

 And what I want to implement is loop to the first image after the gallery
 reach to the end.


 Idea: have the getSize() method or your adapter return something
 ludicrously high, set the start of the Gallery to something in the middle of
 that high value, then use mod operations to get the actual item in the list
 when the user scrolls left or right through the large values and hope they
 never get so bored they scroll through to the actual beginning or end.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Gallery Infinite Loop

2011-04-18 Thread Streets Of Boston
Yep, that's what I did for a regular list-view that acts like a slot-machine 
roll.
Return a value in your adapter's getCount() method that is a very very very 
high multiple of the number of actual items in your list-view's adapter.

private static final int MULTIPLIER = 100; // some LARGE even number.

public int getCount() {
return myArrayList.size() * MULTIPLIER;
}

public Object getItem(int position) {
int actualPosition = position % myArrayList.size();
return myArrayList.get(actualPosition);
}

And put the initial position of your list-view at (myAdapter.getCount() / 2) 
+ actualInitialPosition)), where actualInitialPosition is probably 0 (first 
item in your list).
And make sure not to show any scrollbars.


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

[android-developers] Gallery 3D-customization of font color

2011-04-13 Thread Sarah
Hi All,
I am trying to customize the 3D gallery of android, I want to include
different color for the menu font as well as the title, throughout the
gallery 3D application.
To do this, i tried applying styles and themes to the complete
application in the manifest file, but there seems to be no effect. Is
there any other way that I can achieve customization of the 3D
Gallery? Can some one please help me.

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


[android-developers] Gallery Displays Every Image File

2011-04-13 Thread Stephen
LG Optimus M v2.2.1
I Have two of them, both with very similar set-ups, including
applications but my wife's Gallery app displays every image file
that's on her phone or sd card, including fonts. This is her second LG
Optimus M in 2 months and the first one did this as well but we
insisted on the replacement for a different issue.

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


[android-developers] Gallery of pictures with zoom and recognition of gestures

2011-04-13 Thread Lina
Hello everybody,

I am a newbie in Android,  I want to implement an application that
shows images, each one in full-screen size, and showed with a fling
movement(like a gallery). For each Image I want to zoom, and detect my
own gestures.

First approach
To modify a Gallery and  implement my own View  with a double tap
listener. This event was never triggered on the ImageView, sent in the
Base Adapter. I could only get responses from the onTouchEvent method
in the implementation of the ImageView.  I found an article telling to
solve the issue by adding a touch listener to the gallery:
http://stuffnobodytoldmeabout.blogspot.com/2010/11/gallery-clicking-and-selecting.html

Now I can get my DoubleTapEvent (for the zoom), but I don't see how I
could add the Gestures part. I don't really think this approach is the
best solution for my problem.

Could anybody give me ideas about how to implement or solve this?

Best,

Lina

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


Re: [android-developers] Gallery default item selected is in center

2011-04-04 Thread umakantpatil
No reply yet on this topic ?
Not even from some Android Framework developers ?

:(



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

Re: [android-developers] Gallery default item selected is in center

2011-03-25 Thread umakantpatil
*@MagouyaWare*
Thanks, I know it wont have compiler errors. But i see them. those variable 
are really not defined. You too can open the file online and check those 
variables are defined.

*@jotobjects*
Thanks you. Can you please help me with which classes are to be included 
from widget package to work like a normal gallery?
Then taking forward i will modify gallery as required to me..


This seems very bad to me that android haven't added anything to Gallery.


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

Re: [android-developers] Gallery default item selected is in center

2011-03-24 Thread umakantpatil
Hi MagouyaWare,

If I override touch events. I need to call super function first. And If call 
super method then it will bring it in center and then I will push it back.
Is it fine to do that ?

Thanks


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

Re: [android-developers] Gallery default item selected is in center

2011-03-24 Thread umakantpatil


I copied the Gallery Widget Class to app, But it gives me lots of errors. 
Few of them I solved but there are still many unresolvable
e.g.

mRecycler cannot be resolved.
FLAG_USE_CHILD_DRAWING_ORDER cannot be resolved
mGroupFlags cannot be resolved
FLAG_SUPPORT_STATIC_TRANSFORMATIONS cannot be resolved

If the android its own source has errors then how I can go ahead ?



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

Re: [android-developers] Gallery default item selected is in center

2011-03-24 Thread Justin Anderson
* If the android its own source has errors then how I can go ahead ?*
Obviously the android source does not have compile errors or it would not be
working for everyone...  The errors were introduced when you copied the
Gallery Widget class to your app.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 24, 2011 at 6:46 AM, umakantpatil umakantpat...@gmail.comwrote:



 I copied the Gallery Widget Class to app, But it gives me lots of errors.
 Few of them I solved but there are still many unresolvable
 e.g.

 mRecycler cannot be resolved.
 FLAG_USE_CHILD_DRAWING_ORDER cannot be resolved
 mGroupFlags cannot be resolved
 FLAG_SUPPORT_STATIC_TRANSFORMATIONS cannot be resolved

 If the android its own source has errors then how I can go ahead ?





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

[android-developers] Gallery default item selected is in center

2011-03-23 Thread umakantpatil
Hi All,

I'm using Gallery view within my app. Now when I run the code. Gallery has 
default selected item is no 1 which is in center and left side is blank.
Instead I want no 1 item should be at left and selected.
Also clicking on the any gallery item should not bring that item in the 
center.

I tired hunting it lot on the groups but not found any solution. Is this 
possible or not ?
If yes then how come?

Thanks


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

Re: [android-developers] Gallery default item selected is in center

2011-03-23 Thread Justin Anderson
* I'm using Gallery view within my app. Now when I run the code. Gallery
has default selected item is no 1 which is in center and left side is blank.
*
*Instead I want no 1 item should be at left and selected.*

From the description of Gallery:
A view that shows items in a *center-locked*, horizontally scrolling list.

http://developer.android.com/reference/android/widget/Gallery.html

* Also clicking on the any gallery item should not bring that item in the
center.*
What should it do?  When you click something it is selected, is it not?  And
as mentioned above, it shows items in a center-locked... list You can try
changing the behavior by subclassing it and overriding its various touch
events.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Mar 23, 2011 at 5:11 AM, umakantpatil umakantpat...@gmail.comwrote:

 Hi All,

 I'm using Gallery view within my app. Now when I run the code. Gallery has
 default selected item is no 1 which is in center and left side is blank.
 Instead I want no 1 item should be at left and selected.
 Also clicking on the any gallery item should not bring that item in the
 center.

 I tired hunting it lot on the groups but not found any solution. Is this
 possible or not ?
 If yes then how come?

 Thanks


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Gallery with images from a Web Service

2011-03-18 Thread iulia
Hello,

I'm trying to built a gallery with images taking from a web service.
For the calls to WS I'm using ksoap2. My questions regards the best
way to get the images.
1. Should I take them all, store them locally and then use them in my
gallery?
2. My idea was to take let's say 5 random images and as the user
scrolls take other 5 random images, and so on. I can guarantee that
I'm not getting the images I already have because I'm sending to the
WS the id's of the images I already have. Is this possible ?
I'm not sure how the things work with Gallery.
Taking the example from 
http://developer.android.com/resources/tutorials/views/hello-gallery.html,
I'm wondering if getView will be called on the scroll event and if the
next images will get loaded.

Or maybe it's another way to do this...

Thanks a lot,

Iulia

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


[android-developers] Gallery Infinite Loop

2011-03-15 Thread James Liu
Hi, guys:

I use default gallery widget in my android application. The default gallery
action is that when it reach end, it will stop scroll. And what I want to
implement is loop to the first image after the gallery reach to the end. I
already search it on google, and still get stuck.

Do you have any idea for that?


Thanks for your any helps.

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

Re: [android-developers] Gallery Infinite Loop

2011-03-15 Thread TreKing
On Mon, Mar 14, 2011 at 7:06 AM, James Liu james.liu.p...@gmail.com wrote:

 And what I want to implement is loop to the first image after the gallery
 reach to the end.


Idea: have the getSize() method or your adapter return something ludicrously
high, set the start of the Gallery to something in the middle of that high
value, then use mod operations to get the actual item in the list when the
user scrolls left or right through the large values and hope they never get
so bored they scroll through to the actual beginning or end.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Gallery with buttons

2011-03-07 Thread Méher Khiari
Hi
This is my first message in this mailing list and I'm honoured to have
some advices from other people.
As the object explains, I need to setup a Gallery with 2 Buttons. The
problem is that the gallery won't scroll anymore. I have tried to
search the internet without success (maybe I'm using the wrong
keywords), but if anyone has a link to an explanation or can explain
me a warkaround to this problem.

Thank you for your time in advance.

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


[android-developers] Gallery selected item doesn't show selected state color

2011-01-14 Thread MB
Hi there,

In my app, I'm using a gallery with an Array of strings, and an
ArrayAdapter. I'm using a colorStateList for the text color, to show
the selected item in green. When the user interacts with the gallery,
dragging, clicking or flinging, the green color appears correctly for
the selected item. But the initial selected item doesn't show in
green. And if I programmatically set the selected index of the
gallery, the selected item doesn't' show in green.

I didn't find this issue in my searches.

I have defined the TextView used to display the strings in a layout
file, gallery_item.xml

TextView
xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_height=match_parent
android:layout_width=wrap_content
android:textColor=@color/gallery_text_color
/TextView

The color state list is:

selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:state_selected=true android:color=#ff9aca3c/
item android:state_focused=true android:color=#ff9aca3c/
!-- Just to be safe --
item android:color=#/
/selector

Does anyone know why the initially selected TextView would be showing
the default white color? I get a callback to onItemSelected with
position == 0, so I know the item is being selected. Just the
formatting is off.

Thanks,
MB

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


[android-developers] Gallery as a horizontal list

2010-12-23 Thread jotobjects
The gallery widget is almost the right thing for a horizontal list. It
works with the same adapter pattern as ListView.  But Gallery is
pretty insistent about keeping the selected item in the center of the
visible area.  Has anybody tried to modify it so it displays the first
item on the left instead of centered?  Or is there another or better
way to get a horizontal scrolling list?

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


[android-developers] Gallery doesn't both click and drag

2010-12-01 Thread jotobjects
I have a Gallery widget where I want each item to be clickable AND I
want to be able to swipe the gallery to move it (of course).

Once I set the OnClickListener on the items in the Gallery I can click
them but no longer can move the gallery right and left.

Do I have to play with onTouch down and move events to make this work,
or is there another way to make the Gallery items both clickable and
draggable?

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


[android-developers] Gallery Cache

2010-10-25 Thread Andrew Whalen
Hi,

I'm trying to add pictures to a folder and have that folder viewable
in the Gallery app. I've been able to do so, but if I add or remove an
image in the folder, it will not be updated in the Gallery unless I
reset the device. I was wondering if there was a way to force the
Gallery to update the cache?

Thanks.

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


[android-developers] Gallery Control Fling operation

2010-10-25 Thread Vicky
Hi,

I am trying to stop the Gallery's fling operation after just one view
change.
I am able to do it but I used setSelection(getSelectedItemPosition()
+1,true) but i am not able to animate.
It just changes the view and a new view gets selected.
I also tried with the velocity but this approach is not good as
whatever the speed of the fling done by the user.
The image will move on a specific speed calculated.

What should I do.

Thanks
Vivek

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


[android-developers] Gallery with folder filter

2010-10-25 Thread FrEaKmAn
Hello

I'm using following code to open a gallery inside of my app

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType(image/*);
startActivityForResult(intent, FIND_RESULT);

Is it possible to limit a list of images to only show images taken by
camera? Viewing Gallery on my 2.1 system, images are grouped so there
has to be a parameter that defines to which folder it belongs.

Checking the MediaStore.Images.ImageColumns (http://
developer.android.com/reference/android/provider/
MediaStore.Images.ImageColumns.html) I did not a find any column that
would define such thing.

Could I be wrong? Because if I could create a query to filter by
folder and create my own gallery view, then my problem would be
solved.

Best regards,

Erol

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


[android-developers] Gallery view problems - external memory

2010-10-10 Thread Stephen Pengilley
Hi all,

I have developed a very simple gallery (it started as the hello
gallery example) where I have added code to get the images from the
content provider.  It should return all images from the SD card but it
is returning no images, my gallery view is blank. I am a fairly new
developer, just working my way around the tutorials online. Here is
the code.

package com.tutorials;

import java.util.ArrayList;

import android.app.Activity;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore.Images.Media;
import android.provider.MediaStore.Images.Thumbnails;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.Toast;

public class HelloGallery extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Gallery g = (Gallery)findViewById(R.id.gallery);
g.setAdapter(new ImageAdapter(this));

g.setOnItemClickListener(new OnItemClickListener(){
public void onItemClick(AdapterView parent, View v, int
position, long id){
Toast.makeText(HelloGallery.this, + position,
Toast.LENGTH_SHORT).show();
}
});
}

public class ImageAdapter extends BaseAdapter{
int mGalleryItemBackground;
private Context mContext;

//get images from phone

public ArrayListUri getImageTable(){
ArrayListUri arrayList = new ArrayListUri();
try{

ContentResolver cr = getContentResolver();

String imageId = Media._ID;
Toast toast =
Toast.makeText(mContext,imageId,Toast.LENGTH_LONG);
toast.show();
String [] images = new String[]{imageId};

//Get Uri of ContentProvider MediaStore.Images.ImageColumns
Uri mediaUri = Thumbnails.EXTERNAL_CONTENT_URI;

Cursor managedCursor = managedQuery(mediaUri, images, null,
null, null);

startManagingCursor(managedCursor);
int columnIndex = managedCursor.getColumnIndexOrThrow(imageId);

for(int i=0;imanagedCursor.getCount();i++){
managedCursor.moveToPosition(i);
int id = managedCursor.getInt(columnIndex);
arrayList.add(Uri.withAppendedPath(mediaUri,  + 
imageId));
}

}catch(Exception e){
Toast toast =
Toast.makeText(mContext,e.toString(),Toast.LENGTH_LONG);
toast.show();
}
return arrayList;
}



public ImageAdapter(Context c){
mContext = c;
TypedArray a = obtainStyledAttributes(R.styleable.HelloGallery);
mGalleryItemBackground = a.getResourceId(

R.styleable.HelloGallery_android_galleryItemBackground, 0);
a.recycle();
}

@Override
public int getCount() {
// TODO Auto-generated method stub
return 0;
}

@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return position;
}

@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}

@Override
public View getView(int position, View convertView, ViewGroup
parent) {
// TODO Auto-generated method stub
ImageView i = new ImageView(mContext);

//i.setImageResource(mImageIds[position]);
i.setImageURI(getImageTable().get(position));
i.setLayoutParams(new Gallery.LayoutParams(150, 100));
i.setScaleType(ImageView.ScaleType.FIT_XY);
i.setBackgroundResource(mGalleryItemBackground);

return i;
}

}

 }


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at

[android-developers] Gallery view

2010-10-01 Thread AnasSamara
Hello all
I have multi-listeners on gallery view, first listener is on the image
located in the gallery, the second listener is longpress of gallery
item, and the third is ontouch event.
I use the otouch event in order to drag the image to down,
the problem is when I scroll the gallery the horizontally the ontouch
is invoked and with scrolling the view is dragged.

Can I now that the gallery is now scrolling so I deactivate the
dragging, or any solution.

any help is appreciated.

thanks

-Anas Samara

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


[android-developers] Gallery popup menu

2010-09-07 Thread viktor
Hi,

In common Android Gallery you can see nice popup menu, Gallery---
menu(More) or menu (Share).

Enyone know how to implement such kind of menu?

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


Re: [android-developers] Gallery popup menu

2010-09-07 Thread Mark Murphy
On Tue, Sep 7, 2010 at 7:37 AM, viktor victor.scherb...@gmail.com wrote:
 In common Android Gallery you can see nice popup menu, Gallery---
menu(More) or menu (Share).

 Enyone know how to implement such kind of menu?

I assume you are referring to the context menu you get from
long-tapping on an item. You can add such a menu to any widget you
want in your activity:

http://developer.android.com/guide/topics/ui/menus.html#context-menu

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in London: http://skillsmatter.com/go/os-mobile-server

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


[android-developers] Gallery Audio bounce effect on seekTo

2010-09-03 Thread RockNCode
Hi.

I'm currently working on one issue in Froyo. Basically, the problem is
that whenever I tap the progress bar in the Gallery app to do a seek,
you can hear an audio frame play two or even three times after
repositioning. After some debugging, I found out that this is due to a
condition located in mediaplayer.cpp in frameworks/base/media/
libmedia. The condition is the following:

case MEDIA_SEEK_COMPLETE:
LOGV(Received seek complete);
if (mSeekPosition != mCurrentPosition) {
LOGV(Executing queued seekTo(%d), mSeekPosition);
mSeekPosition = -1;
seekTo_l(mCurrentPosition);
}
else{
LOGV(All seeks complete - return to regularly scheduled
program);
mCurrentPosition = mSeekPosition = -1;
}
break;

What I'm understanding from this snippet (and probed) is that after
the video codec finishes repositioning, it reports back to the media
player, which checks the current position of the progress bar cursor
and if it is different from the target position, it calls the seek
function again until both variables are equal. This creates a bounce
effect in the audio track as for some reason with just a small tap on
the progress bar, it  detects two or three changes. My question is if
there is any property that can be set on the video progressBar object,
so it has a delay between seeks so it doesn't detect so many taps, or
any way to reduce the resolution of the bar, or anything you can think
that it could help with this issue.

- Thanks.

Alex.

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


[android-developers] gallery initial selection

2010-09-03 Thread Sunil S
Hi,

This is newbie question,
But I have created a gallery view with an imageswitcher above it.
It loads the images and corresponding thumbnails from the image
files.

When I first start the activity and display the screen, I would like
to set the displayed/selected
image in the the gallery and the imageview above to an specific
position in the list.

How can I do this.

Thanks in advance.
Sunil

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


[android-developers] Gallery widget, focus and selection gone?

2010-08-26 Thread Sebastián Treu
Hi there,

I'm trying to realize how the focus and selection in the Gallery
widget is doing their job. I'm facing weird situations when trying to
update information (TextViews and Spinner) upon a selected item in the
Gallery. The focus and selection is lost. So, using the resource
gallery_item_background will end in showing the unselected
background for the current selected image. I have used the .xml that
came with the android sdk, and I can't realize how this is happening.
I have set setFocusable(false) and setFocusableInTouchMode(false) to
all other Views to try out (and true for the Gallery) without any
luck.

I have also add 'in-situ' debug, that is, a menu that updates
differents widgets when onItemSelected() is called. So I can see while
using the application how the background resource is applied. When set
to 'no update' the obvious thing happens. None of the widgets are
updated with new values, and the background resource works as
expected. When set to 'manual update' (an update in the listener that
do: .setText() on the textview) does work depending the current View
that is showing the TextViews (I have a ViewFlipper that display 2
differents Layout of the TextViews).

I know that It can be complicated to understand the scenario without
the code, but basically, updating the Spinner will always remove the
focus from the Gallery (the Spinner was set no-focusable before) and
the image resource background will be set as unselected.

How can I manage this updates? I also call requestFocus() and
requestFocusFromTouch() after the updates are made. I can't realize
where is the problem. I have an update that is made by a handler.
Happens the same thing.

Any idea how should I manage an update to other widgets upon a
selection on the Gallery without losing focus or the selected state of
the image view?

Thanks,

-- 
If you want freedom, compile the source.

Sebastián Treu
http://labombiya.com.ar

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


[android-developers] Gallery: how to know if it is scrolling?

2010-08-16 Thread skywaltox
Hi,
In my application I have a gallery widget and a textview with the
picture name. As they are lots of images, they all get a default cover
and the images are loaded when an image is selected

When the user is scrolling, I want to update the textview but I don't
want to load the images ie I can't use setCallbackDuringFling
because my TextView won't get updated. Is there a possibility to know
if the gallery is scrolling or if it is still? Then I could decide if
I wan't to start a new thread to load the pictures...


Thanks!

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


[android-developers] Gallery View Null covertView

2010-08-10 Thread SImplyG2010
Good afternoon,

Does anyone at Google know when the null return for Gallery view may
be resolved? I know it was slated for long ago but didn't make it.

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


Re: [android-developers] Gallery View Null covertView

2010-08-10 Thread Romain Guy
There is not ETA for now.

On Tue, Aug 10, 2010 at 12:10 PM, SImplyG2010
thomas.sheppar...@gmail.com wrote:
 Good afternoon,

 Does anyone at Google know when the null return for Gallery view may
 be resolved? I know it was slated for long ago but didn't make it.

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




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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


[android-developers] Gallery display issue

2010-07-08 Thread Surfer
Hi, i've created a gallery, using the hello gallery tutorial from
here: http://developer.android.com/guide/tutorials/views/hello-gallery.html
.
It's working fine but i noticed running on an android 1.6 WVGA(800)
emulator the gallery is not displayed correctly.
Setting layout params to 70, 70 my gallery looks like this
http://yfrog.com/mg67528352p
Setting params to 90, 90 my gallery looks like this http://yfrog.com/jc10531135p

None of these is right. Is there a way around this? Maybe define the
image layout in the gallery in xml, anyone know how to do that?
I'd like to make my gallery look the same way on all resolutions and
densities
Thanks

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


[android-developers] Gallery View Customization

2010-06-01 Thread RS.Giridaran
Hi All,

i want to customize the Gallery widget like a conveyer belt having
icons. Please note that this icons conveyer chain is of circular
nature that is if there are 5 icons and user is navigating towards
left side so icons which gets disappeared at right side, again appears
back on left side of chain… just think of a circular ring.

Please see the link below
[url]http://101bestandroidapps.com/app/UltimateFavesPRO/556/[/url]
how can create that.. please suggest me..

Thanks
Giri

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


[android-developers] Gallery not Recycling Views

2010-05-27 Thread Aamir Shah
I am using the Hello Gallery code as an example. Views are not being
recycled as I scroll left and right.

I added log output at the getView method, and I get a constant output
of null. Anyone know the reason why?

Here is the code:

public class HelloGallery extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);


Gallery g = new Gallery(this);
g.setAdapter(new ImageAdapter(this));

setContentView(g);
}

public class ImageAdapter extends BaseAdapter {
int mGalleryItemBackground;
private Context mContext;

private Integer[] mImageIds = {
R.drawable.sample_1,
R.drawable.sample_2,
R.drawable.sample_3,
R.drawable.sample_4,
R.drawable.sample_5,
R.drawable.sample_6,
R.drawable.sample_7
};

public ImageAdapter(Context c) {
mContext = c;

}

public int getCount() {
return mImageIds.length;
}

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

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

public View getView(int position, View convertView, ViewGroup
parent) {
System.out.println(convertView); //should occasionally not be
null
ImageView i = new ImageView(mContext);

i.setImageResource(mImageIds[position]);
i.setLayoutParams(new Gallery.LayoutParams(150, 100));
i.setScaleType(ImageView.ScaleType.FIT_XY);
i.setBackgroundResource(mGalleryItemBackground);

return i;


}
}

Thanks,
Aamir

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


Re: [android-developers] Gallery not Recycling Views

2010-05-27 Thread Romain Guy
This is a known bug (it's not a bug really, we just never had the
time to implement recycling in Gallery) but we have no ETA for a fix.

On Wed, May 26, 2010 at 8:31 PM, Aamir Shah aamirns...@gmail.com wrote:
 I am using the Hello Gallery code as an example. Views are not being
 recycled as I scroll left and right.

 I added log output at the getView method, and I get a constant output
 of null. Anyone know the reason why?

 Here is the code:

 public class HelloGallery extends Activity {

       �...@override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);


            Gallery g = new Gallery(this);
            g.setAdapter(new ImageAdapter(this));

            setContentView(g);
        }

        public class ImageAdapter extends BaseAdapter {
            int mGalleryItemBackground;
            private Context mContext;

            private Integer[] mImageIds = {
                    R.drawable.sample_1,
                    R.drawable.sample_2,
                    R.drawable.sample_3,
                    R.drawable.sample_4,
                    R.drawable.sample_5,
                    R.drawable.sample_6,
                    R.drawable.sample_7
            };

            public ImageAdapter(Context c) {
                mContext = c;

            }

            public int getCount() {
                return mImageIds.length;
            }

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

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

            public View getView(int position, View convertView, ViewGroup
 parent) {
                System.out.println(convertView); //should occasionally not be
 null
                ImageView i = new ImageView(mContext);

                i.setImageResource(mImageIds[position]);
                i.setLayoutParams(new Gallery.LayoutParams(150, 100));
                i.setScaleType(ImageView.ScaleType.FIT_XY);
                i.setBackgroundResource(mGalleryItemBackground);

                return i;


            }
        }

 Thanks,
 Aamir

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




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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


[android-developers] Gallery elasticity at the ends

2010-05-12 Thread Nik Bhattacharya
Hi all,

I use the gallery view extensively as a full screen pagination
mechanism.  It works really well for me without having to create a
brand new control.

I would like to add a little elasticity at the ends (much like the
iPhone homescreen).  How could I go about doing this?  Any hint as to
which method I would need to override/modify?

Thanks in advance.

Nik

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


Re: [android-developers] Gallery elasticity at the ends

2010-05-12 Thread Gyan
How about applying animation on the layout that shows this gallery view!!

I think you get the animation co-ords from the net for the inertial
scroll

Gyan

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

[android-developers] Gallery with Listview

2010-05-07 Thread RANJAN BANIK
Hi,

I want a screen which will consist of a gallery on the upper half and
a list view in lower half. I dont have any idea how to do it. Please
help me with some example.

Thanks in advance
Ranjan

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


Re: [android-developers] Gallery with Listview

2010-05-07 Thread TreKing
On Fri, May 7, 2010 at 5:09 AM, RANJAN BANIK
ranjanfeelthema...@gmail.comwrote:

 I dont have any idea how to do it.


Sure you do.

You just said I want a screen which will consist of a gallery on the upper
half and a list view in lower half.

So common sense would dictate that you begin with a layout that has a
gallery view at the top and a list view at the bottom and see what happens.
Read the documentation for each view, play with the XML attributes, and see
what you get.

If you get stuck on some SPECIFIC problem, post back that specific problem
with DETAIL and you'll probably get a better response.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

[android-developers] Gallery Application in Eclair / 2.1 problems (Intents)

2010-04-26 Thread Schermpie
Hi there,

In Cupcake, when long-pressing a bucket of images in the Gallery
application, and selecting Slideshow from the pop-up menu, a VIEW
intent would be launched that my application could intercept. The
intent contained an extra boolean value set to true; and I was using
that boolean value to start the slideshow (otherwise I would just show
the image)

In Eclair (both on my physical test device and in the SDK), this
behaviour has suddenly changed: the (non-fancy) Gallery application
will call the following Intent: Intent { dat=content://media/external/
images/media/some_image cmp=com.android.gallery/
com.android.camera.ViewImage (has extras) }

So, my application is suddenly been bypassed and my customers are
wondering why my application is suddenly broken.

Secondly, the Gallery application in Cupcake used to attach a
queryparameter to the VIEW intent, holding the BucketId of the folder
that the user wants to browse. In Eclair, the BucketId has been moved
to the Intent's extras. That's fine, but instead of passing the
BucketId, it is passing the bucket_display_name column. This bug
breaks my application even further, as bucket_display_name does not
have to be unique.

My question is: what will be done to the default Gallery application
and its documentation to allow developers to integrate their products
with it? Hopefully something will be done to fix this as I invested a
lot of time in my application and I don't want to abandon my customers.

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


[android-developers] Gallery android:unselectedAlpha works strangely

2010-03-27 Thread arnouf
Hi all,

I work with a gallery and a BaseAdapter.
In my XML file I specified, on my gallery, android:unselectedAlpha.
When I select an item (using click or pad) image are moved but they
take the alpha defined for (normally) the unselected image.

Do you have any idea ?

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Gallery Documentation

2010-03-19 Thread Deepak Arul
Is there any documentation for Architecture of Gallery application in
Android 2.0/2.1 ?

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Gallery view weird green color

2010-02-09 Thread sleith
Hi,
i use Gallery, and don't know why the background color has weird green
color on sdk 2.1. It didn't happen on 1.5.
Please help. thx

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


[android-developers] Gallery positioning first item

2010-02-03 Thread Andr dev
Hello all,

This one is quite simple, or should be, but I couldn't figure out how
to.
So ...

I have a Gallery, something like :
Gallery android:id=@+id/Gallery01
android:layout_width=fill_parent
android:layout_height=wrap_content android:spacing=0sp/Gallery

Inside, custom views : first item has a width of 200px, all other
items have a width of 150px.

Now, in landscape mode, with a screen of -let's say- 800px :
- by default the first item is selected;
- by default the selected item is positioned in a slot so that its
center is the gallery's center;
- so, when first loading the gallery, the layout is :
  * 300 px that are empty
  * 200 px with first item
  * 2 * 150px with second and third items.
  * = Total of 800px


Now, the behavior I try to reach is to have the first item taking the
empty space at its left, to have the following layout :
 * 200 px with first item
 * 4 * 150px with items 2, 3, 4  5
 * = Total of 800px

I tried :
- scrollx on gallery : it moves the whole view to the left, NOK
- padding : NOK
- margin : NOK
...


Any idea ?

Thanks  regards,
G

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


[android-developers] Gallery crashing when scrolling using trackball

2010-02-01 Thread Fred
My app crashes whenever I try to use the trackball while the Gallery
has focus.  I can scroll by touch events just fine, but the trackball
crashes it.  I feel like there's something simple I'm overlooking.

Anyone that has some insight, please let me know.

Thanks,
Fred

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


[android-developers] Gallery view not working well

2010-01-27 Thread Manoj
I am facing a problem in scrolling in Gallery view. When i scroll
slowly it works fine but when i scroll fast the it shows jerks as it
takes time to create objects to display. Can anybody tell how can i
implement this in separate thread to load images in gallery so that it
would not affect the scrolling.

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


[android-developers] Gallery View with Text: Styling

2010-01-16 Thread SurtaX
I currently have a Gallery Widget very similar to Gallery2.java in the
API examples. It is a gallery widget populated by a simple adaptor of
text.

What I am trying to do is make the selected (the item at the center of
the gallery widget) text and background a certain color and the other
visible items a different color. It should be a simple task, but I am
unable to find a tutorial or the place in which to insert these
options.

Code which will modify the existing Gallery2.java to display the
center item as Red for example whereas the other items remain the gray
color would be very helpful.

Many thanks in advance.
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] gallery

2010-01-11 Thread tina lincon
Hi,
I got 1 doubt in an application  using two galleries.
Their Adapters are different.  I am only drawing gallery and not the
pictures in big view.What I want is when I scroll either gallery, the
another should also scroll automatically.  How can it be done?
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Gallery

2009-12-16 Thread Business Talk
I have a gallery view with a number of views, each of which fills the
display. So there on view of the gallery per display. Also each view
is filled with selectable buttons. Similar to the calendar where a
view of the month fills the entire display. To go to the next/
previous month one must scroll by sliding a finger across the display.
Also, Each month is filled with a grid of selectable days. My gallery
works the same. The problem is that when I slide my finger to scroll
the gallery the buttons on the view get selected instead. I want to
select the buttons only when I touch the screen as opposed to sliding
it.

Is the choice of the gallery view a bad one? and if so what’s the
better way to accomplish it?

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


[android-developers] gallery problem

2009-11-23 Thread tstanly
hi all,

I used the gallery widget for photo shows,
when I put the photos in the photo directory,
there will be some black photos on the gallery when gallery shows,
so, did somebody have the same experience?


thanks

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


[android-developers] Gallery stays dim??

2009-11-16 Thread racx182
The selected item in my widget Gallery stays dim when I set
unselectedAlpha to a value . Do I need to be handling item selection
or something?

thanks

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


[android-developers] Gallery thumbnail not updating after change of image

2009-08-22 Thread karthikr


Hi Guys,

Im trying to write an application that does some changes to the image.

But i can see that even after some changes are made to the image the
thumbnail of the picture that is displayed in the gallery has not
changed.

But on opening the image im able ot see the edited picture.

Any pointers on what should be done to implement this?

Regards,
R.Karthik
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Gallery View using images from file (Dynamic vs. Static images)

2009-07-01 Thread Logik

The api demo for gallery uses resource id's to access the drawables in
the gallery.

I have tried multiple ways to use images from file. My steps...

- 1. grab filepaths and save all files as a drawable array
- 2. using the same logice in the api demo, I ste the background to
the drawable
  instaed of the resid

That's All I felt the need to replace from the api demo, which seems
to fail miserably since the images do not appear in my test app.

 If you have any hints to help with this let me know,

Thanks
Billy Y
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Gallery in Preference Screen

2009-06-09 Thread Yash Patel
Hi,

I want to have gallery widget in preference screen. I have created custom
preference with Gallery.
I am able to display images but there is couple of problem with it.

1. I want to scale the image which is selected in gallery. i used
setOnItemselected listener and it does scale the image but when i selected
other item it doesn't go back to original size.
2. In the preference setUnselectedAlpha is also not working. it works on
initial load but not after that.

Here is the my preference Code.

*I would really appreciate if you can help me. *
Thanks
Yash Patel


*Preference Code*
package com.MarbleBoard;


import android.content.Context;
import android.preference.Preference;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemSelectedListener;

public class marlleGalleryPreference extends Preference {
public marlleGalleryPreference(Context context, AttributeSet attrs,
int defStyle) {
super(context, attrs, defStyle);
Initliazed();
}

public marlleGalleryPreference(Context context, AttributeSet attrs) {
super(context, attrs);
Initliazed();
}

public marlleGalleryPreference(Context context) {
super(context);

Initliazed();
}
 private void Initliazed() {
setPersistent(true);
//setDialogLayoutResource(R.layout.pref_marble_list);
setLayoutResource(R.layout.marble_gallery);
//setDialogTitle(Dialog Title Marble Select);
//setDialogMessage(Thanks for choosing my custom dialog
preference);
  setEnabled(true);
  setSelectable(true);

}
@Override
protected void onBindView(View view) {
// TODO Auto-generated method stub
super.onBindView(view);
 Gallery g = (Gallery) view.findViewById(R.id.gallery);
 g.setFocusable(true);
 g.setFocusableInTouchMode(true);
 g.setUnselectedAlpha(0.5f);
 g.setAdapter(new ImageAdapter(getContext()));
 g.setSpacing(2);
}

// *Image Adapter code*
 private class ImageAdapter extends BaseAdapter {
int mGalleryItemBackground;

public ImageAdapter(Context c) {
mContext = c;
}

public int getCount() {
return mImageIds.length;
}

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

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

public View getView(int position, View convertView, ViewGroup
parent) {
ImageView i = new ImageView(mContext);

i.setImageResource(mImageIds[position]);
i.setScaleType(ImageView.ScaleType.FIT_CENTER);
i.setLayoutParams(new Gallery.LayoutParams(80, 60));

   //i.setFocusableInTouchMode(true);
// The preferred Gallery item background
//i.setBackgroundResource(mGalleryItemBackground);

return i;
}


private Context mContext;

private Integer[] mImageIds = {
R.drawable.marble_blue,
R.drawable.marble_green,
R.drawable.marble_lgreen,
R.drawable.marble_purple,
R.drawable.marble_red
};
}
}

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



[android-developers] Gallery tutorial issue

2009-06-01 Thread Ashok Jeevan
Hi,
On trying out the 'Gallery' code given in the documentation along with the
Android 1.5, an error shows up on the 'android.R.stylable.' line, saying
that it cannot be resolved.

Is there a way to get around this problem?

Thanks,
Ashok

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



[android-developers] Gallery usage without using styleable

2009-05-12 Thread lilbyrdie

Hello,

I'm trying to find the correct new way to do image Gallery items,
previously (as also documented here:
http://developer.android.com/guide/tutorials/views/hello-gallery.html
and here http://developer.android.com/reference/android/widget/Gallery.html)
the correct way was to apply
android.R.styleable.Theme_galleryItemBackground.

Of course, this has been removed (see here:
http://groups.google.com/group/android-developers/browse_thread/thread/6554c6688f3ca6d9/72f29c1df624bbed?lnk=gstq=styleable#72f29c1df624bbed)
even though the Gallery assumes it will be used (see above Gallery
documentation).

The net effect is that, without this, a gallery with images looks
pretty bad. I could copy out all of the values and resources to
recreate the default look, or use reflection to get at styleable, but
none of that seems like a particularly workable solution.

Thoughts? What am I missing?

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



[android-developers] Gallery Child View Problem

2009-04-13 Thread Alekh

I have created a child class from the Gallery view, named MyGallery. I
did this because I wanted to get rid of the onFling event in the
gallery view. Having that achieved, it lead me to a different problem.
Scrolling the Gallery with the Dpad doesn't work now. When I tried
using the original Gallery class, the dpad works fine. But when I
extend the Gallery and use my custom gallery class, the dpad stops
working. Am I missing something? Please help.

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



[android-developers] Gallery pain

2009-03-27 Thread szabolcs

Hello everyone!

I have recently been working with the Gallery (SDK1.0_r2) and have
found the following 3 issues, the first 2 of which have caused me a
fair amount of pain:

1. not having a callback on the 'last item selected' in the gallery
during a fling and/or scroll,
2. Gallery layout change when setSelected(position) is called results
in layout changes for other views of the activity displayed,
3. a 'nothing-selected-state' after a fling with no item selected (in
the middle).

Issue #1 is a feature request.

Let me elaborate; possibly I am missing something and someone more
knowledgeable may shed some light for me on these things. I would be
very thankful for that.

My main layout consists of a simple Gallery 'bar' on top (with a few
TextViews in its adapter), and a SurfaceView below the Gallery,
filling the rest of the screen.

(1.) In my application, when an item is selected in the Gallery, the
Surface below it must be updated. This update does not take too long
to complete, but it takes long enough to make the 'fling' of the
Gallery not perfectly smooth. I am already setting
setCallbackDuringFling(false), but this only hides selection events of
items in between the second and last items selected. I figure this is
because at the beginning of a fling android does not yet know if it is
going to be a fling or just a simple scroll to the side. However, i
really hated those small hickups in the otherwise nicesmooth fling
animation, so I have implemented a crazy scheme, tracking scrollstates
and touch events with delayed message-sending/handling to achieve what
I needed: a single event being fired when the final selection on the
Gallery is made during either scroll or fling motion.
I'd like to suggest adding API support necessary to handle this kind
of event, as I believe others might use it too. (NOTE: try switching
the background on your phone: the wallpaper gallery suffers from the
same kind of hickup I am describing - doesn't it annoy anyone but
me?! ;)

(2.) In another scenario my application needs to select an item of the
gallery, while doing some CPU intensive tasks updating the Surface
below it. On the Surface I am making use of SurfaceHolder.lockCanvas
(DirtyRect) @ 30FPS and again, everything is fine and smooth, until
the selection in the gallery messes up my Surface buffer. It appears
that the Gallery.setSelection(pos) call fires off a requestLayout()
event (inherited from AbsSpinner). For reasons unknown to me, this
later results in some kind of layout invalidation of my SurfaceView as
well. The surfaceChanged() callback of the SurfaceHolder is called and
I seem to loose valid pixel regions of one of the two buffers of the
Surface as a result. The next frame thus displays with some black
pixels, where the previously locked dirtyRect region is replaced with
a full surface lock(); my SurfaceView area blinks. Just a single
fr...@30fps, but still: ugly.
After a considerable amount of time I realized that a
Gallery.setSelection(pos, false) call does NOT result in this layout
madness. I dont care for animation, so this workaround is acceptable
for now. I just dont understand, why a regular setSelection on a
Gallery should invalidate the layout of other views. I think it should
not.

(3.) At least two times during testing I have managed to stop the
gallery fling in a state where NO item was selected. In this state
there was also no item centered, meaning two of my items in the
gallery where equally close to the 'center' of the gallery bar.

Anyone else experiencing these issues? Are there any known/better
solutions to them? Any comment will be greatly appreciated.

-Szabolcs

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



[android-developers] Gallery onScroll() performs multiple activations - normal or Bug?

2009-02-23 Thread gymshoe

I have written a custom class MyGallery which extends Gallery.
This enables me to override the onScroll() method of Gallery.

Now that I have done this, I have found that onScroll() behaves oddly.
When I scroll on the emulator, it activates the onScroll() method
multiple times - usually 2-4, sometimes 5 or more, and *never* just
once.  (I have determined this to be the case by simply placing a Log.v
() comment in my @Overridden onScroll() method.)

The multiple activations of onScroll() seems to be related to how long
I hold down the mouse button while scrolling, but like I said, it is
always more than one activation even for a brief scroll.

Does anybody know if this is normal or a bug?

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



[android-developers] Gallery and setSelection

2009-02-11 Thread Alexey

Hi i have a gallery created from code and it has
OnItemSelectedListener .
I set selected item from the code by mGallery.setSelection(idx);
and expect a callback into my  onItemSelected
But it't doesn't happen - how i can trigger onItemSelected to get hit
from code ?

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



[android-developers] Gallery child views don't receive key events

2008-12-11 Thread devile...@gmail.com

Is there a way for a gallery child view to receive proper key events.
Currently, the gallery will pass press events but not key events.  The
following code uses an EditView as an example.  On any selected
EditView you cannot change the text.  Also, when I use ViewGroups as
the child views the right and left keys stop scrolling the gallery.
Any ideas?

public class EditActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Gallery gallery = new Gallery(this);
gallery.setAdapter(
new ArrayAdapterString(this,
layout.simple_list_item_1, new String [] {ONE, TWO})
{
public View getView(int position, View convertView,
ViewGroup parent) {
   if (convertView == null)
{
convertView = new 
EditText(getContext());
}
return convertView;
}
}
   );
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Gallery missing attribute / method

2008-08-25 Thread android_dev

android.widget.Gallery:

What is the equivalent for these in SDK 0.9?


android:drawSelectorOnTop or setDrawSelectorOnTop(boolean)

android:spinnerSelector or setSelectorSkin(Drawable)


Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] gallery issues

2008-07-21 Thread kingkung

Whoever answers these questions first gets a free gPhone* courtesy of
me.

1) My gallery is an element in a list view right now... but once I
scroll down to select the gallery in the list, I can't scroll up and
down the list anymore (the gallery hijacks the up and down keys).

2) When I implement the gallery's onItemSelected listener, the gallery
stops doing its default animation when switching between images.  How
do I get the animation back?

3) I want to override my keys such that the left and right
softkeys switch the selected images in the gallery, even while the
gallery is not the selected view in the list.

Thanks!

*Offer valid until Google actually decides to release a real gPhone.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] gallery question

2008-07-16 Thread kingkung

Hi all,

I'm working with the Gallery (which is terrific btw), and I have a
simple question.  Right now, in order to scroll left and right in the
gallery via the keypad, I have to move my cursor down to the gallery
before I do anything.

I want to make it so that regardless where the cursor is, pressing
DPAD_LEFT or DPAD_RIGHT will scroll the gallery left and right.  I've
been able to do this through overriding onKeyDown(), but that takes
away the default scrolling animation.  How do I do this and keep the
scrolling animation in?

Thanks,

James


case KeyEvent.KEYCODE_DPAD_LEFT:
int position;
if ((position = 
f_gallery.getSelectedItemPosition())0);
{
 
f_gallery.setSelection(position-1);
f_gallery.invalidate();
}
return true;
case KeyEvent.KEYCODE_DPAD_RIGHT:
if ((position =
f_gallery.getSelectedItemPosition())(f_gallery.getCount()-1));
{
f_gallery.setSelection(position
+1);
f_gallery.invalidate();
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Gallery OnItemClicked event issue!

2008-04-09 Thread ColinHo

I'm implementing an application using Gallery obj. I want to allow the
user to do something by clicking on a image.

I tried to setOnItemClickedListener to handle the user's click action
however my listener method seems never respond. I don't know why?
Could someone please provide me some hints?

I searched for that issue in this discussion group and found out that
there's another person asked about Mouse Click event of Gallery before
and he was answered that it is a bug of Android and will be fixed and
released soon in the future. However I don't see that bug in the bug
tracker.

Am I not sure whether it's a bug of Android or not, or it's just
because I did something wrong.

Thanks in advance.

Colin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---