[android-developers] Eclipse plugin URL invalid?

2009-01-10 Thread Mark Wyszomierski
Hi, Just switched to eclipse-ganymede, was trying to get the android plugin via the getting started directions here: https://dl-ssl.google.com/android/eclipse/ but keep getting an error about that URL being invalid. Is anyone else having the same problem, the URL used to work when I was

[android-developers] Re: Eclipse plugin URL invalid?

2009-01-12 Thread Mark Wyszomierski
Thank you. On Jan 10, 3:24 pm, blindfold seeingwithso...@gmail.com wrote: Get it from here:http://code.google.com/android/adt_download.html On Jan 10, 7:48 pm, Mark Wyszomierski mar...@gmail.com wrote: Hi, Just switched to eclipse-ganymede, was trying to get the android plugin via

[android-developers] Stop TextView from taking up too much width in layout?

2009-10-06 Thread Mark Wyszomierski
Hi, I have three views within a horizontal linear layout: [ textview1 | imageview | textview2 ] I need imageview, and textview2 to expand to however much width they need, and textview1 should use whatever is left over and truncate its text (so as not to push around the other views). I

[android-developers] LinearLayout, specify children width in percentages?

2009-10-08 Thread Mark Wyszomierski
Hi, Is it possible to create a horizontal LinearLayout where we specify how wide percentage-wise each element is? Something like: LinearLayout ll = new LinearLayout(); ll.add(new TextView(a)); ll.setViewWidthAtIndex(0, 30); ll.add(new TextView(b)); ll.setViewWidthAtIIndex(1, 50);

[android-developers] Defining layout resources in a modular way?

2009-10-09 Thread Mark Wyszomierski
Hi, Is there a way to define xml layout resources in a modular way? I am building individual 'panels' through code only, it would probably make sense if each were defined in their own xml file, which I can pull at runtime, something like the following psuedocode: // PanelFarm.xml LinearLayout

[android-developers] ScrollView occupies entire screen height?

2009-10-10 Thread Mark Wyszomierski
Hi, I'm having trouble with this layout - I need a ScrollView, then a LinearLayout with a button below that: ScrollView height=fill_parent /ScrollView LinearLayout height=wrap_content Button Button /LinearLayout the scrollview pushes the linear layout under it off the screen. The

[android-developers] Is HttpGet.abort() thread-safe?

2009-10-10 Thread Mark Wyszomierski
Hi, I'm using the following method to open a url and download: public class MyWebRequest { public HttpGet httpget; public void get(String url) { httpget = new HttpGet(url); DefaultHttpClient httpclient = new DefaultHttpClient(); HttpResponse response =

[android-developers] Discerning between closing an Activity or just rotating the phone?

2009-10-14 Thread Mark Wyszomierski
Hi, Is there a reliable way to tell if an Activity is being destroyed due to rotation, or if it's really being removed from display? My activity has to do some lengthy background process. If the user is simply rotating the phone, I don't want to cancel the bg process. If the user is going to a

[android-developers] Showing ellipsis in a TextView?

2009-10-20 Thread Mark Wyszomierski
Hi, I have a normal TextView which has multiple lines. I set its max number of lines to 3. I'd like it to show an ellipsis at the end if the text is too long: TextView tv = new TextView(context); tv.setLines(tv); tv.setText(some really long text...); I tried the set ellipsis calls but it

[android-developers] Re: Showing ellipsis in a TextView?

2009-10-20 Thread Mark Wyszomierski
=end android:singleLine=true And this works perfectly for text on 1 line.. On Oct 20, 5:42 pm, Mark Wyszomierski mar...@gmail.com wrote: Hi, I have a normal TextView which has multiple lines. I set its max number of lines to 3. I'd like it to show an ellipsis at the end if the text

[android-developers] Re: Showing ellipsis in a TextView?

2009-10-21 Thread Mark Wyszomierski
Ok, that confirms what I'm seeing. I wonder if there really is a way to get the ellipsis to work for multiline text. If not, I will have to write a widget for it unfortunately! Thanks On Oct 20, 12:37 pm, Wouter wouterg...@gmail.com wrote: Yes I have searched this also before and this also

[android-developers] Prevent scrollview from getting focus?

2009-10-21 Thread Mark Wyszomierski
Hi, I manually built a ScrollView with a few LinearLayout children, like: ScrollView scroll = new ScrollView(...); for (int i = 0; i 5; i++) { LinearLayout ll = new LinearLayout(...); scroll.addView(ll); } all works fine, except when I need to disable the scroll view. I do

[android-developers] Re: Showing ellipsis in a TextView?

