diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-09-03 16:02:55 +0800 |
---|---|---|
committer | Xiaojing Zhang <zhangx@codeaurora.org> | 2014-11-04 20:38:11 -0800 |
commit | 99cfa4d1f436735ec403b1e1dbb4167b26d43cd9 (patch) | |
tree | 17259d412a883f94da027d5bdb8be2503b5ee116 /src/com/android/gallery3d | |
parent | 253ebbd3baff765d034adcd960bdaf40e949a44f (diff) | |
download | android_packages_apps_Gallery2-99cfa4d1f436735ec403b1e1dbb4167b26d43cd9.tar.gz android_packages_apps_Gallery2-99cfa4d1f436735ec403b1e1dbb4167b26d43cd9.tar.bz2 android_packages_apps_Gallery2-99cfa4d1f436735ec403b1e1dbb4167b26d43cd9.zip |
Gallery2: Customize features for regional package
- Support user link to net to see more images.
Change-Id: I4c095bd124057c996d4bf0d3a4a035b6587db640
Diffstat (limited to 'src/com/android/gallery3d')
-rw-r--r-- | src/com/android/gallery3d/app/AlbumSetPage.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/AlbumSetPage.java b/src/com/android/gallery3d/app/AlbumSetPage.java index d56b5b85d..a088e8b6c 100644 --- a/src/com/android/gallery3d/app/AlbumSetPage.java +++ b/src/com/android/gallery3d/app/AlbumSetPage.java @@ -1,4 +1,7 @@ /* + * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * Not a Contribution. + * * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,6 +23,7 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Rect; +import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Message; @@ -560,6 +564,11 @@ public class AlbumSetPage extends ActivityState implements helpItem.setVisible(helpIntent != null); if (helpIntent != null) helpItem.setIntent(helpIntent); + MenuItem moreItem = menu.findItem(R.id.action_more_image); + moreItem.setVisible(mActivity.getResources().getBoolean( + R.bool.config_show_more_images)); + + mActionBar.setTitle(mTitle); mActionBar.setSubtitle(mSubtitle); if (mShowClusterMenu != wasShowingClusterMenu) { @@ -577,6 +586,11 @@ public class AlbumSetPage extends ActivityState implements protected boolean onItemSelected(MenuItem item) { Activity activity = mActivity; switch (item.getItemId()) { + case R.id.action_more_image: + Uri moreUri = Uri.parse(mActivity.getString(R.string.website_for_more_image)); + Intent moreIntent = new Intent(Intent.ACTION_VIEW, moreUri); + mActivity.startActivity(moreIntent); + return true; case R.id.action_cancel: activity.setResult(Activity.RESULT_CANCELED); activity.finish(); |