diff options
-rw-r--r-- | res/layout/live_wallpaper_content.xml | 17 | ||||
-rw-r--r-- | res/values/strings.xml | 2 | ||||
-rw-r--r-- | src/com/android/wallpaper/livepicker/LiveWallpaperPickActivity.java | 11 |
3 files changed, 18 insertions, 12 deletions
diff --git a/res/layout/live_wallpaper_content.xml b/res/layout/live_wallpaper_content.xml index 4dc6dbc..94864c0 100644 --- a/res/layout/live_wallpaper_content.xml +++ b/res/layout/live_wallpaper_content.xml @@ -50,21 +50,22 @@ <LinearLayout android:orientation="horizontal" - android:layout_width="fill_parent" + android:layout_gravity="center" + android:layout_width="wrap_content" android:layout_height="wrap_content"> - - <Button android:id="@+id/configure" - android:layout_width="0px" + + <Button android:id="@+id/set" + android:layout_width="160dip" android:layout_height="wrap_content" android:layout_weight="1" - android:text="@string/configure_wallpaper" + android:text="@string/wallpaper_instructions" android:layout_gravity="center" /> - <Button android:id="@+id/set" - android:layout_width="0px" + <Button android:id="@+id/configure" + android:layout_width="160dip" android:layout_height="wrap_content" android:layout_weight="1" - android:text="@string/wallpaper_instructions" + android:text="@string/configure_wallpaper" android:layout_gravity="center" /> </LinearLayout> diff --git a/res/values/strings.xml b/res/values/strings.xml index 3a51485..190bb19 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -26,7 +26,7 @@ for the system. --> <string name="live_wallpaper_picker_title">Live wallpaper</string> <!-- List item for configuring the current wallpaper --> - <string name="configure_wallpaper">Configure...</string> + <string name="configure_wallpaper">Settingsā¦</string> <!-- Button label on Wallpaper Gallery screen; user selects this button to set a specific wallpaper --> <string name="wallpaper_instructions">Set wallpaper</string> <!-- Warning message, no live wallpapers available. --> diff --git a/src/com/android/wallpaper/livepicker/LiveWallpaperPickActivity.java b/src/com/android/wallpaper/livepicker/LiveWallpaperPickActivity.java index 0cd60bb..c2db020 100644 --- a/src/com/android/wallpaper/livepicker/LiveWallpaperPickActivity.java +++ b/src/com/android/wallpaper/livepicker/LiveWallpaperPickActivity.java @@ -293,7 +293,7 @@ public class LiveWallpaperPickActivity extends Activity implements button.setOnClickListener(this); mConfigureButton = (Button)findViewById(R.id.configure); - mConfigureButton.setEnabled(false); + mConfigureButton.setVisibility(View.GONE); mConfigureButton.setOnClickListener(this); // Set default return data @@ -340,8 +340,11 @@ public class LiveWallpaperPickActivity extends Activity implements public void onItemSelected(AdapterView parent, View v, int position, long id) { mSelectedIntent = mWallpaperIntents.get(position); mSelectedInfo = mWallpaperInfos.get(position); - mConfigureButton.setEnabled(mSelectedInfo != null - && mSelectedInfo.getSettingsActivity() != null); + mConfigureButton.setVisibility( + (mSelectedInfo != null && + mSelectedInfo.getSettingsActivity() != null) + ? View.VISIBLE + : View.GONE); findViewById(R.id.set).setEnabled(true); WallpaperConnection conn = new WallpaperConnection(mSelectedIntent); @@ -359,6 +362,8 @@ public class LiveWallpaperPickActivity extends Activity implements try { mWallpaperManager.getIWallpaperManager().setWallpaperComponent( mSelectedIntent.getComponent()); + mWallpaperManager.setWallpaperOffsets( + v.getRootView().getWindowToken(), 0.5f, 0.0f); this.setResult(RESULT_OK); } catch (RemoteException e) { // do nothing |