2009-10-21 Thread Mark Wyszomierski
:30 am, Mark Wyszomierski mar...@gmail.com wrote: Ok, that confirms what I'm seeing. I wonder if there really is a way to get the ellipsis to work for multiline text. If not, I will have to write a widget for it unfortunately! Thanks On Oct 20, 12:37 pm, Wouter wouterg...@gmail.com

[android-developers] Changing background color of widget when tapped or scrolled to?

2009-10-21 Thread Mark Wyszomierski
Hi, I made a custom widget (which is just a composite like): LinearLayout TextView /LinearLayout this widget is focusable and reacts to touches. I'd like it to change its background color to the default system highlight color when the user scrolls to it, and have it blink when the

[android-developers] Re: Changing background color of widget when tapped or scrolled to?

2009-10-21 Thread Mark Wyszomierski
/ /selector On Oct 21, 1:23 pm, Mark Wyszomierski mar...@gmail.com wrote: Hi, I made a custom widget (which is just a composite like):   LinearLayout      TextView   /LinearLayout this widget is focusable and reacts to touches. I'd like it to change its background color

[android-developers] Animation is slow?

2009-10-22 Thread Mark Wyszomierski
Hi, I'm trying to perform a simple animation, but it seems quite choppy. This is it: Animation anim = new TranslateAnimation(0,0,-50,0); anim.setDuration(500); anim.setInterpolator(new LinearInterpolator()); myLinearLayout.setAnimation(anim); the animation does what it's supposed to

[android-developers] Re: Animation is slow?

2009-10-22 Thread Mark Wyszomierski
The docs for the tweening animation package doesn't say whether the animations are done through software or hardware - are they just all software based? This may be why I'm seeing it run slowly? Thanks On Oct 22, 11:19 am, Mark Wyszomierski mar...@gmail.com wrote: Hi, I'm trying to perform

[android-developers] Pick a zoom to fit all map overlays on screen?

2009-10-23 Thread Mark Wyszomierski
Hi, I've added a few pin overlays to a MapView. Is there a way to have the MapView center and zoom itself so it automatically fits all overlays on-screen? I'm following the hello world map sample exactly - just need a way to make sure all pins are on screen when the map actually gets displayed:

[android-developers] Overlay vs ItemizedOverlay, your thoughts?

2009-10-24 Thread Mark Wyszomierski
Hi, I want to draw 20 pins on a MapActivity. Each pin has a small pin image, but I have to dynamically overlay a small bit of text over each pin at runtime. Looks like I have two options: #1) Itemized Overlay This is the suggested method. I put all my pins in one ItemizedOverlay object, and

[android-developers] Running on emulator or device?

2009-10-26 Thread Mark Wyszomierski
Hi, Is there a way to check if our code is running in the emulator vs a real device? I'm using a MapView which requires a signing key. I'm using the signature of the eclipse debug key when running on the emulator, but this won't work when I build a release version. I think I need to have a

[android-developers] Re: Running on emulator or device?

2009-10-26 Thread Mark Wyszomierski
Thanks Mark, I set this once in a global Config class: public static final boolean IS_EMULATOR = android.provider.Settings.Secure.ANDROID_ID == null; For the maps, yeah I'll have to just create the MapView instance through code, you can pass the key in through the constructor, I guess that

[android-developers] Re: Running on emulator or device?

2009-10-26 Thread Mark Wyszomierski
Thanks again Mark, you're right, this is what I changed it to: String androidId = Settings.Secure.getString (context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); Thanks On Oct 26, 4:08 pm, Mark Murphy mmur...@commonsware.com wrote: Thanks Mark, I set this once in a

[android-developers] Re: Running on emulator or device?

2009-10-26 Thread Mark Wyszomierski
This call still returns null when running on a real device: String androidId = Settings.Secure.getString (context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); do we need to add some sort of permission setting to read system settings? Thanks On Oct 26, 4:26 pm, Mark

[android-developers] Re: What's the Cost ??

2008-10-23 Thread Mark Wyszomierski
, Pulkit Arora [EMAIL PROTECTED] wrote: Ohkk, I wanted to use the phone in INDIA. So i need an unlocked G1. Will they be providing the UNLOCKED phone @ $399 , if i buy from the store ?? On Thu, Oct 23, 2008 at 11:34 AM, Mark Wyszomierski [EMAIL PROTECTED]wrote: I don't understand the $400 deal

[android-developers] Starting a new Activity

2008-10-25 Thread Mark Wyszomierski
Hi, After an Activity creates a new Activity, is it possible for the new Activity to communicate with the old one at all? Something like: Activity A is being viewed Activity creates activity B, and displays it can B communicate with A at this point? I'm creating activity B with:

[android-developers] Re: Starting a new Activity

