Hi Jim newbies are very welcome here. as for your email problem you may need to write to the moderator. i can't help you with q1 and 2 but i will send you the links for q3 as soon a i get home in about an hour. If you want to help with the wiki just go to http://wiki.androidappcheck.com sign up and start posting.
oh and the majority of the group is helpful. Thanks On Wednesday, June 1, 2011, Jim Graham <spooky1...@gmail.com> wrote: > On Wed, Jun 01, 2011 at 12:03:46AM +0530, Raghav Sood wrote: >> Anyone who can help? > > I'm posting this to the list via e-mail ... but I'm CC'ing you, because > I'm 99% certain that whoever moderates this group has no intention of > fixing whatever is keeping me from posting via e-mail..... I AM a > newbie, after all...not exactly welcome here (at least, to some people; > others have been helpful---I have yet to figure out who is the majority > and who is the minority in that department). > > Still, I have collected a number of links to both Android and, today, > Java references/tutorials/examples. I can't promise that they're all > perfectly organized by where they should be, but the titles should > help. If you'd like me to, I'll extract them from Mozilla Seamonkey > on the Windoze side, bring them over here, and e-mail them to you > directly. > > Perhaps a section specifically for newbies? :-) I can certainly help > with that, at least, when I'm able to find something useful, that is. > > I would like to ask a favor, though...something I've asked about, and > gotten zero responses on. See below the next paragraph for details. > > Sounds like a very worthwhile effort. I can certainly vouch for all you > said about info being incomplete (a cryptic manual without examples is > just plain cryptic to someone just learning a new language, i.e., Java > and Android-specific Java), spread far and wide, non-existent, etc. > > --------------------------- CUT HERE --------------------------- > > Two things. First, I've got an Integer[] array of R.drawable.foo > pointers to filenames in res/drawable, and an integer index to said > array. It is defined in a class within my main activity class. I > also need it in another section of the code for the context menu. > The blocks of code look like this (bits in-between deleted to keep > this brief): > > public class SNGallery extends Activity { > [....] > Gallery g = (Gallery) findViewById(R.id.gallery); > [....] > g.setOnItemClickListener(new OnItemClickListener() { > String[] textValues = > getResources().getStringArray(R.array.Image_Titles); > public void onItemClick(AdapterView parent, View v, int position, > long id) { > final String image_title = textValues[position]; > Toast.makeText(SNGallery.this, image_title, > Toast.LENGTH_LONG).show(); > > [....] > > # NOTE: I have the position within the array above ("int position"). I > # don't have the array itself, and thus far, have had to re-enter it. > # This cannot possibly be the right way. > > // also show context menu for longpress on image > registerForContextMenu(g); > } > @Override > public void onCreateContextMenu(ContextMenu menu, View v, > ContextMenuInfo menuInfo) { > menu.add(R.string.wallpaper); > menu.add(R.string.info); > } > > @Override > public boolean onContextItemSelected(MenuItem item) { > AdapterContextMenuInfo info = (AdapterContextMenuInfo) > item.getMenuInfo(); > WallpaperManager manager = WallpaperManager.getInstance(this); > > > Integer[] mImageIds = { > R.drawable.srsound7500, > R.drawable.boatonsound2ndplace, > [....] > R.drawable.smokymountains6, > R.drawable.koala > }; > try { > manager.setResource(mImageIds[info.position]); > } catch (IOException e) { > e.printStackTrace(); > } > > return true; > } > [....] > > public class ImageAdapter extends BaseAdapter { > int mGalleryItemBackground; > private Context mContext; > > public Integer[] mImageIds = { > R.drawable.srsound7500, > R.drawable.boatonsound2ndplace, > [....] > R.drawable.smokymountains6, > R.drawable.koala > }; > [....] > i.setImageResource(mImageIds[position]); > i.setLayoutParams(new Gallery.LayoutParams(-1, -1)); > i.setScaleType(ImageView.ScaleType.CENTER_INSIDE); > i.setBackgroundResource(mGalleryItemBackground); > > > > --------------------------- CUT HERE --------------------------- > > Ok, this code covers both questions. > > Question 1: How, without re-writing its definition, can I reference > mImageIds from the context menu by accessing its variable > (mImageIds) in the ImageAdapter class? > > > Question 2: Bonus question.... I've already done the description text > as an array of strings in XML. Is there a way to do that > with the R.drawable.foo references, too, so that it fits > into the above code? > > Question 3: Can you point me to some *commented* example code that shows > how to A) resize the image, and B) let the user pick an > orientation to keep it in (landscape, portrait, or match > the phone's orientation) before setting it to wallpaper? > > I'll help with the links, if you like, regardless of whether or not you > help me with these, but I would definitely appreciate some help. :-) > > Thanks, > --jim > > -- > 73 DE N5IAL (/4) MiSTie #49997 < Running FreeBSD 7.0 > > spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W > > "'Wrong' is one of those concepts that depends on witnesses." > --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09) > > -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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