From 99cfa4d1f436735ec403b1e1dbb4167b26d43cd9 Mon Sep 17 00:00:00 2001 From: kaiyiz Date: Wed, 3 Sep 2014 16:02:55 +0800 Subject: Gallery2: Customize features for regional package - Support user link to net to see more images. Change-Id: I4c095bd124057c996d4bf0d3a4a035b6587db640 --- res/menu/albumset.xml | 8 +++++++- res/values/config.xml | 6 +++++- res/values/strings.xml | 9 ++++++++- src/com/android/gallery3d/app/AlbumSetPage.java | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/res/menu/albumset.xml b/res/menu/albumset.xml index 8ac8cbbd2..625b9b737 100644 --- a/res/menu/albumset.xml +++ b/res/menu/albumset.xml @@ -1,5 +1,8 @@ - 0 + false diff --git a/res/values/strings.xml b/res/values/strings.xml index bb9bf188a..405b0b3fc 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,5 +1,8 @@ - Make available offline + + More Images + + Refresh 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(); -- cgit v1.2.3