2008-10-25 Thread Mark Wyszomierski
, Mark Murphy [EMAIL PROTECTED] wrote: Mark Wyszomierski wrote: After an Activity creates a new Activity, is it possible for the new Activity to communicate with the old one at all? Something like:     Activity A is being viewed     Activity creates activity B, and displays it     can B

[android-developers] Runtime exception with JSONObject.put() ???

2008-10-27 Thread Mark Wyszomierski
Hi, When I call: JSONObject j= new JSONObject(); j.put(mykey, hello); I get a runtime exception which has a message of: Stub! This worked fine in the beta version before the final release. Are we not supposed to be using this, or ..? Thanks

[android-developers] Re: Runtime exception with JSONObject.put() ???

2008-10-28 Thread Mark Wyszomierski
Anyone? On Oct 27, 4:33 pm, Mark Wyszomierski [EMAIL PROTECTED] wrote: Hi, When I call:     JSONObject j= new JSONObject();     j.put(mykey, hello); I get a runtime exception which has a message of:     Stub! This worked fine in the beta version before the final release. Are we

[android-developers] Terminating an application?

2008-10-31 Thread Mark Wyszomierski
Hi, When our application is started, our main Activity comes alive. In the emulator, how do you kill the application? It seems my Activity is living forever. Does the user have a choice to kill the application unless we put a menu option in to kill it? If no such option exists, how does the user

[android-developers] Re: Terminating an application?

2008-10-31 Thread Mark Wyszomierski
you do, do not put a quit or exit application button. It is useless with Android's application model. This is also contrary to how core applications work. Note that when the user presses Back, the Activity is destroyed. On Fri, Oct 31, 2008 at 11:14 AM, Mark Wyszomierski [EMAIL PROTECTED

[android-developers] How to construct View from XML resource file

2008-10-31 Thread Mark Wyszomierski
Hi, How do we construct an instance of a View derived class from an XML resource? I have something like: public class MyView extends View { public MyView(Context context) { super(context); } } How can we construct the class from an XML resource

[android-developers] Drawing many map overlays efficiently

2008-11-01 Thread Mark Wyszomierski
Hi, I have many pins I'd like to display on a map. I first tried adding each as an Overlay, but this is way too slow, as each overlay tries drawing itself even though it may not be visible within the screen view. So the question is, is one overlay instance supposed to be used per pin? Or is

[android-developers] Re: Drawing many map overlays efficiently

2008-11-02 Thread Mark Wyszomierski
myself manually? Thanks On Nov 1, 11:27 pm, Mark Wyszomierski [EMAIL PROTECTED] wrote: Hi, I have many pins I'd like to display on a map. I first tried adding each as an Overlay, but this is way too slow, as each overlay tries drawing itself even though it may not be visible within the screen

[android-developers] Using Activity.openOptionsMenu()

2008-11-02 Thread Mark Wyszomierski
Hi, Just wondering how one is supposed to use: Activity.openOptionsMenu() I'm calling it in my Activity, but it has no effect. I was expecting: onPrepareOptionsMenu(Menu menu) ; to be called afterwards, but no luck. Thanks --~--~-~--~~~---~--~~ You

[android-developers] Can't return View derived class for BaseExpandableListAdapter? (used to work)

2008-11-03 Thread Mark Wyszomierski
Hi, Trying to implement BaseExpandableListAdapter.getChildView() but it throws a class cast exception if I try returning any descendant of View, such as LinearLayout, or ViewGroup: public View BaseExpandableListAdapter.getChildView() { return new LinearLayout(..); }

[android-developers] Re: Showing the options menu

2008-11-04 Thread Mark Wyszomierski
Hmm seeing as how this is not working, is there a way to inject a menu button key press to get the menu to come up? Thanks Mark Wyszomierski wrote: Hi, How can we programatically show the options menu for an Activity? It seems: Activity.openOptionsMenu() would do it, but it has

[android-developers] Showing the options menu

2008-11-03 Thread Mark Wyszomierski
Hi, How can we programatically show the options menu for an Activity? It seems: Activity.openOptionsMenu() would do it, but it has no effect when I call it. I put a break point in onPrepareOptionsMenu() expecting it to be called sometime afterwards, but nothing in there either. I'm using

[android-developers] Re: Showing the options menu

2008-11-04 Thread Mark Wyszomierski
, Nov 4, 2008 at 8:52 AM, Mark Wyszomierski [EMAIL PROTECTED] wrote: Hmm seeing as how this is not working, is there a way to inject a menu button key press to get the menu to come up? Thanks Mark Wyszomierski wrote: Hi, How can we programatically show the options menu for an Activity

[android-developers] Re: Can't return View derived class for BaseExpandableListAdapter? (used to work)

