Thanks guys, adding that ListView with id="@android:id/list" did the trick. I have another layout question that hopefully you guys can answer, I created a RelativeLayout in XML and want to use this layout inside another XML layout but am not sure how to call/use it. I know how to use a Layout created programmatically inside an XML layout file (<com.package.Layout ....>) but am unsure how to do it using one created as an XML layout. Anybody know how?
On Mon, Mar 21, 2011 at 4:38 PM, < [email protected]> wrote: > Today's Topic Summary > > Group: http://groups.google.com/group/android-developers/topics > > - Confused by @Override <#12eda27b7af13d13_group_thread_0> [5 Updates] > - How to do a fade of views mostly radio > buttons<#12eda27b7af13d13_group_thread_1>[1 Update] > - when to (NOT) use fragments <#12eda27b7af13d13_group_thread_2> [2 > Updates] > - How can I add a file to the META-INF dir of the > apk?<#12eda27b7af13d13_group_thread_3>[2 Updates] > - Dialog, TabView <#12eda27b7af13d13_group_thread_4> [3 Updates] > - Can i disable Home Button in Android for my application > only.???<#12eda27b7af13d13_group_thread_5>[1 Update] > - How can i get js variable value from a HTML form ? is it possible > ?<#12eda27b7af13d13_group_thread_6>[1 Update] > - mediaplayer surface initialized to a > frame<#12eda27b7af13d13_group_thread_7>[1 Update] > - Suugest any tutorial for database <#12eda27b7af13d13_group_thread_8>[1 > Update] > - Is there any Reminder Service in > Android?<#12eda27b7af13d13_group_thread_9>[1 Update] > - Create Project <#12eda27b7af13d13_group_thread_10> [4 Updates] > - Using ListPreference view in a non preference > activity/dialog<#12eda27b7af13d13_group_thread_11>[3 Updates] > > Topic: Confused by > @Override<http://groups.google.com/group/android-developers/t/71d59d9822a601c7> > > trans <[email protected]> Mar 21 12:31PM -0700 > ^<#12eda27b7af13d13_digest_top> > > Hi-- I am not very experienced with Java, and I am confused about > overriding > a method. I am trying to override the OnBufferDraw() method by > extending > KeyboardView, like this: > > public class PhoneticKeyboardView extends KeyboardView { > > @Override > private void onBufferDraw() { > if (mBuffer == null || mKeyboardChanged) { ... > > But when I compile it I get an error: > > cannot find symbol > [javac] symbol : variable mBuffer > [javac] location: class > com.tabcomputing.android.zenboard.PhoneticKeyboardView > [javac] if (mBuffer == null || mKeyboardChanged) { > [javac] ^ > > Which I don't understand b/c mBuffer is defined in KeyboardView. What > am I > doing wrong. Surely I do not have to redefine every class variable of > the > superclass? > > > > > Kostya Vasilyev <[email protected]> Mar 21 10:35PM +0300 > ^<#12eda27b7af13d13_digest_top> > > From KeyboardView.java: > > *private *Bitmap mBuffer; > *private *boolean mKeyboardChanged; > > So they're there, but you can't use them. Has nothing to do with > @Override. > > -- Kostya > > 21.03.2011 22:31, trans ?????: > > -- > Kostya Vasilyev -- http://kmansoft.wordpress.com > > > > > trans <[email protected]> Mar 21 12:52PM -0700 > ^<#12eda27b7af13d13_digest_top> > > Ah, I see. I'm used to Ruby and it doesn't have this kind of > restriction. > > So I do have to redefine all this stuff. Gets to the point that I think > I > might as well just copy the whole class instead of extending it. Ugh. > > Thanks. > > > > > guillaume benats <[email protected]> Mar 21 08:58PM +0100 > ^<#12eda27b7af13d13_digest_top> > > You do not have to redefine it, it is non-sense as it is a private > method, > made to be called inner class. You have to call it inside your object. > > > -- > Benats Guillaume. (Computer Sciences, FUNDP, Namur) > > > > > trans <[email protected]> Mar 21 01:30PM -0700 > ^<#12eda27b7af13d13_digest_top> > > "non-sense"? I need to change it's behavior. How else am I going to do > it? > > > > Topic: How to do a fade of views mostly radio > buttons<http://groups.google.com/group/android-developers/t/2a1a9d15f79eb4c1> > > kiros88 <[email protected]> Mar 21 01:29PM -0700 > ^<#12eda27b7af13d13_digest_top> > > Hi i created my own radio button so basically it will deselect when u > click it again if its already toggled on. my main question is if > anyone knows like if u have a radio group and 3 radio buttons I select > the top one and i want the other 2 to be faded? like its still there > visible but is like either slanted or shaded in a way so the user cant > select them and its obvious that the user wouldnt be able to so i > would need to know how to turn off the one click listerner function or > shade it away like a button > > > > Topic: when to (NOT) use > fragments<http://groups.google.com/group/android-developers/t/c650c4406a04845> > > jotobjects <[email protected]> Mar 21 12:27PM -0700 > ^<#12eda27b7af13d13_digest_top> > > @Streets Of Boston - Your email scenario for tablet and phone > activities using the same Fragments assumes that both are 3.0 > (probably not the real world for a while). Is that right? > > Also, going back to the original question of the "View Toggle" type > design where the user can switch between Fragments somehow. Is there > a memory footprint concern with this design approach? On a Tablet > there might be large View hierarchies in the Fragments in the > backstack that are not showing. Are Fragments a reasonable approach > in that case? > > > > > Streets Of Boston <[email protected]> Mar 21 01:29PM -0700 > ^<#12eda27b7af13d13_digest_top> > > About the activities being 3.0: Yes, but it's possible on 1.6 and up as > well > - to some extent - using the Android Compatibility Library. > > I think that the View Toggle type design should be possible without > serious > implications to the memory footprint. Fragments are designed to work > well > with the back-stack. I can imagine that memory is clean up where > necessary > (as long as your activity - or some other more global class - doesn't > hold > references to each possible Fragment). > > > > Topic: How can I add a file to the META-INF dir of the > apk?<http://groups.google.com/group/android-developers/t/ba98351e50897499> > > "martijn.list" <[email protected]> Mar 21 09:03PM +0100 > ^<#12eda27b7af13d13_digest_top> > > Hi, > > I need to add support for a charset which is not natively supported by > Android. Support for new charsets can be added by implementing a > CharsetProvider. When a Charset is needed which is not natively > supported, the system scans the classpath for the file > java.nio.charset.spi.CharsetProvider in the META-INF/services/ > directory. If I manually add this directory and file to the META-INF > directory of the generated APK file (using a zip app), my Android app > is > able to find the CharsetProvider so the procedure works. > My question now is, how can I add this file to META-INF/services/ dir > of > the APK while building the app with Eclipse? > Adding the file to the assets directory does not work because the file > then gets placed in /assets/META-INF/services and not in > META-INF/services. > > Is this possible? > > Kind regards, > > Martijn Brinkers > > > > > martijn brinkers <[email protected]> Mar 21 01:28PM -0700 > ^<#12eda27b7af13d13_digest_top> > > I found the solution. I created an ant script that adds the service > using > the jar task. To make sure that the service is added to the APK I added > an > ANT builder to the list of builders for the project and selected the > target > for manual and auto build. Now every time the APK is generated, the ANT > > script runs and adds the correct service to the META-INF directory. > > Kind regards, > > Martijn Brinkers > > > > Topic: Dialog, > TabView<http://groups.google.com/group/android-developers/t/faeccc1d067b2cd9> > > Justin Anderson <[email protected]> Mar 21 01:37PM -0600 > ^<#12eda27b7af13d13_digest_top> > > Change your TabHost to display views instead of activities... TabHost > doesn't handle activities very well. From what I understand it is only > partially implemented and dates back to the Android 1.1 days. > > Thanks, > Justin Anderson > MagouyaWare Developer > http://sites.google.com/site/magouyaware > > > On Mon, Mar 21, 2011 at 12:58 PM, Daniel Rindt > > > > > Filip Havlicek <[email protected]> Mar 21 09:15PM +0100 > ^<#12eda27b7af13d13_digest_top> > > Hi Daniel, > > although some people here don't like TabHost, I'm using it just fine > and > have been able to make everything I wanted so far (or from what I can > remember). Could you evaluate what is happening in more detail? From > what I > can understand, you have a TabHost with an Activity. This Activity has > a > button that show a dialog that has been pre-built in onCreate of this > Activity. And what exactly is the problem? That you press the button, > dialog > is shown, you (for example) rotate your phone and the dialog is gone? > If > that's it, I suppose you post relevant parts of your code. > > Best regards, > Filip Havlicek > > 2011/3/21 Justin Anderson <[email protected]> > > > > > > Justin Anderson <[email protected]> Mar 21 02:25PM -0600 > ^<#12eda27b7af13d13_digest_top> > > Unfortunately I've never used tabs so I won't be of much help there... > I'm > just regurgitating stuff that I've seen Dianne Hackborn say... She is > one > of the actual Android Framework Engineers that posts on this group. > > Thanks, > Justin Anderson > MagouyaWare Developer > http://sites.google.com/site/magouyaware > > > On Mon, Mar 21, 2011 at 2:15 PM, Daniel Rindt > > > > Topic: Can i disable Home Button in Android for my application > only.???<http://groups.google.com/group/android-developers/t/6ad5d53f5e8c8013> > > Justin Anderson <[email protected]> Mar 21 02:14PM -0600 > ^<#12eda27b7af13d13_digest_top> > > Ummm... yeah. Sounds like the app may be up to no good. The home button > press is purposely not detectable by applications. It is provided as a > failsafe way to get out of an app that may be misbehaving. > > Thanks, > Justin Anderson > MagouyaWare Developer > http://sites.google.com/site/magouyaware > > > > > > Topic: How can i get js variable value from a HTML form ? is it possible > ? <http://groups.google.com/group/android-developers/t/bbb380dbaa3085d8> > > lbendlin <[email protected]> Mar 21 12:39PM -0700 > ^<#12eda27b7af13d13_digest_top> > > http://whyandroid.com/android/206-using-webviews.html > > > > Topic: mediaplayer surface initialized to a > frame<http://groups.google.com/group/android-developers/t/f7290b4f1f4dd289> > > droid-stricken <[email protected]> Mar 21 12:32PM -0700 > ^<#12eda27b7af13d13_digest_top> > > I think i have a solution for this. Using a background image for the > surface view and removing the background before calling > mediaplayerinstance.start() works for me. > > Thanks. > > > > > Topic: Suugest any tutorial for > database<http://groups.google.com/group/android-developers/t/b03d1df9f30974c9> > > Robin Talwar <[email protected]> Mar 22 12:52AM +0530 > ^<#12eda27b7af13d13_digest_top> > > check notepad tutorial from developer site > > On Tue, Mar 22, 2011 at 12:29 AM, rishabh agrawal < > [email protected] > > > > Topic: Is there any Reminder Service in > Android?<http://groups.google.com/group/android-developers/t/f3324d90739469cb> > > roberto <[email protected]> Mar 21 11:02AM -0700 > ^<#12eda27b7af13d13_digest_top> > > If you need to run a recurring task (once, twice, 3 times a day.... or > even every 5 minutes), consider using the buzzbox sdk that is built on > top of the AlarmManager. > > More info here http://hub.buzzbox.com/android-sdk/ > > > > > Topic: Create > Project<http://groups.google.com/group/android-developers/t/47933512ebc3772b> > > rishabh agrawal <[email protected]> Mar 21 10:38AM -0700 > ^<#12eda27b7af13d13_digest_top> > > I was create my application as a android sdk api 8.and written all the > code.bu now i want run on a sdk api 4.with the help of mainfest file i > changed minSdkVersion="4",But when i installed on it then unexpected > error are created.......In this apps i used Tab..some tab work > properly but some not.Please help me how to remove this error....with > the help of try & catch i doesnt remove these error.it is possible > that i run my apps on vesion 4..... > > > > > Kostya Vasilyev <[email protected]> Mar 21 08:42PM +0300 > ^<#12eda27b7af13d13_digest_top> > > Your code probably uses Android classes or methods that didn't yet > exist > in API 4. > > Bring up Properties on your project, select Android in the list on the > left, and select Android 1.6 for building. > > Then go through compile errors, and remove or change all code that > cannot work with API level 4. > > -- Kostya > > 21.03.2011 20:38, rishabh agrawal пишет: > > -- > Kostya Vasilyev -- http://kmansoft.wordpress.com > > > > > rishabh agrawal <[email protected]> Mar 21 10:51AM -0700 > ^<#12eda27b7af13d13_digest_top> > > thanks Kostya.ur means that if i want to run my apps on api 4 then > change my code according to api 4 classes.when i change the code > according to api 4.it work very properly in API 8 > > > > > > Kostya Vasilyev <[email protected]> Mar 21 08:57PM +0300 > ^<#12eda27b7af13d13_digest_top> > > 21.03.2011 20:51, rishabh agrawal пишет: > > thanks Kostya.ur means that if i want to run my apps on api 4 then > > change my code according to api 4 classes.when i change the code > > according to api 4.it work very properly in API 8 > > Right, once you've done this, and your code runs on API4, you can > switch > your build target back to API8 for those features that require it > (install to memory card, for example). > > There are techniques that let you use API8 classes / methods while > falling back on earlier APIs where available (look it up with Google > search, typically it involves "Java reflection"). > > But as a quick first pass, switching the build target to your desired > lowest API level is a pretty good way to find places to fix. > > -- > Kostya Vasilyev -- http://kmansoft.wordpress.com > > > > Topic: Using ListPreference view in a non preference > activity/dialog<http://groups.google.com/group/android-developers/t/39fc486d3286ecd4> > > Wall-E <[email protected]> Mar 21 10:05AM -0700 > ^<#12eda27b7af13d13_digest_top> > > Well I first initially had dialog and created a layout to use in that > dialog to set certain preferences/values. So I tried to > inflate(setContentView(dialogLayout)) that same layout in a > PreferenceActivity I created but then was getting this error: > > 03-21 16:12:24.395: ERROR/AndroidRuntime(1472): Caused by: > java.lang.RuntimeException: Your content must have a ListView whose id > attribute is 'android.R.id.list' > > So assuming that I should be able to what I described above, my > question should be how to inflate the PreferenceActivity using my > layout created for the dialog but also sneaking in Preference views > such as ListPreference in that same layout. > > I'm just now thinking I should create a Preference Screen layout and > include all the views I had in my dialog layout. > > Any other suggestions? > > > > > > > > TreKing <[email protected]> Mar 21 12:22PM -0500 > ^<#12eda27b7af13d13_digest_top> > > > > I'm just now thinking I should create a Preference Screen layout > > and include all the views I had in my dialog layout. > > Seems like the easiest and most straightforward thing to do. > > > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices > > > > > Kostya Vasilyev <[email protected]> Mar 21 08:36PM +0300 > ^<#12eda27b7af13d13_digest_top> > > 21.03.2011 20:05, Wall-E пишет: > > 03-21 16:12:24.395: ERROR/AndroidRuntime(1472): Caused by: > > java.lang.RuntimeException: Your content must have a ListView whose > id > > attribute is 'android.R.id.list' > > PreferenceActivity uses a list view to display its content. If you wish > > use your own layout for the activity, include a ListView with > id="@android:id/list". > > > question should be how to inflate the PreferenceActivity using my > > layout created for the dialog but also sneaking in Preference views > > such as ListPreference in that same layout. > > Start with your own views, then a list view that would be used for > preference views. > > > I'm just now thinking I should create a Preference Screen layout and > > include all the views I had in my dialog layout. > > You can integrate your own views by using Preference, with or without > subclassing, by using "android:layout" attribute in XML or > setLayoutResource in code. > > -- > Kostya Vasilyev -- http://kmansoft.wordpress.com > > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > 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 -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] 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

