diff options
Diffstat (limited to 'src/com/android/gallery3d/app/ActivityState.java')
-rw-r--r-- | src/com/android/gallery3d/app/ActivityState.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/ActivityState.java b/src/com/android/gallery3d/app/ActivityState.java index 13cd1509a..a86351b66 100644 --- a/src/com/android/gallery3d/app/ActivityState.java +++ b/src/com/android/gallery3d/app/ActivityState.java @@ -33,9 +33,11 @@ import android.view.MenuItem; import android.view.Window; import android.view.WindowManager; +import com.android.gallery3d.R; import com.android.gallery3d.actionbar.ActionBarInterface; import com.android.gallery3d.actionbar.ActionBarUtils; import com.android.gallery3d.ui.GLView; +import com.android.gallery3d.util.GalleryUtils; abstract public class ActivityState { protected static final int FLAG_HIDE_ACTION_BAR = 1; @@ -105,7 +107,19 @@ abstract public class ActivityState { protected void onStateResult(int requestCode, int resultCode, Intent data) { } + protected float[] mBackgroundColor; + + protected int getBackgroundColorId() { + return R.color.default_background; + } + + protected float[] getBackgroundColor() { + return mBackgroundColor; + } + protected void onCreate(Bundle data, Bundle storedState) { + mBackgroundColor = GalleryUtils.intColorToFloatARGBArray( + mActivity.getResources().getColor(getBackgroundColorId())); } protected void clearStateResult() { |