2008-11-03 Thread Mark Wyszomierski
as you suggested with the ExpandableList1 sample, and I don't see any exceptions.  Can you print the stack of the exception you're seeing? You can browse the source athttp://git.source.android.com jason On Mon, Nov 3, 2008 at 2:33 PM, Mark Wyszomierski [EMAIL PROTECTED] wrote: Hi, Trying

[android-developers] Re: Can't return View derived class for BaseExpandableListAdapter? (used to work)

2008-11-06 Thread Mark Wyszomierski
ListView.LayoutParams. jason On Wed, Nov 5, 2008 at 1:09 PM, Mark Wyszomierski [EMAIL PROTECTED] wrote: Hi Jason, Could you show me the code of the View you're returning, to see if that'll work for me instead? Thanks On Nov 4, 2:14 am, Mark Wyszomierski [EMAIL PROTECTED] wrote: Hi

[android-developers] Drawing a circle outline? (not a filled circle)

2008-11-12 Thread Mark Wyszomierski
Hi, How can we draw a circle outline in an Overlay? I keep getting a filled circle with the following code: Path outline = new Path(); outline.addCircle(150, 150, 100, Path.Direction.CW); Paint paint = new Paint(); paint.setColor(0xFF); paint.setAlpha(255);

[android-developers] Referencing an entry from colors.xml?

2008-11-18 Thread Mark Wyszomierski
Hi, I defined a colors.xml file in my values folder, with the following contents: resources color name=clr_edit_hilite#FFD9FF77/color /resources How do I reference it from a layout.xml file? TextView android:id=@+id/test

[android-developers] Change focus color from orange to...

2008-11-18 Thread Mark Wyszomierski
Hi, The default android theme places an orange border around edit controls when they are focused. Is there a way to change that to a different color, say green? Perhaps blue? I see there are individual methods for changing colors of the text, the hilighted text, but none to change the focused

[android-developers] Re: Change focus color from orange to...

2008-11-18 Thread Mark Wyszomierski
Ah oh well. What other options do we have, provide bitmaps for every control we'd like to modify? Thanks On Nov 18, 2:51 pm, hackbod [EMAIL PROTECTED] wrote: Sorry, these are all bitmaps so there is no way to change an individual color. On Nov 18, 7:40 am, Mark Wyszomierski [EMAIL PROTECTED

[android-developers] Listen for MapView zoom?

2009-10-28 Thread Mark Wyszomierski
Hi, I'm using a MapView, with the default zoom controls. Is there any way to listen for zoom events? I tried this: android.widget.ZoomButtonsController zzz = mMapView.getZoomButtonsController(); but eclipse can't seem to resolve ZoomButtonsController? Thanks

[android-developers] Small circle sometimes appears in center of MapView?

2009-10-28 Thread Mark Wyszomierski
Hi, I'm seeing some strange behavior with MapView - sometimes when I display the map, I'll get a small circle drawn in the center of the map - it is just stroked black. As soon as I tap anywhere in the map, it disappears. This happens about 20% of the time I display the map. I don't have any

[android-developers] Re: Small circle sometimes appears in center of MapView?

2009-10-28 Thread Mark Wyszomierski
/add-ons/google-apis/reference/com/goog...) On Oct 28, 2:04 pm, Mark Wyszomierski mar...@gmail.com wrote: Hi, I'm seeing some strange behavior with MapView - sometimes when I display the map, I'll get a small circle drawn in the center of the map - it is just stroked black. As soon as I

[android-developers] Including extra sqlite databases?

2009-10-30 Thread Mark Wyszomierski
Hi, I have some external sqlite files I'd like to include with my app. It looks like I can add them to the /assets folder, then read them from there? Is the /assets folder the appropriate location for them? I've used SQLiteOpenHelper to open databases my app creates at runtime, which just uses a

[android-developers] Re: Including extra sqlite databases?

2009-10-31 Thread Mark Wyszomierski
.html I've added the sqlite file to my raw folder, it appears in my .R file, however eclipse intellisense cannot resolve it when I type R.raw.mydatabase - odd - Thanks On Oct 31, 7:42 am, Mark Murphy mmur...@commonsware.com wrote: Mark Wyszomierski wrote: I have some external sqlite files I'd

[android-developers] Re: Including extra sqlite databases?

2009-10-31 Thread Mark Wyszomierski
. 2009/10/31 Mark Wyszomierski mar...@gmail.com: Hi Mark, Yeah I think I need to write it to a local file, SQLiteDatabase has constructors which only read from a file path, or File instance. I'm wondering though if I can stick it in res/raw and read it straight from there. Some

[android-developers] Max font size of a TextView?

2009-11-02 Thread Mark Wyszomierski
Hi, I have a textview, I'd like it to use a font size of 14, but if it's too wide to fit its parent container at that size, then choose a smaller font size to fit. Looks like this: LinearLayout gravity=center width=fill_parent TextView textSize=14 singleLine=true /LinearLayout Is

