[android-developers] Re: Menu buttons in bottom part of layout

2009-09-16 Thread Mark Murphy
Mihai Dumitrache wrote: > Hello, > I tried this but it does not work. If i set height 0 to a linearlayout > the view is not displayed at all. You also need android:layout_weight="1". Something like this:

[android-developers] Re: How to force a ListView to rebuild/repaint itself

2009-09-16 Thread Mark Murphy
the adapter itself (e.g., call add() on the ArrayAdapter), and it will automatically update the UI. For CursorAdapter, requery() the underlying Cursor, and it will automatically update the UI. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programmin

[android-developers] Re: Can I keep a broadcast receiver process alive by creating a service that stays around?

2009-09-17 Thread Mark Murphy
a service in memory just to maintain some state. Since the app widget itself does not reside in your process, the widget framework allows you to keep your widget up to date without consuming much memory. Just persist whatever state you want to a file, SharedPreferences, database, etc. -- Mar

[android-developers] Re: will the device wake up if there is a widget instance on the homepage but the widget provider or receiver is disabled?

2009-09-17 Thread Mark Murphy
ts are welcome to set updatePeriodMillis to be some ridiculously high value (or 0 might work...I forget) and handle their own updates with their own alarms. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for yo

[android-developers] Re: Best practice for implementing watchdog

2009-09-17 Thread Mark Murphy
ok at lastFix and update your UI as needed if your fix gets stale I would not go *too* tight on this quasi-loop. I have used a one-second loop this way with no ill effects, but I would be nervous about it being, say, every 100ms. -- Mark Murphy (a Commons Guy) http://commonsware.com

[android-developers] Re: java.lang.StackOverflowError for sdk1_5r3

