Loading WallpaperPicker/res/layout/actionbar_set_wallpaper.xml +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" style="?android:actionButtonStyle" android:id="@+id/set_wallpaper_button" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView style="?android:actionBarTabTextStyle" Loading WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java +5 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ public class WallpaperCropActivity extends Activity { protected CropView mCropView; protected Uri mUri; private View mSetWallpaperButton; @Override protected void onCreate(Bundle savedInstanceState) { Loading Loading @@ -111,10 +112,12 @@ public class WallpaperCropActivity extends Activity { cropImageAndSetWallpaper(imageUri, null, finishActivityWhenDone); } }); mSetWallpaperButton = findViewById(R.id.set_wallpaper_button); // Load image in background final BitmapRegionTileSource.UriBitmapSource bitmapSource = new BitmapRegionTileSource.UriBitmapSource(this, imageUri, 1024); mSetWallpaperButton.setVisibility(View.INVISIBLE); Runnable onLoad = new Runnable() { public void run() { if (bitmapSource.getLoadingState() != BitmapSource.State.LOADED) { Loading @@ -122,6 +125,8 @@ public class WallpaperCropActivity extends Activity { getString(R.string.wallpaper_load_fail), Toast.LENGTH_LONG).show(); finish(); } else { mSetWallpaperButton.setVisibility(View.VISIBLE); } } }; Loading WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java +4 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { private static final String DEFAULT_WALLPAPER_THUMBNAIL_FILENAME = "default_thumb2.jpg"; private View mSelectedTile; private View mSetWallpaperButton; private boolean mIgnoreNextTap; private OnClickListener mThumbnailOnClickListener; Loading Loading @@ -146,11 +147,13 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { onLoad = null; } else { mFirstClick = false; a.mSetWallpaperButton.setVisibility(View.INVISIBLE); onLoad = new Runnable() { public void run() { if (mBitmapSource != null && mBitmapSource.getLoadingState() == BitmapSource.State.LOADED) { a.selectTile(mView); a.mSetWallpaperButton.setVisibility(View.VISIBLE); } else { ViewGroup parent = (ViewGroup) mView.getParent(); if (parent != null) { Loading Loading @@ -466,6 +469,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { } } }); mSetWallpaperButton = findViewById(R.id.set_wallpaper_button); // CAB for deleting items mActionModeCallback = new ActionMode.Callback() { Loading Loading
WallpaperPicker/res/layout/actionbar_set_wallpaper.xml +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" style="?android:actionButtonStyle" android:id="@+id/set_wallpaper_button" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView style="?android:actionBarTabTextStyle" Loading
WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java +5 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ public class WallpaperCropActivity extends Activity { protected CropView mCropView; protected Uri mUri; private View mSetWallpaperButton; @Override protected void onCreate(Bundle savedInstanceState) { Loading Loading @@ -111,10 +112,12 @@ public class WallpaperCropActivity extends Activity { cropImageAndSetWallpaper(imageUri, null, finishActivityWhenDone); } }); mSetWallpaperButton = findViewById(R.id.set_wallpaper_button); // Load image in background final BitmapRegionTileSource.UriBitmapSource bitmapSource = new BitmapRegionTileSource.UriBitmapSource(this, imageUri, 1024); mSetWallpaperButton.setVisibility(View.INVISIBLE); Runnable onLoad = new Runnable() { public void run() { if (bitmapSource.getLoadingState() != BitmapSource.State.LOADED) { Loading @@ -122,6 +125,8 @@ public class WallpaperCropActivity extends Activity { getString(R.string.wallpaper_load_fail), Toast.LENGTH_LONG).show(); finish(); } else { mSetWallpaperButton.setVisibility(View.VISIBLE); } } }; Loading
WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java +4 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { private static final String DEFAULT_WALLPAPER_THUMBNAIL_FILENAME = "default_thumb2.jpg"; private View mSelectedTile; private View mSetWallpaperButton; private boolean mIgnoreNextTap; private OnClickListener mThumbnailOnClickListener; Loading Loading @@ -146,11 +147,13 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { onLoad = null; } else { mFirstClick = false; a.mSetWallpaperButton.setVisibility(View.INVISIBLE); onLoad = new Runnable() { public void run() { if (mBitmapSource != null && mBitmapSource.getLoadingState() == BitmapSource.State.LOADED) { a.selectTile(mView); a.mSetWallpaperButton.setVisibility(View.VISIBLE); } else { ViewGroup parent = (ViewGroup) mView.getParent(); if (parent != null) { Loading Loading @@ -466,6 +469,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { } } }); mSetWallpaperButton = findViewById(R.id.set_wallpaper_button); // CAB for deleting items mActionModeCallback = new ActionMode.Callback() { Loading