[android-developers] Clear Activity stack?

2009-11-03 Thread Mark Wyszomierski
Hi, Is there a way to clear our Activity stack? For example, a user in my app progresses through these activities, one is launched from the previous activity: ActivityA - ActivityB - ActivityC if the user is now looking at ActivityC, and they hit the back button, they will go back to

[android-developers] Re: WebView - new frame closes my app and starts system web browser?

2009-11-05 Thread Mark Wyszomierski
...@commonsware.com wrote: Mark Wyszomierski wrote: I have a WebView inside my app. It looks like an html link which wants to open a page in a new frame actually pushes my app to the background and opens the system web browser to show the new page. That's to be expected, just like a redirect

[android-developers] Make two buttons the same width?

2009-11-08 Thread Mark Wyszomierski
Hi, Is there any style I can set which will make a set of buttons the same width (without specifying an explicit size in pixels)? For example: Layout Button EditText Button /Layout is there a way to make the two buttons the same width, even though they may have different text? Right now

[android-developers] Re: Make two buttons the same width?

2009-11-08 Thread Mark Wyszomierski
=false / /RelativeLayout Jason Van Anden http://www.BubbleBeats.com On Sun, Nov 8, 2009 at 11:27 AM, Mark Murphy mmur...@commonsware.comwrote: Mark Wyszomierski wrote: Is there any style I can set which will make a set of buttons the same width (without specifying an explicit size

[android-developers] LinearLayout stack overflow, fails on 1.5, ok on 1.6?

2009-11-08 Thread Mark Wyszomierski
Hi, I'm trying to make a horizontal layout with two TextViews, one should take up 40% of available width, the other 60%. This works unless the text is longer than available space, then a stack overflow exception is thrown. Pasting this into an empty 1.5 project xml file should cause it (though

[android-developers] Re: Donut (1.6), auto complete text view and ellipsize

2009-11-09 Thread Mark Wyszomierski
@Chris, I can't even get the simple TextView example you posted to ellipsize - I just immediately get a stack overflow exception. If I get rid of singleLine=true, then at least it doesn't crash, however the ellipsize won't be there! This is the only way I can get ANY ellipsis to appear - by

[android-developers] Increase timeout for touch-select vs touch-scroll?

2009-11-09 Thread Mark Wyszomierski
Hi, Is there a way to make highlighting of a row in a listview delayed if the user is simply scrolling the list with their finger? To clarify, when the user puts their finger down to scroll, the intersected row (if any) gets highlighted for a short moment, before it realizes the user is just

[android-developers] Re: Increase timeout for touch-select vs touch-scroll?

2009-11-09 Thread Mark Wyszomierski
(View.PRESSED_ENABLED_STATE_SET, pressed); setBackgroundDrawable(bg); is there some other set of flags I should be using instead, which differentiates between 'really' being pressed, and just pressed for scrolling? Thanks On Nov 9, 10:45 am, Mark Wyszomierski mar...@gmail.com wrote: Hi, Is there a way to make

[android-developers] Ok to measure widgets before display?

2009-11-10 Thread Mark Wyszomierski
Hi, I need to find out how wide a button with particular text will be before displaying a layout. Is this a valid way of doing it behind the scenes?: LinearLayout lll = new LinearLayout(getContext()); Button btn = new Button()); btn.setText(wonderful!); lll.addView(tvs);

[android-developers] Soft keypad - turn off animation, or have it appear above my entire layout?

2009-11-11 Thread Mark Wyszomierski
Hi, When I touch an EditText, the soft keyboard comes up, but it pushes my layout up a bit. So there's about a second delay where I see the keyboard modifying my layout, it's a bit jarring. Is there a way to have the soft keyboard either: 1) Appear above my current layout (like in a Frame) so

[android-developers] Re: Showing ellipsis in a TextView?

2009-11-11 Thread Mark Wyszomierski
On Oct 21, 11:40 am, Mark Wyszomierski mar...@gmail.com wrote: Ha that's the same exact control I'm looking to create, multiline and if it spills over three vertical lines, replace the last few characters with anellipsisand More text - the user clicks that and the textview expands to full

[android-developers] Post custom widget source?

2009-11-12 Thread Mark Wyszomierski
Hi, I created a multiline textview widget which handles ellipsizing - is it appropriate to post it here in this forum for feedback, or is there an android site dedicated for custom widgets in the community? Thanks -- You received this message because you are subscribed to the Google Groups

[android-developers] Re: Post custom widget source?

