[android-developers] Re: Gallery
use DIsplayMetrics http://developer.android.com/reference/android/util/DisplayMetrics.html W dniu środa, 13 lutego 2013 07:21:22 UTC+1 użytkownik Arun Kumar K napisał: 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] Re: Gallery
Grzegorz Patynek wrote: use DIsplayMetrics http://developer.android.com/reference/android/util/DisplayMetrics.html what does it have to do with getting/setting view's height? pskink -- -- 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.
Re: [android-developers] Re: Gallery
You can use gridview and set image view in matrix, having specified width and height. or maybe You may check object that is wrapping your gallery and set its height too. 2013/2/13 skink psk...@gmail.com Grzegorz Patynek wrote: use DIsplayMetrics http://developer.android.com/reference/android/util/DisplayMetrics.html what does it have to do with getting/setting view's height? pskink -- -- 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. -- -- Pozdrawiam / Regards G.Patynek -- -- 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.
Re: [android-developers] Re: Gallery
Grzegorz Patynek wrote: You can use gridview and set image view in matrix, hmmm, what GridView, what ImageView, what Matrix? are you sure you are answering correct question? pskink -- -- 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.
Re: [android-developers] Re: Gallery with Zoom Application needed
https://github.com/chrisbanes/PhotoView like this? Terça-feira, 9 de Outubro de 2012 4:13:59 UTC+1, vamshi ch escreveu: yes zafer..if you have just 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
Re: [android-developers] Re: Gallery with Zoom Application needed
yes zafer..if you have just 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] Re: Gallery with Zoom Application needed
you mean pinch zoom in and out on selecting a picture. On Thursday, October 4, 2012 10:58:11 AM UTC+5:30, vamshi ch wrote: 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
[android-developers] Re: Gallery app... bitmaps exceed memory in listView
Don't load your images in full (100%) size. Load them no larger (or maybe slightly larger) than the size of the screen (in pixels). Take a look at this link: http://developer.android.com/reference/android/graphics/BitmapFactory.Options.html and look at the 'inSampleSize' parameter: Set this to any value larger than 1 (preferably powers of 2) to load smaller images. On Monday, April 2, 2012 7:46:19 PM UTC-4, Farhan wrote: 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] Re: Gallery Intent to pick image --- Picasa-based images are invalid (Android 4.0+)
Workaround is here: http://jimmi1977.blogspot.com/2012/01/android-api-quirks-getting-image-from.html On Jan 8, 7:57 pm, John droidxl...@gmail.com wrote: I can confirm having this same bug only with picasa images on Honeycomb and ICS. Code: file = new File(getPath(intent.getData())); java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content:// com.google.android.gallery3d.provider/picasa/item/ 5685218575016337410 }} to activity {MyActivity}: java.lang.NullPointerException at android.app.ActivityThread.deliverResults(ActivityThread.java: 2976) at android.app.ActivityThread.handleSendResult(ActivityThread.java: 3019) at android.app.ActivityThread.access$1100(ActivityThread.java:122) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 1176) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4340) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at java.io.File.fixSlashes(File.java:185) at java.io.File.init(File.java:134) at MyActivity.onActivityResult(MyActivity.java:184) at android.app.Activity.dispatchActivityResult(Activity.java:4649) at android.app.ActivityThread.deliverResults(ActivityThread.java: 2972) ... 11 more java.lang.NullPointerException at java.io.File.fixSlashes(File.java:185) at java.io.File.init(File.java:134) at MyActivity.onActivityResult(MyActivity.java:184) at android.app.Activity.dispatchActivityResult(Activity.java:4649) at android.app.ActivityThread.deliverResults(ActivityThread.java: 2972) at android.app.ActivityThread.handleSendResult(ActivityThread.java: 3019) at android.app.ActivityThread.access$1100(ActivityThread.java:122) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 1176) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4340) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Andrew wrote: 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
[android-developers] Re: Gallery Intent to pick image --- Picasa-based images are invalid (Android 4.0+)
Workaround is described here: http://jimmi1977.blogspot.com/2012/01/android-api-quirks-getting-image-from.html -- 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] Re: Gallery Intent to pick image --- Picasa-based images are invalid (Android 4.0+)
That workaround doesn't work for me. When I try getContentResolver().getInputStream(imageUri) on the picasa URI's, I get (the picasa item id has been removed, FYI): 01-26 13:37:11.660: E/com.getpicture.MainActivity(9007): java.io.FileNotFoundException: No content provider: content://com.android.gallery3d.provider/picasa/item/ 01-26 13:37:11.660: E/com.getpicture.MainActivity(9007):at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java: 604) 01-26 13:37:11.660: E/com.getpicture.MainActivity(9007):at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java: 536) 01-26 13:37:11.660: E/com.getpicture.MainActivity(9007):at android.content.ContentResolver.openInputStream(ContentResolver.java: 371) I've also tried: ContentProviderClient client = getContentResolver().acquireContentProviderClient(imageUri); Log.e(this.getClass().getName(),client.getType(imageUri)); This gives a NPE, with an error message with a tag of ActivityThread, 01-26 13:59:39.860: E/ActivityThread(10127): Failed to find provider info for com.android.gallery3d.provider On Jan 25, 11:43 am, Anton amkr...@gmail.com wrote: Workaround is here: http://jimmi1977.blogspot.com/2012/01/android-api-quirks-getting-imag... On Jan 8, 7:57 pm, John droidxl...@gmail.com wrote: I can confirm having this same bug only withpicasaimages on Honeycomb and ICS. Code: file = new File(getPath(intent.getData())); java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content:// com.google.android.gallery3d.provider/picasa/item/ 5685218575016337410 }} to activity {MyActivity}: java.lang.NullPointerException at android.app.ActivityThread.deliverResults(ActivityThread.java: 2976) at android.app.ActivityThread.handleSendResult(ActivityThread.java: 3019) at android.app.ActivityThread.access$1100(ActivityThread.java:122) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 1176) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4340) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at java.io.File.fixSlashes(File.java:185) at java.io.File.init(File.java:134) at MyActivity.onActivityResult(MyActivity.java:184) at android.app.Activity.dispatchActivityResult(Activity.java:4649) at android.app.ActivityThread.deliverResults(ActivityThread.java: 2972) ... 11 more java.lang.NullPointerException at java.io.File.fixSlashes(File.java:185) at java.io.File.init(File.java:134) at MyActivity.onActivityResult(MyActivity.java:184) at android.app.Activity.dispatchActivityResult(Activity.java:4649) at android.app.ActivityThread.deliverResults(ActivityThread.java: 2972) at android.app.ActivityThread.handleSendResult(ActivityThread.java: 3019) at android.app.ActivityThread.access$1100(ActivityThread.java:122) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 1176) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4340) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Andrew wrote: 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 toPicasa-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) :
[android-developers] Re: Gallery Intent to pick image --- Picasa-based images are invalid (Android 4.0+)
I can confirm having this same bug only with picasa images on Honeycomb and ICS. Code: file = new File(getPath(intent.getData())); java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content:// com.google.android.gallery3d.provider/picasa/item/ 5685218575016337410 }} to activity {MyActivity}: java.lang.NullPointerException at android.app.ActivityThread.deliverResults(ActivityThread.java: 2976) at android.app.ActivityThread.handleSendResult(ActivityThread.java: 3019) at android.app.ActivityThread.access$1100(ActivityThread.java:122) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 1176) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4340) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at java.io.File.fixSlashes(File.java:185) at java.io.File.init(File.java:134) at MyActivity.onActivityResult(MyActivity.java:184) at android.app.Activity.dispatchActivityResult(Activity.java:4649) at android.app.ActivityThread.deliverResults(ActivityThread.java: 2972) ... 11 more java.lang.NullPointerException at java.io.File.fixSlashes(File.java:185) at java.io.File.init(File.java:134) at MyActivity.onActivityResult(MyActivity.java:184) at android.app.Activity.dispatchActivityResult(Activity.java:4649) at android.app.ActivityThread.deliverResults(ActivityThread.java: 2972) at android.app.ActivityThread.handleSendResult(ActivityThread.java: 3019) at android.app.ActivityThread.access$1100(ActivityThread.java:122) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 1176) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4340) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Andrew wrote: 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] Re: Gallery Select Pic
Issue Solved by myself.. On Wed, Dec 7, 2011 at 4:56 PM, Mukesh Srivastav mukicha...@gmail.comwrote: 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 -- Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. -- 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] Re: Gallery View and SQLite database
There's a thing called The Google. Try it... http://www.tutorialforandroid.com/2009/10/how-to-insert-image-data-to-sqlite.html -- 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] Re: Gallery Problem
gallery.setSelection(int) http://developer.android.com/reference/android/widget/AbsSpinner.html#setSelection%28int%29 On Aug 30, 1:11 pm, Perry168 perry...@netvigator.com wrote: 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] Re: Gallery Problem
o..o...oo.. success! Thanks Kumar! On 8月30日, 下午4時22分, Kumar Bibek coomar@gmail.com wrote: gallery.setSelection(int) http://developer.android.com/reference/android/widget/AbsSpinner.html... On Aug 30, 1:11 pm, Perry168 perry...@netvigator.com wrote: 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] Re: Gallery: change center position?
Ok, I think there is no solution for this :) -- 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] Re: Gallery with Adapter witch is return layouts
Hi there! Yes, it is! But when I trying to return (in getView) my class (which is extended from a LinearLayout) I got child has already got parent, run removeAllView on parent. The problem is, when I try to get the parent I got NULLpointer exception... So, I don't know who am I able to upload my custrom gallery with my custrom layouts. The main problem, I can't use layoutinflater, because I'm storing the layout in a class file, not in an xml. Thx: Károly On máj. 28, 15:00, B Lyon bradfl...@gmail.com wrote: LinearLayout is a view, isn't it? View -- ViewGroup -- Linearlayout 2011/5/28 KárolyHolczhauserholczhau...@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] Re: Gallery image should navigate with textview
Can you not save references to your image views when you are creating them? On May 13, 3:34 pm, gaurav gupta gaurav.gupta...@gmail.com wrote: 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.OnI... 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] Re: Gallery image should navigate with textview
Hi , thanks 4 reply Now m setting ID for every imageview that m creating dynamically like * int * imageview_id=1; *for*(*int* i=0;itracks.size();i++) { imgview_layout=(LinearLayout)findViewById(R.id.*sub_layout*); imageview=*new* ImageView(HotelViewScreen.*this*); imageview.setImageResource(R.drawable.*gray_dot*); imageview.setId(imageview_id+i); imageview.setPadding(5, 2, 5, 2); imgview_layout.addView(imageview); } its give me id for every imageview . Now in My OnItemSelectedListener m using this Id like that: hotels_gallery .setOnItemSelectedListener(*new* OnItemSelectedListener() { @Override *public* *void* onItemSelected(AdapterView? arg0, View arg1, *int* position, *long* arg3) { // *TODO* Auto-generated method stub //Toast.makeText(HotelViewScreen.this, +arg2, Toast.LENGTH_LONG).show(); hotelName=tracks.get(position).getHotelName(); hotelCity=tracks.get(position).getHotelCity(); hotelname.setText(hotelName+,+Html.*fromHtml*(font color ='blue'+ hotelCity+/font)); *int* image_id=imgview_layout.getChildAt(position).getId(); ImageView abc=(ImageView)findViewById(image_id); abc.setImageResource(R.drawable.*yellow_dot*); } @Override *public* *void* onNothingSelected(AdapterView? arg0) { // *TODO* Auto-generated method stub } }); Now i can change the Image src everytime on OnSelectedListener. Now every selected gallery item's indicator image is becoming yellow . my requirement is that i need only selected gallery item's image should to change. rest of all indicator will gray ,selected gallery item will be yellow. On Sat, May 14, 2011 at 1:23 AM, ashutoshmimani ashutoshmim...@gmail.comwrote: Can you not save references to your image views when you are creating them? On May 13, 3:34 pm, gaurav gupta gaurav.gupta...@gmail.com wrote: 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.com wrote: 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.OnI... 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 --
Re: [android-developers] Re: Gallery image should navigate with textview
The best way to do that is to use a StateListDrawable: http://developer.android.com/reference/android/graphics/drawable/StateListDrawable.html That's what I did with AppSwipe! on the Android Market. The selected item has a blue background with a gradient. Everything else in the list has a transparent background. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Fri, May 13, 2011 at 2:07 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: Hi , thanks 4 reply Now m setting ID for every imageview that m creating dynamically like * int * imageview_id=1; *for*(*int* i=0;itracks.size();i++) { imgview_layout=(LinearLayout)findViewById(R.id.*sub_layout*); imageview=*new* ImageView(HotelViewScreen.*this*); imageview.setImageResource(R.drawable.*gray_dot*); imageview.setId(imageview_id+i); imageview.setPadding(5, 2, 5, 2); imgview_layout.addView(imageview); } its give me id for every imageview . Now in My OnItemSelectedListener m using this Id like that: hotels_gallery .setOnItemSelectedListener(*new* OnItemSelectedListener() { @Override *public* *void* onItemSelected(AdapterView? arg0, View arg1, *int* position, *long* arg3) { // *TODO* Auto-generated method stub //Toast.makeText(HotelViewScreen.this, +arg2, Toast.LENGTH_LONG).show(); hotelName=tracks.get(position).getHotelName(); hotelCity=tracks.get(position).getHotelCity(); hotelname.setText(hotelName+,+Html.*fromHtml*(font color ='blue'+ hotelCity+/font)); *int* image_id=imgview_layout.getChildAt(position).getId(); ImageView abc=(ImageView)findViewById(image_id); abc.setImageResource(R.drawable.*yellow_dot*); } @Override *public* *void* onNothingSelected(AdapterView? arg0) { // *TODO* Auto-generated method stub } }); Now i can change the Image src everytime on OnSelectedListener. Now every selected gallery item's indicator image is becoming yellow . my requirement is that i need only selected gallery item's image should to change. rest of all indicator will gray ,selected gallery item will be yellow. On Sat, May 14, 2011 at 1:23 AM, ashutoshmimani ashutoshmim...@gmail.comwrote: Can you not save references to your image views when you are creating them? On May 13, 3:34 pm, gaurav gupta gaurav.gupta...@gmail.com wrote: 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.OnI... 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
Re: [android-developers] Re: Gallery image should navigate with textview
hi , thank u all guys i did it :) thanks 4 ur support On Sat, May 14, 2011 at 1:51 AM, Justin Anderson magouyaw...@gmail.comwrote: The best way to do that is to use a StateListDrawable: http://developer.android.com/reference/android/graphics/drawable/StateListDrawable.html That's what I did with AppSwipe! on the Android Market. The selected item has a blue background with a gradient. Everything else in the list has a transparent background. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Fri, May 13, 2011 at 2:07 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: Hi , thanks 4 reply Now m setting ID for every imageview that m creating dynamically like * int * imageview_id=1; *for*(*int* i=0;itracks.size();i++) { imgview_layout=(LinearLayout)findViewById(R.id.*sub_layout*); imageview=*new* ImageView(HotelViewScreen.*this*); imageview.setImageResource(R.drawable.*gray_dot*); imageview.setId(imageview_id+i); imageview.setPadding(5, 2, 5, 2); imgview_layout.addView(imageview); } its give me id for every imageview . Now in My OnItemSelectedListener m using this Id like that: hotels_gallery .setOnItemSelectedListener(*new* OnItemSelectedListener() { @Override *public* *void* onItemSelected(AdapterView? arg0, View arg1, *int* position, *long* arg3) { // *TODO* Auto-generated method stub //Toast.makeText(HotelViewScreen.this, +arg2, Toast.LENGTH_LONG).show(); hotelName=tracks.get(position).getHotelName(); hotelCity=tracks.get(position).getHotelCity(); hotelname.setText(hotelName+,+Html.*fromHtml*(font color ='blue'+ hotelCity+/font)); *int* image_id=imgview_layout.getChildAt(position).getId(); ImageView abc=(ImageView)findViewById(image_id); abc.setImageResource(R.drawable.*yellow_dot*); } @Override *public* *void* onNothingSelected(AdapterView? arg0) { // *TODO* Auto-generated method stub } }); Now i can change the Image src everytime on OnSelectedListener. Now every selected gallery item's indicator image is becoming yellow . my requirement is that i need only selected gallery item's image should to change. rest of all indicator will gray ,selected gallery item will be yellow. On Sat, May 14, 2011 at 1:23 AM, ashutoshmimani ashutoshmim...@gmail.com wrote: Can you not save references to your image views when you are creating them? On May 13, 3:34 pm, gaurav gupta gaurav.gupta...@gmail.com wrote: 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.OnI... 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
[android-developers] Re: Gallery default item selected is in center
Thanks everyone for the reply. 1. On click of item it should be selected but should not come to center. 2. And the First elements left side is empty, Dont want that. I don't think there is any library for this. :( -- 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] Re: Gallery default item selected is in center
For a start there are probably non-public methods and fields in other classes that Gallery uses from the widget package. SO just copy that one class is not going to be sufficient. The bigger problem is that Gallery does provide the hooks needed to accomplish what you want (which is unfortunate I agree). On Mar 24, 9:20 am, Justin Anderson magouyaw...@gmail.com wrote: * 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 Developerhttp://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] Re: Gallery default item selected is in center
Seems like this comes up a lot - many people want an non-center-locked horizontal scrolling list. There are lots of posts here and on StackOverflow about this. Some of the suggested workarounds are partly effective, but I have not found a fully working HorizontalListView yet. Gallery is great, if you want what it does. The two non-Gallery features that keep being requested are - - non centered locked so the item you click doesn't jump to the center - left and right flush so it does not scroll item one beyond the left edge, and it doesn't scroll the last item beyond the right edge Does such a widget exist publicly out there anywhere? On Mar 23, 4:06 pm, Justin Anderson magouyaw...@gmail.com wrote: * 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 Developerhttp://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] Re: Gallery doesn't both click and drag
Oops - I was using setOnCLickListener() [wrong thing to do] on the item instead of setOnItemClickListener() on the Gallery [right thing to do]. On Dec 1, 3:54 pm, jotobjects jotobje...@gmail.com wrote: 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] Re: Gallery Control Fling operation
Did you find any thing... -- 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] Re: Gallery Control Fling operation
Can you post some code for your touch or click handlers if you have any? On Oct 25, 5:03 pm, Vicky vivekkumarkohli1...@gmail.com wrote: 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] Re: Gallery widget, focus and selection gone?
I'm facing the same problem. Did you find any solution? On Aug 26, 12:13 pm, Sebastián Treu sebastian.t...@gmail.com wrote: Hi there, I'm trying to realize how the focus and selection in theGallery widget is doing their job. I'm facing weird situations when trying to update information (TextViews and Spinner) upon aselecteditem in theGallery. The focus and selection is lost. So, using the resource gallery_item_background will end in showing the unselected background for the currentselectedimage. 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 theGallery) 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 theGallery(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 theGallerywithout losing focus or theselectedstate of the image view? Thanks, -- If you want freedom, compile the source. Sebastián Treuhttp://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] Re: Gallery popup menu
Больно читать такое искажение английского языка! Вы написали бы, Click on any button and a balloon menu appears. On Sep 7, 6:07 am, viktor victor.scherb...@gmail.com wrote: Not exactly context menu, this menu seems like as balloon. I cant see this menu on emulator but on devise 2.2 is there. Go to Gallery, select poto, at bottom you can see option menu, there are More ... Share buttons. Click on any, balloon menu is appear!!! On 7 Вер, 14:41, Mark Murphy mmur...@commonsware.com wrote: 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/commonsguyhttp://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] Re: Gallery popup menu
Thanks TreKing, I did this menu, it is really looks nice. On 8 Вер, 18:33, TreKing treking...@gmail.com wrote: On Wed, Sep 8, 2010 at 4:15 AM, viktor victor.scherb...@gmail.com wrote: Any ideas how to do that menu Did you even look at the link I posted? --- -- 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] Re: Gallery popup menu
I captured phone screen, look at left, you can see what I mean. Share menu pressed and sub menu is appear. http://xmages.net/storage/10/1/0/9/8/upload/c509163f.png Nexus One Android 2.2, Standard Gallery application. Any ideas how to do that 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] Re: Gallery popup menu
On Wed, Sep 8, 2010 at 4:15 AM, viktor victor.scherb...@gmail.com wrote: Any ideas how to do that menu Did you even look at the link I posted? - 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] Re: Gallery popup menu
Not exactly context menu, this menu seems like as balloon. I cant see this menu on emulator but on devise 2.2 is there. Go to Gallery, select poto, at bottom you can see option menu, there are More ... Share buttons. Click on any, balloon menu is appear!!! On 7 Вер, 14:41, Mark Murphy mmur...@commonsware.com wrote: 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/commonsguyhttp://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
Re: [android-developers] Re: Gallery popup menu
On Tue, Sep 7, 2010 at 9:07 AM, viktor victor.scherb...@gmail.com wrote: Not exactly context menu, this menu seems like as balloon. I cant see this menu on emulator but on devise 2.2 is there. Go to Gallery, select poto, at bottom you can see option menu, there are More ... Share buttons. Click on any, balloon menu is appear!!! Ah. Well, here is a sample project that shows how to create balloons, though in the context of a map: http://github.com/jgilfelt/android-mapviewballoons You might also be able to pinch some code from the implementation of QuickContactBadge from the Android source code. -- 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
Re: [android-developers] Re: Gallery popup menu
On Tue, Sep 7, 2010 at 8:07 AM, viktor victor.scherb...@gmail.com wrote: Click on any, balloon menu is appear!!! I *think* you're looking for PopupWindowhttp://developer.android.com/reference/android/widget/PopupWindow.html . - 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] Re: Gallery elasticity at the ends
Hi Nik, thanks for posting the sample code. I used a lot of that when working on my own project. If your interested I have posted up some sample code that does a similar thing in a different way (gets round some problems I had with Gallery) at http://groups.google.com/group/android-developers/t/c45bbf070a58303b -- 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] Re: Gallery elasticity at the ends
Great. The gallery has some problems with the physics elements that make it feel clunky and not delightful especially when it is used in full-screen mode. Unfortunately its not easy to fix in a subclass due to internal unexposed variables in the super class. Will definitely look at your code. Thanks Nik On Jun 14, 1:04 am, droidful austral...@gmail.com wrote: HiNik, thanks for posting the sample code. I used a lot of that when working on my own project. If your interested I have posted up some sample code that does a similar thing in a different way (gets round some problems I had with Gallery) athttp://groups.google.com/group/android-developers/t/c45bbf070a58303b -- 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] Re: Gallery elasticity at the ends
Sorry about that, correct link is http://groups.google.com/group/android-developers/browse_thread/thread/27d5f678be44c370/3f5ec157b3717e3f#3f5ec157b3717e3f. -- 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] Re: Gallery elasticity at the ends
Sorry. Updated the link. I also have the whole project including apk on my Zumo drive at http://www.zumodrive.com/share/5SBbYzk0Mj. On 6/14/10, droidful austral...@gmail.com wrote: Sorry about that, correct link is http://groups.google.com/group/android-developers/browse_thread/thread/27d5f678be44c370/3f5ec157b3717e3f#3f5ec157b3717e3f. -- 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] Re: Gallery elasticity at the ends
I added 2 dummy views at the ends of the Gallery then wrote a onItemSelectedListener that essentially listens for items 0 and the last item (the dummy views) and sets the selection to 1 and the last item -1 respectively. This creates the bounce me having to do any animations! I created a full screen gallery view and each item in the adapter takes up the entire screen (just like a home screen with various full screen panels). I also modified the onFling so the gallery only moves one screen at a time (much like an Android or iPhone home screen). I uploaded the code and a sample movie of what I did on Google Code: http://code.google.com/p/androidanimations/downloads/detail?name=androidmodifiedgallery.movcan=2q= http://code.google.com/p/androidanimations/downloads/list Here are some snippets of the modified Gallery: - package com.nikb.gallery; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.Display; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.Gallery; import android.widget.SpinnerAdapter; import android.widget.TextView; import android.widget.AdapterView.OnItemSelectedListener; public class ModifiedGallery extends Gallery { private static final boolean ISLOG = true; private static final String TAG = ModifiedGallery.class.getSimpleName(); private float modifiedVelocityX; public ModifiedGallery(Context context) { super(context); init(); } public ModifiedGallery(Context context, AttributeSet attrs) { super(context, attrs); init(); } public ModifiedGallery(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); } private void init() { Display display = ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); if (ISLOG) Log.d(TAG, Width is + display.getWidth() + and height is + display.getHeight()); modifiedVelocityX = (float) (width * 1.7); setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView? arg0, View arg1, int arg2, long arg3) { int pos = getSelectedItemPosition(); Log.d(TAG, Selected item is + getSelectedItemPosition()); if (pos == 0) { Log.d(TAG, Animating to the first item); setSelection(1); } else { int count = getCount(); if (pos == count - 1) { Log.d(TAG, Animating to + (count - 2)); setSelection(count - 2); } } } @Override public void onNothingSelected(AdapterView? arg0) { } }); } @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { float mod = velocityX 0 ? -modifiedVelocityX : modifiedVelocityX; if (getSelectedItemPosition() == 1 || getSelectedItemPosition() == getAdapter().getCount() - 2) { mod = velocityX 0 ? -1 : 1; } if (ISLOG) Log.d(TAG, Original velocity X was + velocityX + modified velocity is + mod); return super.onFling(e1, e2, mod, velocityY); } @Override public void setAdapter(SpinnerAdapter adapter) { super.setAdapter(new BounceGalleryAdapter(adapter)); setSelection(1); // set it to the first position by default } class BounceGalleryAdapter extends BaseAdapter { private static final int ELASTICITY_DIP = 50; //how far to stretch at the ends private SpinnerAdapter mAdapter; private TextView dummyText2; private TextView dummyText1; private LayoutInflater layoutInflater; public BounceGalleryAdapter(SpinnerAdapter adapter)
[android-developers] Re: Gallery elasticity at the ends
I don't think I understand your suggestion Gyan. I think you are guiding me towards a Layout Animation which is not really what my requirement is. I am trying to signal to the user that they have reached the end of the gallery via the fact that they try to drag past the first or last item and instead of the gallery not moving at all, I want to have an elastic feel at the end. Again, very similar to the iPhone home screen in which there is a little elastic effect when you go to the last screen that you have it it has a little elasticity. -- 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] Re: Gallery elasticity at the ends
Hey Nik... I got what you are trying to implement. If I'm not wrong its called inertial scrolling. You can see google scoreboard app in the market which has this already not exactly though. When that app came out first I tried implementing the feel through layout animation. The page contained empty space on either ends of the list as list items without the ListSeperator which onLoad scrolls back to the top or bottom of the list - smooth and quick - as you let go of the touch. I had implemented that through layout animation I bet there would be other ways of doing it... 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] Re: Gallery android:unselectedAlpha works strangely
I am facing the same issue. android:unselectedAlpha works fine if you use 'android:galleryItemBackground, styleable for your gallery. But without that styleable it gives problem. I don't know what is the reason, does any one has any idea or solution to make it work without default styleable. On Mar 27, 5:47 pm, arnouf arnaud.far...@gmail.com wrote: 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
[android-developers] Re: Gallery view weird green color
For people who face the same problem, try set Gallery android:unselectedAlpha=255. It fixed my issue :) On Feb 10, 10:13 am, sleith raysle...@gmail.com wrote: 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] Re: Gallery positioning first item
Well, so far my solution is to rewrite the full Gallery class, with an only change like : private int getCenterOfGallery() { return 40; // Or whatever you want. } ... surely not the best way to do it ;-) ! Regards, G. On Feb 3, 4:55 pm, Andr dev dev.android.al...@gmail.com wrote: 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] Re: gallery
Well, I haven't tried it out, but I guess, you need to use the scrollTo or scrollBy method. But creating a complete sync is a difficult task, I guess. Kumar Bibek http://tech-droid.blogspot.com On Jan 11, 4:29 pm, tina lincon tina.theresalin...@wipro.com wrote: 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] Re: gallery
okaa..taanxx...:) On Jan 12, 3:36 am, Kumar Bibek coomar@gmail.com wrote: Well, I haven't tried it out, but I guess, you need to use the scrollTo or scrollBy method. But creating a complete sync is a difficult task, I guess. Kumar Bibekhttp://tech-droid.blogspot.com On Jan 11, 4:29 pm, tina lincon tina.theresalin...@wipro.com wrote: 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?- Hide quoted text - - Show quoted text - -- 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] Re: Gallery usage without using styleable
I ran into the same issue. The method call is not seen by the compiler. Use an object of the class Context to make that method call. If you are continuing the HelloGallery Example, there is a Context object already being used called mContext. So my code looks like this: public ImageAdapter2(Context c) { mContext = c; TypedArray a = mContext.obtainStyledAttributes (R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId (R.styleable.default_gallery_android_galleryItemBackground, 0); a.recycle(); } After this change the example worked fine. Hope this helps, HIFI_LEO On Jun 3, 7:16 am, yaiza yaiza.tempr...@gmail.com wrote: Thank, lilbyrdie. It helped me a lot :) The thing is I'm still getting an error in function obtainStyledAttributes, where the compiler says that obtainStyledAttributes(int[]) is undefined. I have that class extending BaseAdapter. What am I missing? Should I be implementing an Interface or something? Thanks! Yaiza. On 13 mayo, 20:27, lilbyrdie kf6...@gmail.com wrote: I've answered my own question. Net result is the same, just a different way of getting to the default theme resources, but it's what I was missing. Within your attrs.xml file, place a block that looks like the following: declare-styleable name=default_gallery attr name=android:galleryItemBackground / /declare-styleable This basically provides access to the galleryItemBackground in the same way as before, but explicitly making it a styleable now. This is now used as before: Within the ImageUriAdapter(), load the background: TypedArray a = obtainStyledAttributes(R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0); a.recycle(); Then, within the getView(), apply the background: imageView.setBackgroundResource(mGalleryItemBackground); I hope this helps someone. On May 12, 12:43 pm, lilbyrdie kf6...@gmail.com wrote: Hello, I'm trying to find the correct new way to do imageGalleryitems, previously (as also documented here:http://developer.android.com/guide/tutorials/views/hello-gallery.html and herehttp://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/threa...) even though theGalleryassumes it will be used (see aboveGallery documentation). The net effect is that, without this, agallerywith 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?- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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] Re: Gallery View using images from file (Dynamic vs. Static images)
may be this can help you out http://learningandroid.org/tutorial/2009/02/gallery-tutorial-file-location On Jul 2, 2:06 am, Logik yaros...@gmail.com wrote: 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] Re: Gallery usage without using styleable
On 13 mayo, 20:27, lilbyrdie kf6...@gmail.com wrote: I've answered my own question. Net result is the same, just a different way of getting to the default theme resources, but it's what I was missing. Within your attrs.xml file, place a block that looks like the following: declare-styleable name=default_gallery attr name=android:galleryItemBackground / /declare-styleable This basically provides access to the galleryItemBackground in the same way as before, but explicitly making it a styleable now. This is now used as before: Within the ImageUriAdapter(), load the background: TypedArray a = obtainStyledAttributes(R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0); a.recycle(); Then, within the getView(), apply the background: imageView.setBackgroundResource(mGalleryItemBackground); I hope this helps someone. Thank, lilbyrdie. It helped me a lot :) The thing is I'm still getting an error in function obtainStyledAttributes, where the compiler says that obtainStyledAttributes(int[]) is undefined. I have that class extending BaseAdapter. What am I missing? Should I be implementing an Interface or something? Thanks! Yaiza. --~--~-~--~~~---~--~~ 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] Re: Gallery usage without using styleable
Thank, lilbyrdie. It helped me a lot :) The thing is I'm still getting an error in function obtainStyledAttributes, where the compiler says that obtainStyledAttributes(int[]) is undefined. I have that class extending BaseAdapter. What am I missing? Should I be implementing an Interface or something? Thanks! Yaiza. On 13 mayo, 20:27, lilbyrdie kf6...@gmail.com wrote: I've answered my own question. Net result is the same, just a different way of getting to the default theme resources, but it's what I was missing. Within your attrs.xml file, place a block that looks like the following: declare-styleable name=default_gallery attr name=android:galleryItemBackground / /declare-styleable This basically provides access to the galleryItemBackground in the same way as before, but explicitly making it a styleable now. This is now used as before: Within the ImageUriAdapter(), load the background: TypedArray a = obtainStyledAttributes(R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0); a.recycle(); Then, within the getView(), apply the background: imageView.setBackgroundResource(mGalleryItemBackground); I hope this helps someone. On May 12, 12:43 pm, lilbyrdie kf6...@gmail.com wrote: 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 herehttp://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/threa...) 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] Re: Gallery usage without using styleable
Thank, lilbyrdie. It helped me a lot :) The thing is I'm still getting an error in function obtainStyledAttributes, where the compiler says that obtainStyledAttributes(int[]) is undefined. I have that class extending BaseAdapter. What am I missing? Should I be implementing an Interface or something? Thanks! Yaiza. On 13 mayo, 20:27, lilbyrdie kf6...@gmail.com wrote: I've answered my own question. Net result is the same, just a different way of getting to the default theme resources, but it's what I was missing. Within your attrs.xml file, place a block that looks like the following: declare-styleable name=default_gallery attr name=android:galleryItemBackground / /declare-styleable This basically provides access to the galleryItemBackground in the same way as before, but explicitly making it a styleable now. This is now used as before: Within the ImageUriAdapter(), load the background: TypedArray a = obtainStyledAttributes(R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0); a.recycle(); Then, within the getView(), apply the background: imageView.setBackgroundResource(mGalleryItemBackground); I hope this helps someone. On May 12, 12:43 pm, lilbyrdie kf6...@gmail.com wrote: Hello, I'm trying to find the correct new way to do imageGalleryitems, previously (as also documented here:http://developer.android.com/guide/tutorials/views/hello-gallery.html and herehttp://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/threa...) even though theGalleryassumes it will be used (see aboveGallery documentation). The net effect is that, without this, agallerywith 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] Re: Gallery usage without using styleable
On 13 mayo, 20:27, lilbyrdie kf6...@gmail.com wrote: I've answered my own question. Net result is the same, just a different way of getting to the default theme resources, but it's what I was missing. Within your attrs.xml file, place a block that looks like the following: declare-styleable name=default_gallery attr name=android:galleryItemBackground / /declare-styleable This basically provides access to the galleryItemBackground in the same way as before, but explicitly making it a styleable now. This is now used as before: Within the ImageUriAdapter(), load the background: TypedArray a = obtainStyledAttributes(R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0); a.recycle(); Then, within the getView(), apply the background: imageView.setBackgroundResource(mGalleryItemBackground); I hope this helps someone. Thanks, lilbyrdie! It helped me a lot :) What I don't undersstand is why the compiler tells me that the function obtainStyledAttributes(int[]) doesn't exist. Do I have to implement an interface or something? I have imported the android.content.res.Resources.Theme class, but it doesn't care. What am I missing? :-S --~--~-~--~~~---~--~~ 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] Re: Gallery tutorial issue
* **visit my site and earn more money** * * http://latesttechnologyinfo.com/* * http://latesttechnologyinfo.com/* * http://latesttechnologyinfo.com/* * http://latesttechnologyinfo.com/* * http://latesttechnologyinfo.com/* * http://latesttechnologyinfo.com/ * * **http://latesttechnologyinfo.com/* --~--~-~--~~~---~--~~ 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] Re: Gallery usage without using styleable
I've answered my own question. Net result is the same, just a different way of getting to the default theme resources, but it's what I was missing. Within your attrs.xml file, place a block that looks like the following: declare-styleable name=default_gallery attr name=android:galleryItemBackground / /declare-styleable This basically provides access to the galleryItemBackground in the same way as before, but explicitly making it a styleable now. This is now used as before: Within the ImageUriAdapter(), load the background: TypedArray a = obtainStyledAttributes(R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0); a.recycle(); Then, within the getView(), apply the background: imageView.setBackgroundResource(mGalleryItemBackground); I hope this helps someone. On May 12, 12:43 pm, lilbyrdie kf6...@gmail.com wrote: 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 herehttp://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/threa...) 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] Re: Gallery Child View Problem
How did you get rid of the onFling event? It sounds like whatever you did to achieve that also broke scrolling. On Mon, Apr 13, 2009 at 8:22 AM, Alekh alek...@gmail.com wrote: 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] Re: Gallery Child View Problem
Actually I wanted only one image to be scrolled at a time when we swipe with the finger. Like the image viewer in the iPhone. Or like the desktop screens that android has. So all i did is, I overrided the onFling event and just returned true. So now, if i swipe with my finger, i get only the next or the previous image. But it now doesn't respond to the dpad. I dunno what is wrong. I tried requestFocus() but nothing seems to work. Yes u r right. I dint want scrolling in gallery. Any suggestions? How do i get the default functionality of the gallery view by just extending it? i.e. the dpad left and right keys.. Pls reply fast. I m stuck here. On Apr 13, 10:11 pm, Marco Nelissen marc...@android.com wrote: How did you get rid of the onFling event? It sounds like whatever you did to achieve that also broke scrolling. On Mon, Apr 13, 2009 at 8:22 AM, Alekh alek...@gmail.com wrote: 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] Re: Gallery Child View Problem
Ok the problem has been solved!! When extending the GalleryView, if we set the spacing between images using the setSpacing(), the Dpad doesn't allow scrolling. If we don't use setSpacing(), the Dpad works as intended. I would like to know if this is a bug or is it designed in this way. Coz I don't understand why the dpad events dont work when setSpacing() is used.. Pls reply.. On Apr 14, 9:28 am, Alekh alek...@gmail.com wrote: Actually I wanted only one image to be scrolled at a time when we swipe with the finger. Like the image viewer in the iPhone. Or like the desktop screens that android has. So all i did is, I overrided the onFling event and just returned true. So now, if i swipe with my finger, i get only the next or the previous image. But it now doesn't respond to the dpad. I dunno what is wrong. I tried requestFocus() but nothing seems to work. Yes u r right. I dint want scrolling ingallery. Any suggestions? How do i get the default functionality of thegalleryview by just extending it? i.e. the dpad left and right keys.. Pls reply fast. I m stuck here. On Apr 13, 10:11 pm, Marco Nelissen marc...@android.com wrote: How did you get rid of the onFling event? It sounds like whatever you did to achieve that also broke scrolling. On Mon, Apr 13, 2009 at 8:22 AM, Alekh alek...@gmail.com wrote: I have created achildclass from theGalleryview, named MyGallery. I did this because I wanted to get rid of the onFling event in the galleryview. Having that achieved, it lead me to a different problem. Scrolling theGallerywith the Dpad doesn't work now. When I tried using the originalGalleryclass, the dpad works fine. But when I extend theGalleryand use my customgalleryclass, 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] Re: Gallery and setSelection
Hi Alexey, Try calling notifyDataSetIvalidated before repopulating your adapter and/or notifyDataSetChanged after. Cheers, Horia On Feb 12, 7:12 am, Alexey avolo...@gmail.com wrote: Ok everything is being called correctly with setSelection. However in my case i'm not getting callback because i'm at item 0 in the gallery. Then i'm adding a view to the adapter, to the top and try to set a selection. And it doesn't trigger callback, because, i think , from gallery point of view nothing get changed, we're still at position 0. I'm not sure how to get around this yet . On Feb 11, 5:02 pm, Alexey avolo...@gmail.com wrote: 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] Re: Gallery and setSelection
setSelection doesn't generate any events, so your listener never hear anything. I think someone worked out a way to inject an event but I can't find it now. On Feb 11, 4:02 pm, Alexey avolo...@gmail.com wrote: 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] Re: Gallery and setSelection
Well it's pretty clear that event is not firing, my question is how to get it to fire. I'm adding/removing a TextView to a gallery and want that view get selected in the gallery. On Feb 11, 5:09 pm, Sundog sunns...@gmail.com wrote: setSelection doesn't generate any events, so your listener never hear anything. I think someone worked out a way to inject an event but I can't find it now. On Feb 11, 4:02 pm, Alexey avolo...@gmail.com wrote: 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] Re: Gallery and setSelection
I was trying to make clear WHY it didn't fire. Hopefully the person who solved it before will see this. On Feb 11, 6:43 pm, Alexey avolo...@gmail.com wrote: Well it's pretty clear that event is not firing, my question is how to get it to fire. I'm adding/removing a TextView to a gallery and want that view get selected in the gallery. On Feb 11, 5:09 pm, Sundog sunns...@gmail.com wrote: setSelection doesn't generate any events, so your listener never hear anything. I think someone worked out a way to inject an event but I can't find it now. On Feb 11, 4:02 pm, Alexey avolo...@gmail.com wrote: 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] Re: Gallery and setSelection
can u pls send the code for ur query? On Feb 12, 7:24 am, Sundog sunns...@gmail.com wrote: I was trying to make clear WHY it didn't fire. Hopefully the person who solved it before will see this. On Feb 11, 6:43 pm, Alexey avolo...@gmail.com wrote: Well it's pretty clear that event is not firing, my question is how to get it to fire. I'm adding/removing a TextView to a gallery and want that view get selected in the gallery. On Feb 11, 5:09 pm, Sundog sunns...@gmail.com wrote: setSelection doesn't generate any events, so your listener never hear anything. I think someone worked out a way to inject an event but I can't find it now. On Feb 11, 4:02 pm, Alexey avolo...@gmail.com wrote: 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- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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] Re: Gallery and setSelection
I don't make a query i have a Gallery with custom adapter. I'm adding new item to the adapter by removing all items and putting everything back, along with new item. Now i want to set selection in my gallery to that new item. On Feb 11, 10:04 pm, Munish munish.sha...@lntinfotech.com wrote: can u pls send the code for ur query? On Feb 12, 7:24 am, Sundog sunns...@gmail.com wrote: I was trying to make clear WHY it didn't fire. Hopefully the person who solved it before will see this. On Feb 11, 6:43 pm, Alexey avolo...@gmail.com wrote: Well it's pretty clear that event is not firing, my question is how to get it to fire. I'm adding/removing a TextView to a gallery and want that view get selected in the gallery. On Feb 11, 5:09 pm, Sundog sunns...@gmail.com wrote: setSelection doesn't generate any events, so your listener never hear anything. I think someone worked out a way to inject an event but I can't find it now. On Feb 11, 4:02 pm, Alexey avolo...@gmail.com wrote: 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- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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] Re: Gallery and setSelection
Ok everything is being called correctly with setSelection. However in my case i'm not getting callback because i'm at item 0 in the gallery. Then i'm adding a view to the adapter, to the top and try to set a selection. And it doesn't trigger callback, because, i think , from gallery point of view nothing get changed, we're still at position 0. I'm not sure how to get around this yet . On Feb 11, 5:02 pm, Alexey avolo...@gmail.com wrote: 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] Re: Gallery setScrollIndicators
Hi, Anyone? Do I need to do custom righlt/left scroll images? Thanks. On Nov 22, 7:29 pm, A R [EMAIL PROTECTED] wrote: Hi, I want to have right and left scrolll indicators which will scroll the gallery. I searched and found that earlier version of SDK had Gallery.setScrollIndicators(View, View) but its not there anymore. What is the suggested alternative? I will appreciate any advice/ pointers? Regards,Amit. --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: gallery issues
Okay, I'll do what I can, thanks! On Jul 22, 10:50 am, Mark Murphy [EMAIL PROTECTED] wrote: I misspoke, I'm not using a listview to display the gallery, i'm using a LinearLayout. That's less painful-sounding... ;-) That being said, I'm not completely sure what the answer is. On a desktop, this would be called tab order, and you'd go through some gyrations to determine the tab sequence of the widgets. It's not obvious how tab order works when the switch-widget action (arrow key/D-pad) has use in the widget itself. If we have to do this by hand, the answer probably is for you to trap the actions that you want turned into focus changes, call focusSearch() to find the right widget to give focus to, and call requestFocus() on it to give it the focus. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ -- Available Now! --~--~-~--~~~---~--~~ 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] Re: gallery issues
1) My gallery is an element in a list view right now... Ow. 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). It's probably a question of focus. There may be ways to hack around it by manually forwarding key events from your gallery to the list. You could try using dispatchKeyEvent() for this, though I've never tried it. What's the value in having a gallery as a row in a list versus just being in a regular container? If scrolling is all you're after, doesn't ScrollView address that issue? 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. This is probably #1 in reverse. You'd need to try to forward the relevant key events from other widgets to the gallery or otherwise do the left/right processing on the gallery's behalf. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ -- Available Now! --~--~-~--~~~---~--~~ 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] Re: Gallery OnItemClicked event issue!
Hi JY, I haven't tried clicking the center button yet and I don't intend to do that because I want the user interact with my app through touch screen. That's why I tried to figure out how to handle OnItemClicked event of the gallery. However as it's a bug of android, I have to find another way around until the new sdk version is released. Colin On Apr 9, 11:48 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Colin, Have you tried clicking the center button of the keypad? I can't just click the image ingalleryusing mouse but if focus thegalleryand then click the center button then I am able to see that the event is delivered to your callback. JY On Apr 9, 10:28 am, ColinHo [EMAIL PROTECTED] wrote: I'm implementing an application usingGalleryobj. 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 ofGallerybefore 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 -~--~~~~--~~--~--~---
[android-developers] Re: Gallery OnItemClicked event issue!
Colin, Have you tried clicking the center button of the keypad? I can't just click the image in gallery using mouse but if focus the gallery and then click the center button then I am able to see that the event is delivered to your callback. JY On Apr 9, 10:28 am, ColinHo [EMAIL PROTECTED] wrote: 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 -~--~~~~--~~--~--~---