2009-09-17 Thread Mark Murphy
jagtap.jj wrote: > In Android, what Is max view hierarchy level normally can be > allowable? It varies based on what widgets and containers you are using and how you use them. I get nervous when a hierarchy (as shown by hierarchyviewer) gets much over 10 layers deep. -- Mark Murphy (a C

[android-developers] Re: Drag and Drop from Source View to Target View

2009-09-17 Thread Mark Murphy
s, and other home implement the same sort of thing. Look at the Android source code, find the home screen, and see how it pulls off drag-and-drop for its case -- you may be able to adapt the technique for your scenario. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.co

[android-developers] Re: old TTS vs new TTS in 1.6

2009-09-17 Thread Mark Murphy
lping people move from eyes-free to Android 1.6 TTS over in that project's group: http://groups.google.com/group/tts-for-android/browse_frm/thread/68078edcad8d9073 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki:

[android-developers] Re: Can I keep a broadcast receiver process alive by creating a service that stays around?

2009-09-17 Thread Mark Murphy
make such decoupling difficult; conversely, Android may have design constraints that make what you want to do difficult. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coders' Guide to *Advanced* And

[android-developers] Re: Drag and Drop from Source View to Target View

2009-09-17 Thread Mark Murphy
tes to which it is dropped or may be some better solution. Ah. Sorry, I have no idea if that is even possible. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coders' Guide to *Advanced* Android D

[android-developers] Re: tabs iphone style

2009-09-17 Thread Mark Murphy
blink, blink* How do you "specify a view to use for a tab indicator"? Subclass TabWidget and override getChildTabViewAt()? Or is there another trick? Knowing that would be hugely useful, if you'd be willing to share the technique. Thanks! -- Mark Murphy (a Commons Guy) ht

[android-developers] Re: tabs iphone style

2009-09-17 Thread Mark Murphy
nEx.Software wrote: > Yes... > http://developer.android.com/sdk/api_diff/4/changes/android.widget.TabHost.TabSpec.html Ah, yes. setIndicator() used to just have the Drawable options, not the whole View. I'll have to experiment with these. Thanks for pointing this out! -- Mar

[android-developers] Re: ImageButton and focus state...

2009-09-18 Thread Mark Murphy
le Step #2: Copy that resource to your project Step #3: Replace various states (e.g., selected="true") in that XML with alternative nine-patch PNG files, perhaps by modifying one of the existing ones -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _T

[android-developers] Re: save new file into asset directory from app

2009-09-18 Thread Mark Murphy
will load a local file/resource. No, it is not. You can create a ContentProvider and implement openFile() to serve whatever content you like to a WebView. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android De

[android-developers] Re: How do I know whether my device is currently charging?

2009-09-18 Thread Mark Murphy
sterReceiver() in the Context class (which is a base class for Activity, Service, etc.). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.1 Available! --~--~-~--~~~--

[android-developers] Re: Problem in display List View With an Image

2009-09-18 Thread Mark Murphy
es the technique: http://commonsware.com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~ You received this message because you are subscri

[android-developers] Re: save new file into asset directory from app

2009-09-18 Thread Mark Murphy
ith @import? -- is there a reason you use @import versus a stylesheet element? Also, since I do not see a bug report for this out on http://b.android.com, if you can create a small project that reproduces the error, you might want to open an issue on it, so that it is more likely to get inve

[android-developers] Re: lucene api

2009-09-18 Thread Mark Murphy
s the right answer is a whole 'nuther question. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for your Android OSS project? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message becaus

[android-developers] Re: Trying to get Javascript on Android

2009-09-18 Thread Mark Murphy
e. That thread is referring to applications that embed a WebKit widget. It is not relevant for applications you are viewing through the built-in Browser application. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunities? http://wiki.a

[android-developers] Re: Writing my ListAdapter for ListView

2009-09-18 Thread Mark Murphy
ant to go overboard on this, lest you run out of memory. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because yo

[android-developers] Re: YouTube in the emulator?

2009-09-18 Thread Mark Murphy
ndset manufacturers and is not part of the Android open source project. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this

[android-developers] Re: how do you quit an app...

2009-09-18 Thread Mark Murphy
egistered a listener with Android that you didn't release (e.g., a PhoneStateListener). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ You receive

[android-developers] Re: BaseAdapter.getV iew()’s convertView parameter

2009-09-19 Thread Mark Murphy
se blog posts are as old as the hills (in Android years), I make the chapter in my original book that covers this topic available as a free excerpt: http://commonsware.com/Android/excerpt.pdf For short lists, convertView is not a big deal. For long lists, it's rather important to avoid creating

[android-developers] Re: taking picture / use camera in android sdk 1.6

2009-09-19 Thread Mark Murphy
MediaRecorder. Here are a couple of sample projects that demonstrate the use of the Camera: http://github.com/commonsguy/cw-advandroid/tree/master/Camera/ There is also this sample activity from the API Demos that accompany the SDK: http://developer.android.com/guide/samples/ApiDemos/src/com/exampl

[android-developers] Re: YouTube in the emulator?

2009-09-19 Thread Mark Murphy
not have the Android Market, and I think those get licensed together. It is not safe to assume that all Android devices will have all of the commercially-licensed Android bits, like Android Market, YouTube, and Google Maps. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com

[android-developers] Re: Listview and scrolling

2009-09-19 Thread Mark Murphy
pter and MergeAdapter: https://www.google.com/accounts/o8/id?id=AItOawnQNC70ZHdz9I0RXR03e97k1RmZBhWBANQ They are open source and are available off of my github page: http://github.com/commonsguy -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Look

[android-developers] Re: Trying to get Javascript on Android

2009-09-19 Thread Mark Murphy
s WebKit, so where you see browser-specific instructions for Javascript libraries, follow those for iPhone, Safari, or perhaps Chrome. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for your Android OSS project? http://wiki.and

[android-developers] Re: Listview and scrolling

2009-09-19 Thread Mark Murphy
the custom adapter) in separate layout files, or -- Construct them in Java rather than use layout XML It's conceivable to add support for loading a single layout file and pouring all the root's children into the list, but I don't have that in there right now. -- Mark Murphy (a Co

[android-developers] Re: Listview and scrolling