2009-11-12 Thread Mark Wyszomierski
TextView-like control. It seems to work ok in general cases, if anyone wants to give it a shot and report bugs or suggestions that would be great, Thanks On Nov 12, 7:23 pm, Mark Murphy mmur...@commonsware.com wrote: Mark Wyszomierski wrote: I created a multiline textview widget which handles

[android-developers] Re: Post custom widget source?

2009-11-12 Thread Mark Wyszomierski
Actually the class of interest is here: http://code.google.com/p/android-textview-multiline-ellipse/source/browse/trunk/TextViewMultilineEllipse.java On Nov 12, 11:44 pm, Mark Wyszomierski mar...@gmail.com wrote: Ok, I put the class up here:  http://code.google.com/p/android-textview

[android-developers] Stuck with ScrollView vs ListView, your thoughts?

2009-11-13 Thread Mark Wyszomierski
Hi, I have to make a pretty complex activity layout, which needs to scroll vertically. It is composed into row sections, which are focusable rows. Some rows may not be focusable themselves, but have internal focusable items, like this: // This whole row gets highlighted and focusable.

[android-developers] Stacking a ListView with other widgets below?

2009-11-13 Thread Mark Wyszomierski
Hi, Is there a way to create a layout with a ListView set to use full height, then some additional panels? Something like this: LinearLayout height = fill_parent ScrollView ListView height = wrap_content / TextView / TextView / /ScrollView

[android-developers] Re: Stacking a ListView with other widgets below?

2009-11-13 Thread Mark Wyszomierski
. On Fri, Nov 13, 2009 at 3:11 PM, Mark Wyszomierski mar...@gmail.com wrote: Hi, Is there a way to create a layout with a ListView set to use full height, then some additional panels? Something like this:  LinearLayout height = fill_parent      ScrollView          ListView height

[android-developers] Re: Stacking a ListView with other widgets below?

2009-11-14 Thread Mark Wyszomierski
views to our layout if using a ListView with setItemsCanFocus=true? Thanks On Nov 13, 6:52 pm, Mark Wyszomierski mar...@gmail.com wrote: Romain, thanks, that saved me. On Nov 13, 6:34 pm, Romain Guy romain...@google.com wrote: When you add the footer to thelistviewyou need to indicate it can

[android-developers] Re: Focus between views and lists issue/problem with Donut

2009-11-14 Thread Mark Wyszomierski
Ok this seems to be a bug unfortunately: http://code.google.com/p/android/issues/detail?id=4255#c2 On Nov 14, 2:47 pm, Mark Wyszomierski mar...@gmail.com wrote: Brady, did you come up with a work around for this? I'm having the same problem, and I can't come up with some sort of temporary fix

[android-developers] Re: Stacking a ListView with other widgets below?

2009-11-14 Thread Mark Wyszomierski
This is problem is probably related to this ListView bug: http://code.google.com/p/android/issues/detail?id=4255#c2 On Nov 14, 1:07 pm, Mark Wyszomierski mar...@gmail.com wrote: One more question on this - it seems like if we use a header or footer view - then our activity can not add any other

[android-developers] Re: How can I select or click on an item in a ListView?

2009-11-14 Thread Mark Wyszomierski
I think you need to use: ListView.setOnItemClickListener() instead. On Nov 14, 2:25 pm, lau ka man ivancar...@gmail.com wrote: As I mentioned in the email subject, I want to select an item (e.g. Department of Human Resource Management) in my ListView. And you can see that: I had try to

[android-developers] Re: Focus between views and lists issue/problem with Donut

2009-11-14 Thread Mark Wyszomierski
Brady, did you come up with a work around for this? I'm having the same problem, and I can't come up with some sort of temporary fix for it sadly. On Oct 14, 5:10 pm, Brady brady.kro...@gmail.com wrote: Ok, I did some more sleuthing and this is definitely a bug. I modified the 1.5 SDK API demo

[android-developers] Re: Extremely long DNS lookup (and failure) on T-Mobile network

2009-11-15 Thread Mark Wyszomierski
How are you all getting around this issue? I am running into it on some phones given out as demos (G1s running 1.5). About 50% of the time, my network requests will just hang for about two minutes, then throw: java.net.UnknownHostException: Host is unresolved: myapi.me.com:80 this looks

[android-developers] ANDROID_ID returns null on my G1 ?

2009-11-15 Thread Mark Wyszomierski
Hi, Following other threads - I'm trying to get a unique device ID from the device. I tried this: String ID = Settings.Secure.getString(context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); but this returns null when running on my G1. Is it supposed to be returning a

[android-developers] Re: ANDROID_ID returns null on my G1 ?

2009-11-15 Thread Mark Wyszomierski
, Mark Murphy mmur...@commonsware.com wrote: Mark Wyszomierski wrote: Following other threads - I'm trying to get a unique device ID from the device. I tried this:   String ID = Settings.Secure.getString(context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID

