[android-developers] Re: Twitter app's popup aligned with ListView item - how did they do it?

2010-06-10 Thread Nerdrow
() { @Override public void onClick(View v) { popupWindow.dismiss(); } } ); On May 27, 1:23 am, ionel ionelt2...@gmail.com wrote: Can you put some code how you created PopupWindows? On May 21, 10:53 pm, Nerdrow troybe

[android-developers] Re: Twitter app's popup aligned with ListView item - how did they do it?

2010-05-21 Thread Nerdrow
I used the layouts, graphics, and animation from the default Contacts app, which uses separate layouts for the header, body, and footer, but you can merge them all into one. Create a PopupWindow, set that layout as the contentView, then use showAsDropDown(View anchor, int xoff, int yoff) to show

[android-developers] Re: Multitouch / Pinch To Zoom in Android 2.2?

2010-05-21 Thread Nerdrow
didn't find in the official documentation. So it likely isn't there until I don't look in the right place. On Fri, May 21, 2010 at 5:22 AM, Nerdrow troybe...@gmail.com wrote: There is no generic multitouch, you interpret MotionEvents and perform the zoom yourself.  Looks like they made

[android-developers] Re: Multitouch / Pinch To Zoom in Android 2.2?

2010-05-20 Thread Nerdrow
There is no generic multitouch, you interpret MotionEvents and perform the zoom yourself. Looks like they made this easier in 2.2 w/ ScaleGestureDetector, which at a glance looks to be the same as the class in Gallery2. You can read that code to see how its implemented. On May 20, 6:54 pm,

[android-developers] Re: Android 2.1 SQL Server

2010-05-17 Thread Nerdrow
You don't mean MS SQL Server, do you? As far as I'm aware there's no ODBC/JDBC driver (at least none that are public supported). Android uses SQLite, there's a few examples in the SDK, it's pretty straight- forward. On May 11, 6:46 am, Mark vbreneg...@sbcglobal.net wrote: Hello everyone,

[android-developers] Re: Image viewer widget with zooming capability

2010-05-17 Thread Nerdrow
Check the source for the Eclair Gallery app, I think the class is ImageViewTouch or something like that. I used it a while back to make a pinch-zoomable, scrollable ImageView-like widget. No standard SDK widgets that can do it right now, though. On May 12, 9:20 am, Gyan gnanesh@gmail.com

[android-developers] Re: Set Image in background

2010-04-29 Thread Nerdrow
instead of canvas.setBitmap(bitmap), you want to call canvas.drawBitmap(Bitmap bitmap, float left, float top, Paint paint) On Apr 28, 8:29 am, JV29 jeanvincent.tan...@gmail.com wrote: I am developping a live Wallpaper on android 2.1 I want to set in background a bitmap that i download on a

[android-developers] Re: Notification icon from a different package

2010-04-29 Thread Nerdrow
I can't remember it exactly off-hand, but if you can get a ResolveInfo for wherever you want to load the icon from, there's a loadIcon method there; I THINK it's ResolveInfo.loadIcon(PackageManager packageManager, Context context), where context = your current context. Search the source for

[android-developers] Re: Getting Access of Mp3 data using MediaPlayer in Android

2010-04-29 Thread Nerdrow
Search Google Code Search for Ringdroid, CheapMP3 has the method you need, you need to do the conversion of position timestamp to frames based on the statistics from the mp3 header. Everything you need is in that project, though. On Apr 26, 11:46 pm, Bingo bharatup...@gmail.com wrote: Dear All

[android-developers] Re: Android Bottombar with two buttons having different backgrounds and a common background for two buttons

2010-04-29 Thread Nerdrow
Can't you just add a LinearLayout below the ListView, set the background on that LinearLayout, then add the buttons to it? On Apr 24, 11:17 pm, cppdev paragnanded...@gmail.com wrote: Hi, I have a linear layout in my main.xml which has a listview. Now I want to create a bottom bar below

[android-developers] Re: After entry/selection is complete, how do I make the virtual qwerty keyboard go away?

2010-02-01 Thread Nerdrow
Not sure about how changing focus will work w/the soft-keyboard, but you can set the following as an OnKeyListener for your AutoCompleteTextView to hide it whenever you want @Override public boolean onKey(View v, int keyCode, KeyEvent event) { // .. or whatever key you want to use to

[android-developers] Re: Binding list views to large data sets

2010-02-01 Thread Nerdrow
The standard reply is going to be you'll never actually need to view all 20K rows, so either page it out or filter the results to a more manageable number. Then again, if an end user is willing to scroll through 20K rows, they might be willing to wait 5s for it to load :) Past that, I assume

[android-developers] Re: show more photos

2010-01-28 Thread Nerdrow
- cache the images to disk - use a ListString to store the paths to the cached images - extend a BaseAdapter and use the ListString as your data source - add a setPage(int page) method to set which page of 10 images you're on - in getView() adjust the value of position to account for the page

[android-developers] Re: android:fastScrollEnabled=true: Is there more to getting the alphabetical index?

2010-01-28 Thread Nerdrow
There's an SDK sample on this: platforms\android-?.?\samples\ApiDemos \src\com\example\android\apis\view\List9.java On Jan 27, 10:28 pm, pawpaw17 georgefraz...@yahoo.com wrote: Hi Guys, I added android:fastScrollEnabled=true to the xml description of my listview class. I was (probably

[android-developers] Re: Comparing dates in a sqlite database

2010-01-28 Thread Nerdrow
All date/time in java is epoch based anyway, so I would just store it as a long until you need to display it then use a Date object to format the output, small fast :) On Jan 27, 11:20 pm, Zsolt Vasvari zvasv...@gmail.com wrote: Sorry, I take that back I define my columns as DATETIME and