2009-09-19 Thread Mark Murphy
call add() on it for each inflated view you want in the list. See the onCreate() method in SackOfViewsDemo and how it adds the clock and buttons. In your case, if a layout file defines a single item to go into the list, it would look like: views.add(inflater.inflate(R.layout.filmdetail_layout

[android-developers] Re: Listview and scrolling

2009-09-19 Thread Mark Murphy
e demo: MergeAdapter adapter=new MergeAdapter(); adapter.addAdapter(buildFirstList()); adapter.addView(buildButton()); adapter.addAdapter(buildSecondList()); setListAdapter(adapter); In your case, addView() would be passed the results of an inflation. -- Mark Murphy (a Commons Guy

[android-developers] Re: Listview and scrolling

2009-09-19 Thread Mark Murphy
ill want to override isEnabled() and return true or false as needed to indicate which rows are selectable and which are not (e.g., header rows)." -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for your Android OSS project? http://wiki

[android-developers] Re: Externalize strings automatically

2009-09-20 Thread Mark Murphy
> Is there a way to externalize all the strings in the source files to > strings.xml automatically? There is nothing built into Android to do this, AFAIK. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/book

[android-developers] Re: Question about the license of the non-free applications

2009-09-20 Thread Mark Murphy
n-free applications? If you are referring to the Android Market, YouTube, Google Maps, and such, those are proprietary applications. Device manufacturers can license those from Google, by some undocumented process. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books

[android-developers] Re: long-running loadUrl() JavaScript with a callback

2009-09-21 Thread Mark Murphy
do your loadUrl() in onPostExecute(). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Andro

[android-developers] Re: To add Image in Listview....

2009-09-21 Thread Mark Murphy
com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developer

[android-developers] Re: WebView.loadUrl on a hidden view opens the android browser

2009-09-21 Thread Mark Murphy
ause the redirected URL to open in the built-in Browser. To avoid this, create a subclass of WebViewClient, implement shouldOverrideUrlLoading(), and attache an instance of that WebViewClient to the WebView. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://

[android-developers] Re: using tesseract on android

2009-09-21 Thread Mark Murphy
rmine how to create a wrapper for it to allow you to call into Tesseract code from your Java-based Android project: http://developer.android.com/sdk/ndk/1.5_r1/index.html -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commo

[android-developers] Re: Hierarchy Viewer

2009-09-21 Thread Mark Murphy
> What this link repository?? You know? http://source.android.com -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscri

[android-developers] Re: How to split a screen into two? One running with an application and the other with another application?

2009-09-21 Thread Mark Murphy
> Does anyone has an idea of how to split the screen into two? Is it > possible > for me to run an application in one screen and another app in other > screen? That is not presently possible in Android. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer

[android-developers] Re: is there anything wrong with the function camera.takePicture()???

2009-09-21 Thread Mark Murphy
hing wrong with this function > takePicture(Camera.ShutterCallback shutter, Camera.PictureCallback > raw, Camera.PictureCallback jpeg)? That method works, at least on Android 1.5r3 (have not tried on Android 1.6 since I have no Android 1.6 device). -- Mark Murphy (a Commons Guy) http://commonsw

[android-developers] Re: fit text on 1 line

2009-09-21 Thread Mark Murphy
users see that it is not the end of the text they are seeing > but that there is more ;) android:ellipsize="end" at least used to work for this... -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--

[android-developers] Re: How to upgrade the ant build.xml file from 1.1 project to 1.5

2009-09-21 Thread Mark Murphy
ed your own Ant tasks, you will need to copy those over. > Do i need do any change for my old > tasks in the new build.xml? That would depend, I suppose, on what those tasks did. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: h

[android-developers] Re: How can I get Activity object from Intent object or something else

2009-09-21 Thread Mark Murphy
g some > thing on that screen. How can I obtain the reference to that > Activity??? You can't. That would be a security violation. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~-

[android-developers] Re: Best practice - passing info to new intent

2009-09-21 Thread Mark Murphy
via setTag(), then retrieve it upon a click via getTag(). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

[android-developers] Re: Is it possible to update a widget from an Activity?

2009-09-21 Thread Mark Murphy
et() on your AppWidgetManager. Here is a sample application that updates a widget either due to the updateTimeMillis value or due to a user clicking a refresh button on the widget itself: http://github.com/commonsguy/cw-advandroid/tree/master/AppWidget/TwitterWidget/ -- Mark Murphy (a Commons Guy) http://com

[android-developers] Re: Problem to add an image in ListActivity.

2009-09-22 Thread Mark Murphy
on..can u tel anybodypls point out the > error > in my code You need to look at your Java stack trace to find your error. You can get to the Java stack trace via adb logcat, DDMS, or the DDMS perspective in Eclipse. -- Mark Murphy (a Commons Guy) http://commonsware.com Androi

[android-developers] Re: Problem to add an image in ListActivity.

2009-09-22 Thread Mark Murphy
our content must have a ListView whose id attribute is 'android.R.id.list' If you are going to use ListActivity, you need to give the ListView in your layout an android:id="@android:id/list" value instead of whatever you have. -- Mark Murphy (a Commons Guy) http://commonsware.co

[android-developers] Re: getting mainmenu applications

2009-09-22 Thread Mark Murphy
oks that illustrates the technique: http://github.com/commonsguy/cw-advandroid/tree/master/Introspection/Launchalot/ -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received

[android-developers] Re: Can a core class access resources at the app layer?

2009-09-22 Thread Mark Murphy
ant to modify: > > setSelector(getResources().getDrawable( > > com.android.internal.R.drawable.list_selector_background)); Why not just use android:listSelector to provide the selector? -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--

[android-developers] Re: Trouble in Printing Unicode Male Character

2009-09-22 Thread Mark Murphy
isplayed in "Droid Sans Fallback", though, and whether that is even an actual font on the device. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this m

[android-developers] Re: How to increase/decrease the volume programmatically?

2009-09-22 Thread Mark Murphy
/tree/master/SystemServices/Volume/ -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developer

[android-developers] Re: System.setProperty() cannot change system property in Android

2009-09-22 Thread Mark Murphy
ws that this property is not set at all. > Do I wrongly understand API "System.setProperty()" ? This method will only affect your running process, just as it does with any other Java implementation. -- Mark Murphy (a Commons Guy) http://commonswar

[android-developers] Re: System.setProperty() cannot change system property in Android

2009-09-23 Thread Mark Murphy
> Is there any other java API which can change system property? Not that I am aware of. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this mess

[android-developers] Re: Eclair feature list

2009-09-23 Thread Mark Murphy
> I am > trying to get some official information about eclair, but has no > result. There is no official information about Eclair. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/b

[android-developers] Re: How can I get Activity object from Intent object or something else

2009-09-23 Thread Mark Murphy
s, to pass the information between the applications. If you did not write the other application, then you have no right to determine the information you seek. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.

[android-developers] Re: How can I get Activity object from Intent object or something else

2009-09-23 Thread Mark Murphy
by the other applications. Other than that, each application is protected from the others. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message becau

[android-developers] Re: android SDK 1.5 where do i find the sqlite db file in my system

2009-09-23 Thread Mark Murphy
at you declare in your element of your AndroidManifest.xml file). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed

[android-developers] Re: MPEG4 playback issue?

2009-09-23 Thread Mark Murphy
vents/io/sessions/MasteringAndroidMediaFramework.html http://www.scribd.com/doc/16917356/Mastering-the-Android-Media-Framework -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You rece

[android-developers] Re: relocating webview cache using softlinks

2009-09-23 Thread Mark Murphy
> But given > the large amount of webview cache that my app tends to accumulate over > time, > I need to relocate this cache on SDCard. Why not just call clearCache() periodically? -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://com

[android-developers] Re: relocating webview cache using softlinks

2009-09-23 Thread Mark Murphy
Alas, I see no evidence that you can replace the CacheManager/WebViewDatabase used by a WebView. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this mes

[android-developers] Re: problem with startActivityForResult function

2009-09-23 Thread Mark Murphy
> So why the savefilename-activity doesn't start first??? startActivityForResult() is an asynchronous operation with respect to your onClick() method. Only call it once in onClick(). Call your second one from the onActivityResult() branch from your first call. -- Mark Murphy (a Com

[android-developers] Re: Using android:configChanges to handle orientation

2009-09-23 Thread Mark Murphy
in places where the application is not really using the widget-based UI, and hence where the resource change may have no practical impact. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~-

[android-developers] Re: Book suggestion

2009-09-23 Thread Mark Murphy
ooks -- digital editions updated frequently, nice bang for the buck, etc. Reto Meier's _Professional Android Application Development_ and Abelson/Collins/Sen's _Unlocking Android_ are highly rated on Amazon. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books:

[android-developers] Re: Regarding Process Context

2009-09-23 Thread Mark Murphy
y process methods from that receiver on intent received. What is "System Server"? -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this mess

[android-developers] Re: Zipalign utility not available in android 1.5_r3

2009-09-24 Thread Mark Murphy
52454151: no handler defined >> Can't dispatch DDM chunk 48454c4f: no handler defined >> pkg: /data/local/tmp/SatLoc.apk >> Failure [-12] You need to be doing less stuff while the install is going on. I usually see that error message when the install proce

[android-developers] Re: Accessing SharedPreferences in Services and non-Activities

2009-09-24 Thread Mark Murphy
in to the superclass. Third, I would switch to PreferenceManager.getDefaultSharedPreferences(), particularly if you intend to use the preference API (PreferenceScreen) to collect the preferences. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://co

[android-developers] Re: using tesseract on android

2009-09-24 Thread Mark Murphy
NDK are best asked in the Google Group dedicated to the NDK: http://groups.google.com/group/android-ndk -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this me

[android-developers] Re: Flash for android

2009-09-24 Thread Mark Murphy
adable version of Flash that can be applied to arbitrary Android devices the way you can download flash to PCs. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You receive

[android-developers] Re: can i use external fonts ?

2009-09-24 Thread Mark Murphy
> i need to use my external font .ttf file for button's text. > can anybody help http://developer.android.com/reference/android/graphics/Typeface.html then, call setTypeface() on your Button. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer

[android-developers] Re: GC question.

2009-09-24 Thread Mark Murphy
erything be marked for GC? >> >> Or would it better to write >> >> private FileFetcher ff; >> >> and the in my onCreate instantiate the FileFetcher and nullify it in the >> onDestroy method? -- Mark Murphy (a Commons Guy) http://commonsware.com Androi

[android-developers] Re: How to suggest Dev.android guide updates

2009-09-24 Thread Mark Murphy
> I have noticed a few minor things in the devguide that could be > updated, debugging and android device on Jaunty Jackalope for > instance. Is there a manner to submit recommendations to these pages? Just filing an issue at http://b.android.com. -- Mark Murphy (a Commons

[android-developers] Re: About tab icon

2009-09-24 Thread Mark Murphy
ble/tab1_selected.png and res/drawable/tab1_normal.png, you could reference this "icon" as R.drawable.tab1 in your TabSpec work, and you would get a two-state icon. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~---

[android-developers] Re: SMS Database with new Hero ROM

2009-09-24 Thread Mark Murphy
has Outlook Express, Mozilla Thunderbird, or some other email client. If there isn't an issue already, you might consider putting an issue in http://b.android.com, asking for a common SMS store to become part of the official API (again, assuming it is not official already). -- Mark Murphy

Re: Re :Re: [android-developers] Re: SMS Database with new Hero ROM

2009-09-24 Thread Mark Murphy
y way around? Possibly. Or, they just haven't been run on the Hero yet -- that device is pretty new. Or, they've already created a portability layer and adapted it, somehow, to the Hero. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://common

[android-developers] Re: How to take a screencast demo of app

2009-09-24 Thread Mark Murphy
ion of getting the time to implement it...which, unfortunately, will not be all that soon. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message beca

[android-developers] Re: How to delete file when file is created by another app

2009-09-25 Thread Mark Murphy
ion on the directory. Bear in mind that by doing this, any application on the system can read and manipulate files in this directory. There is likely a more secure means of data sharing than this that your apps can use. Or, have them both be a single app. -- Mark Murphy (a Commons Guy) http://

[android-developers] Re: application code for SDK 1.5 and 1.6

2009-09-25 Thread Mark Murphy
n techniques described here: http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received

[android-developers] Re: Can I set Activity android:enabled by java code?

2009-09-25 Thread Mark Murphy
> > > android:enabled can be set at AndroidManifest.xml > > android:name="MyActivity" > android:enabled="true"> > > How can I set the attr true or false in my programm? There is a method on PackageManager to do that (setComponentEnab

[android-developers] Re: event for button on headphone chord...

2009-09-25 Thread Mark Murphy
ntents using a BroadcastReceiver. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android

[android-developers] Re: Touchscreen support

2009-09-25 Thread Mark Murphy
re seems to be some kind of response as the > focus disappears, but I cant press anything on the screen. I get touch > events when using "getevent". > > Can someone help? > > /Jesper Nordenberg > > > > -- Mark Murphy (a Commons

[android-developers] Re: Adding Components Programmatically

2009-09-25 Thread Mark Murphy
to handle: -- screen rotations (portrait versus landscape) -- multiple screen dimensions (QVGA, HVGA, WVGA) -- multiple screen sizes (3", 3.5", 5") The layout framework was designed to make it easier to swap in and out different layouts for those different device characteristics.

[android-developers] Re: Computational cost of calling getReadableDatabase or getWriteableDatabase?

2009-09-25 Thread Mark Murphy
a way to do a bulk insert in SQLite, without bulkInsert(), I'd be interested to know -- thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this

[android-developers] Re: Custom layout for MediaController

2009-09-27 Thread Mark Murphy
>>> the MediaController(Context, useFastForward) constructor, but is there >>>> any other way to change the layout of the controller? >>>> Please advise. >>>> Many thanks, >>>> Brooke > > > -- Mark Murphy (a Commons Guy) http:/

[android-developers] Re: How to make an activity destory when user presses 'Back button?

2009-09-27 Thread Mark Murphy
hap 497 wrote: > When I currently have my activity on the font of the screen, how can I > make Android to 'destory' my activity when user clicks 'back' button? > (i.e. onDestory of my Activity gets called)? It does that automatically. -- Mark Murphy (a Common

[android-developers] Re: Issue with multiple child views created programmatically

2009-09-27 Thread Mark Murphy
can get it to work just find when I only > add a single child view, but when I have multiple children view > objects my app crashes. Examine your stack trace, via adb logcat, DDMS, or the DDMS perspective in Eclipse. That will tell you the source of your error. -- Mark Murphy (a C

[android-developers] Re: OpenCore

2009-09-27 Thread Mark Murphy
a list that pertains to the NDK: http://groups.google.com/group/android-ndk -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You receive

[android-developers] Re: Issue with multiple child views created programmatically

2009-09-27 Thread Mark Murphy
gh level, we cannot readily advise you on better solutions. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[android-developers] Re: Issue with multiple child views created programmatically

2009-09-27 Thread Mark Murphy
quot;MyAppNameHere", "Something about the exception", e); That will dump the stack trace, along with your message, to logcat. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! --~--~-~-

[android-developers] Re: launch activity like phone call

2009-09-27 Thread Mark Murphy
look at PowerManager.WakeLock to arrange to keep the screen and CPU on for a while. Which leads to: 4. Misusing WakeLocks are horrible for the battery. Do not leak an acquired WakeLock. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Tr

[android-developers] Re: WebView onLoadComplete()?

2009-09-27 Thread Mark Murphy
bViewClient(): http://developer.android.com/reference/android/webkit/WebView.html#setWebViewClient(android.webkit.WebViewClient) Step #3: There is no Step #3 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from

[android-developers] Re: get checked items form list

2009-09-27 Thread Mark Murphy
r.setPositiveButton(android.R.string.ok, new > DialogInterface.OnClickListener() { > public void onClick(DialogInterface dialog, int > whichButton) { > > //??? > > } > }); > builder.create(); > builder.show()

[android-developers] Re: get checked items form list

2009-09-27 Thread Mark Murphy
ou are targeting an earlier SDK version, that might explain the problem. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunities? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this mes

[android-developers] Re: how to put application to g phone

2008-10-25 Thread Mark Murphy
barrie wrote: > We try to download our .apk via web site but we got an error message > saying the content being downloaded is not supported by the phone. > > Any idea about it? Are you serving it with the proper MIME type? application/vnd.android.package-archive -- Mark Murphy (a

[android-developers] Re: Starting a new Activity

2008-10-25 Thread Mark Murphy
you mean by "talk back to A now". That's not specific enough for me to give you concrete advice. > Is this the way it's supposed to work? Yes. > If there is a way to talk back, what state is A in? That's a bit complicated for what you're describing, but

[android-developers] Re: Starting a new Activity

2008-10-25 Thread Mark Murphy
he activity is brought back via onResume(). But you really should consider stopping the thread in onPause() and starting a fresh thread in onResume(). If a call comes in, it might be hours before the user ever pops back to your activity. -- Mark Murphy (a Commons Guy) http://commonsware.com A

[android-developers] Re: Require Source Code on Windows

2008-10-25 Thread Mark Murphy
1). You make a typo (forget the n in Android). You two are even now. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.3 Published! --~--~-~--~~~---~--~~ You received this message because you are su

[android-developers] Re: Fastest Combination of Http Post/Get and XML parsing libs

2008-10-26 Thread Mark Murphy
Casey Link wrote: > Is there a > recommended/preferred/faster way of making POST/GET requests, and > parsing XML in the android? On the XML front, the XML Pull Parser (org.xmlpull.*) is supposed to be pretty quick. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Code

[android-developers] Re: AndroidHttpClient gone so now what

2008-10-26 Thread Mark Murphy
pache.org/httpcomponents-client/examples.html -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.3 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

[android-developers] Re: Read a file and parse xml

2008-10-26 Thread Mark Murphy
is part of your APK, make it an XML resource. Put it in res/xml/ in your project and use Resources.getXML() to get an XML Pull Parser. This is reportedly significantly more efficient than parsing it yourself. Beyond that, there are three XML parsers in Android: DOM, SAX, and the aforementi

[android-developers] Re: Read a file and parse xml

2008-10-26 Thread Mark Murphy
er.deserialize(BeanA.class); > List listOfBeanB= > (List)xmlDeserializer.deserialize(BeanB.class); First, don't do it that way. Make exactly ONE pass through the XML, not several. If you wish to make several passes anyway, get a fresh XmlPullParser before doing the second bean.

<    8   9   10   11   12   13   14   15   16   17   >