[android-developers] Re: ANDROID_ID returns null on my G1 ?

2009-11-15 Thread Mark Wyszomierski
at it in LogCat too (with phone hooked up), same. I'm stumped! On Nov 15, 7:52 pm, Mark Murphy mmur...@commonsware.com wrote: Mark Wyszomierski wrote: What does rooted mean? Having the ability to run as root, which is roughly the Linux equivalent to the Administrator account in Windows. http

[android-developers] Re: ANDROID_ID returns null on my G1 ?

2009-11-15 Thread Mark Wyszomierski
Oh I'm running 1.5 too, but I think that should be fine. On Nov 15, 8:05 pm, Mark Wyszomierski mar...@gmail.com wrote: Ok I just tried with my one and only activity, still returns null:   class MyActivity extends Activity {      private String mId;     �...@override      public void

[android-developers] Re: ANDROID_ID returns null on my G1 ?

2009-11-15 Thread Mark Wyszomierski
...@commonsware.com wrote: Mark Wyszomierski wrote: Oh I'm running 1.5 too, but I think that should be fine. Grab this project: http://commonsware.com/misc/WeightDemo.zip or, here's an APK: http://commonsware.com/misc/WeightDemo-debug.apk Install and run it. Ignore the layout -- that's

[android-developers] Re: ANDROID_ID returns null on my G1 ?

2009-11-15 Thread Mark Wyszomierski
there's an ID from the Telephony manager but then you add to add another (scary) permission for that? Thanks On Nov 15, 8:23 pm, Mark Murphy mmur...@commonsware.com wrote: Mark Wyszomierski wrote: Ok I installed the apk straight from the link - I see the two blue rects above (foo, bar

[android-developers] ImageView with zoom, or just use WebView somehow?

2009-11-15 Thread Mark Wyszomierski
Hi, I'd like to display a single image from the web. It'd be nice if it could be zoomable and pan-able. I was thinking of just using a WebView to do this: webView = new WebView(); webView.loadUrl(mysite.com/mypicture.jpg); but I can't force the webview to center the picture etc. Is there

[android-developers] Re: Multiple images using ACTION_VIEW

2009-11-15 Thread Mark Wyszomierski
This would be great to know, unfortunately I cannot find any information on it. On Nov 13, 1:34 pm, Lukasz Mosdorf lukasz.mosd...@gmail.com wrote: Hi, I have a folder on sd-card in which I keep photos edited in my application. Im trying to force deafult android image viewer to see all

[android-developers] Transparent dialog theme

2009-11-16 Thread Mark Wyszomierski
Hi, I've seen a few posts on different forums about how to make a dialog theme with a completely transparent background. I thought I'd post this here in case anyone is searching for it. This works on 1.5 (device/emulator), 1.6 emulator, 2.0 emulator: style name=Theme.TransparentTest

[android-developers] How to draw my custom view when selected?