[android-developers] Re: docs for shape xml syntax

2010-01-28 Thread Nerdrow
Not a lot of good, workable documentation about this. This helped me out a lot: http://escomic.net/217 On Jan 27, 3:59 pm, jotobjects jotobje...@gmail.com wrote: Where is there information about the syntax of shape xml files. These can be used to define 2D graphics as I understand it.  There

[android-developers] Re: Adding an ArrayList of LinearLayout objects to the UI

2010-01-27 Thread Nerdrow
Is there a reason you can't just use a ListView and extend a BaseAdapter? Your method will keep all of the linear layout rows in memory as opposed to an Adapter which would recycle them for you. On Jan 27, 6:09 am, Willy Farrell willy.farr...@gmail.com wrote: I am trying to use the following

[android-developers] Re: Is there a word balloon widget/View?

2010-01-27 Thread Nerdrow
There are two 9-patch graphics in the SDK, platforms\android-?.?\data \res\drawable-hdpi\popup_inline_error.9.png and platforms\android-?.? \data\res\drawable-hdpi\popup_inline_error_above.9.png. Set either as the background of a normal TextView/other View. You might want to change the border

[android-developers] Re: how to set a word in a TextView clickable

2010-01-27 Thread Nerdrow
You're trying to allow links on specific words, right? If you're looking for standard words (like url's, phone numbers, etc), just set the autoLink property. If you have custom words that you're looking for, search the dev docs for Linkify; you'll end up creating a regex to match the words

[android-developers] Re: Workaround for Gallery recycling bug?

2010-01-20 Thread Nerdrow
of such a cache in my app Shelves: code.google.com/p/shelves. I use this technique to load hundreds of book covers. On Tue, Jan 19, 2010 at 8:53 PM, Nerdrow troybe...@gmail.com wrote: I've read in a few posts that there was an bug in the how the Gallery widget recycles views, that it was targeted

[android-developers] Workaround for Gallery recycling bug?

2010-01-19 Thread Nerdrow
I've read in a few posts that there was an bug in the how the Gallery widget recycles views, that it was targeted for Eclair, but it looks like it's still an issue. I'm trying to use an extended Gallery (all I do is override getChildStaticTransformation). The Gallery items are all simple custom

[android-developers] Re: Android Coverflow widget

2010-01-18 Thread Nerdrow
I did a similar POC overriding the getChildStaticTransformation() method of the Gallery. Like Taf's widget, you need to provide a standard adapter and should probably pre-create the mirror images (if you need them). The below runs pretty smooth on a G1 Droid, feel free to use and improve :)

[android-developers] Re: Fullscreen (no title no status bar) - UI bug in Android?

2010-01-14 Thread Nerdrow
I just tried this on a Droid w/2.0.1 and don't have any issues. Is this happening in the emulator or on an actual device? On Jan 14, 2:09 pm, Matt Hall matt.h...@gmail.com wrote: I am having the same problem - did you ever figure out a resolution to this? Or did you file a bug? Seems like a

[android-developers] Re: Can someone with a Motorola Droid call AccountManager.getAccounts() please?

2009-11-13 Thread Nerdrow
with), likely over an SSL connection, so the auth token isn't stolen. On Nov 9, 5:00 pm, Nerdrow troybe...@gmail.com wrote: I just tried this real quick on my Droid: AccountManager mgr = AccountManager.get(this); Account[] accts = mgr.getAccounts(); final int count = accts.length; Account acct

[android-developers] Re: Can someone with a Motorola Droid call AccountManager.getAccounts() please?

2009-11-09 Thread Nerdrow
I just tried this real quick on my Droid: AccountManager mgr = AccountManager.get(this); Account[] accts = mgr.getAccounts(); final int count = accts.length; Account acct = null; for(int i=0;icount;i++) { acct = accts[i]; Log.d(ACCT, eclair account - name=+acct.name+, type=+acct.type); }

[android-developers] Re: How to implement the slide effect like desktop

2009-07-09 Thread Nerdrow
Probably the easiest way is a ViewFlipper w/left right transition animations: 1) extend a ViewFlipper 2) make 4 TranslateAnimations (inFromLeft, outToLeft, inFromRight, outToRight, adjust the constructors as necessary)... private final TranslateAnimation mInFromLeft = new

[android-developers] Re: sound effect using SoundPool

2009-04-04 Thread Nerdrow
I've been able to work around most of the current bugs in SoundPool while developing a step-sequencer app, but my sticking point is stopping a non-looping sound once it's started. I've seen this code suggested here and in a few other threads as a workaround for the pause/stop bug: