[android-developers] Re: How to include a button in the live wallpaper settings GUI?
Thanks, I got it to work now! I used a preference inside the Live wallpaper settings, like in the code below. Here is an article about preferences that was very useful in solving this issue: http://www.kaloer.com/android-preferences ?xml version=1.0 encoding=utf-8? PreferenceScreen xmlns:android=http://schemas.android.com/apk/res/android; android:title=@string/settings_title ListPreference android:key=Transparens android:title=Transparens android:summary=Choose how transparent it should be android:entries=@array/Transparens_names android:entryValues=@array/Transparens_values / ListPreference android:key=speed android:title=Speed android:summary=Choose how fast it should be android:entries=@array/speed_names android:entryValues=@array/speed_values / Preference android:key=Download android:title=Download android:summary=Download / /PreferenceScreen On Mar 23, 2:46 pm, TreKing treking...@gmail.com wrote: On Wed, Mar 23, 2011 at 4:40 AM, MobileVisuals eyv...@astralvisuals.comwrote: Do you mean adding the button to the settings.xml file or to the layout : main.xml file? I mean add it where you want it - that's up to you. If you want it in an PreferenceActivity, you would use a Preference, not a button. The button was not visible when I added it to the layout : main.xml file Layout seems fine. Probably something else going on. and the live wallpaper crashed when I added it to the settings.xml file. You can't add button to a preference activity like that - again, use a Preference. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to include a button in the live wallpaper settings GUI?
Do you mean adding the button to the settings.xml file or to the layout : main.xml file? The button was not visible when I added it to the layout : main.xml file and the live wallpaper crashed when I added it to the settings.xml file. Here is the code that I used: --- settings.xml: ?xml version=1.0 encoding=utf-8? PreferenceScreen xmlns:android=http://schemas.android.com/apk/res/android; android:title=@string/settings_title ListPreference android:key=Transparens android:title=Transparens android:summary=Choose how transparent it should be android:entries=@array/Transparens_names android:entryValues=@array/Transparens_values / ListPreference android:key=speed android:title=Speed android:summary=Choose how fast it should be android:entries=@array/speed_names android:entryValues=@array/speed_values / Button android:id=@+id/button android:layout_width=wrap_content android:layout_height=wrap_content android:text=Button1 / /PreferenceScreen - layout : main.xml fil: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=hello / Button android:id=@+id/button android:layout_width=wrap_content android:layout_height=wrap_content android:text=Button1 / /LinearLayout On Mar 22, 6:27 pm, TreKing treking...@gmail.com wrote: On Tue, Mar 22, 2011 at 9:35 AM, MobileVisuals eyv...@astralvisuals.comwrote: how can I include a button like that in the live wallpaper settings GUI? Include a button in the layout used for the live wallpaper settings GUI ... - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to include a button in the live wallpaper settings GUI?
On Wed, Mar 23, 2011 at 4:40 AM, MobileVisuals eyv...@astralvisuals.comwrote: Do you mean adding the button to the settings.xml file or to the layout : main.xml file? I mean add it where you want it - that's up to you. If you want it in an PreferenceActivity, you would use a Preference, not a button. The button was not visible when I added it to the layout : main.xml file Layout seems fine. Probably something else going on. and the live wallpaper crashed when I added it to the settings.xml file. You can't add button to a preference activity like that - again, use a Preference. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en