2009-11-16 Thread Mark Wyszomierski
Hi, I wrote my own custom view (derived from View). How can I handle painting of it when it becomes focused / selected? Can I just do this: protected void onDraw(Canvas canvas) { if (isSelected()) { // draw my selected version } else { // draw normal version

[android-developers] OutputStream throws FileNotFoundException - sometimes???

2009-11-16 Thread Mark Wyszomierski
Hi, I'm trying to create a file in my app folder - sometimes it fails - other times it works fine - this is what I'm doing: String path = /data/data/com.myapp.test/files/database.sqlite OutputStream myOutput = new FileOutputStream(path); sometimes the last line throws a FileNotFoundException

[android-developers] Re: Extremely long DNS lookup (and failure) on T-Mobile network

2009-11-16 Thread Mark Wyszomierski
started around the time 1.6 was released. SoftwareForMe.com Makers of PhoneMyPC On Sun, Nov 15, 2009 at 10:33 AM, Mark Wyszomierski mar...@gmail.comwrote: How are you all getting around this issue? I am running into it on some phones given out as demos (G1s running 1.5). About 50

[android-developers] Re: Extremely long DNS lookup (and failure) on T-Mobile network

2009-11-17 Thread Mark Wyszomierski
, and other networking issues. I wonder why this doesn't seem to be more well known? Scott SoftwareForMe.com Makers of PhoneMyPC On Mon, Nov 16, 2009 at 3:12 PM, Mark Wyszomierski mar...@gmail.com wrote: I don't understand this - how are people getting around this? Restarting the app

[android-developers] Re: http client connect timeout

2009-11-17 Thread Mark Wyszomierski
Jonas, could you post your whole example? I'm on 1.5, same issue, the timeout never kicks in. Thanks On Nov 2, 8:45 am, Jonas Alves jona...@gmail.com wrote: It does work fine here. My target is 1.5. What's yours? On Nov 1, 3:28 pm, Andrei gml...@gmail.com wrote: Thank you Firstly

[android-developers] Re: http client connect timeout

2009-11-17 Thread Mark Wyszomierski
(), 15000); On Nov 17, 1:46 pm, Mark Wyszomierski mar...@gmail.com wrote: Jonas, could you post your whole example? I'm on 1.5, same issue, the timeout never kicks in. Thanks On Nov 2, 8:45 am, Jonas Alves jona...@gmail.com wrote: It does work fine here. My target is 1.5

[android-developers] Re: How to Add Objects to Sqlite Database

2009-11-17 Thread Mark Wyszomierski
Do you have a database already setup and are wondering how to use the sqlite classes, or you don't have one setup yet? If you're starting from scratch, I think the notepad tutorial shows you hot to setup sqlite from the start: http://developer.android.com/guide/tutorials/notepad/index.html On

[android-developers] My ImageView background

2009-11-17 Thread Mark Wyszomierski
Hi, I have some ImageViews that download images from the net. While they're loading, I'd like to show an empty frame image. I'm doing this, which looks fine: public class MyFrame extends Shape { private int mColorFrame; private int mColorInner; public DrawablePhotoLoading(int colorFrame,

[android-developers] Re: Android keyevent keycodes and scancodes

2009-11-18 Thread Mark Wyszomierski
Hi, If we need to check if a particular key was pressed, is this the correct way of doing it?: public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_O) { alert(you pressed the 'o' key!); } else if (keyCode == KeyEvent.KEYCODE_R) {

[android-developers] Re: Android keyevent keycodes and scancodes

2009-11-18 Thread Mark Wyszomierski
when one of the views has focus. On Wed, Nov 18, 2009 at 8:49 AM, Mark Wyszomierski mar...@gmail.com wrote: Hi, If we need to check if a particular key was pressed, is this the correct way of doing it?:  public boolean onKey(View v, int keyCode, KeyEvent event) {      if (keyCode

[android-developers] Re: Android keyevent keycodes and scancodes

2009-11-18 Thread Mark Wyszomierski
Hi Yi, If I understand correctly, does this just mean that a physical key may not appear at all on different devices? For instance, I want to check if the z key is pressed, so right now I check for: keyCode == KeyEvent.KEYCODE_Z if I understand correctly, KEYCODE_Z should be constant on all

[android-developers] Invalidating a row of a ListView?

2009-11-19 Thread Mark Wyszomierski
Hi, I have a ListView, its rows each have an image downloaded from the net in a separate thread. When the image is done downloading, I notify my main thread, and need to invalidate the corresponding row if it's on screen. I'm doing this: // run on the main thread. public void

[android-developers] Re: Invalidating a row of a ListView?

2009-11-19 Thread Mark Wyszomierski
Thanks Jason, sounds good. Are you extending BaseAdapter for your listview adapter? I thought it'd be a bit slow since every time getView () is called, I have to do the re-setting of my row's ImageView, but it's for the most part pretty smooth, just wondering how you find performance in your case?

[android-developers] ScrollView scroll timeout ?

2009-11-20 Thread Mark Wyszomierski
Hi, Is there no way to change the timeout to scroll in ScrollView? In the source, it's set to: static final int ANIMATED_SCROLL_GAP = 250; so any drags will be blocked for 250ms. This has the appearance of the ScrollView being stuck for a bit before it moves. This makes small scroll

[android-developers] Re: ScrollView scroll timeout ?

2009-11-20 Thread Mark Wyszomierski
wrote: Mark Wyszomierski wrote: Is there no way to change the timeout to scroll in ScrollView? In the source, it's set to:     static final int ANIMATED_SCROLL_GAP = 250; so any drags will be blocked for 250ms. This has the appearance of the ScrollView being stuck for a bit before it moves

[android-developers] Re: ScrollView scroll timeout ?

2009-11-20 Thread Mark Wyszomierski
think there's a way to tweak it (besides leaving my cloned version in my project, which is a little scary) Thanks On Nov 20, 8:10 am, Mark Wyszomierski mar...@gmail.com wrote: Hi Mark, Yeah I was thinking of doing this, I gave it a quick try but am probably copying the source from the wrong

[android-developers] Re: ScrollView scroll timeout ?

2009-11-20 Thread Mark Wyszomierski
). It is definitely not too high for use with a finger on a touch screen. On Fri, Nov 20, 2009 at 3:53 PM, Mark Wyszomierski mar...@gmail.com wrote: Well I got a clone of ScrollView to compile, turns out it's the constant:   private static final int TOUCH_SLOP = 16; as read from

  1   2   3   4   >