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 | |
| 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
| -rw-r--r-- | res/menu/albumset.xml | 8 | ||||
| -rw-r--r-- | res/values/config.xml | 6 | ||||
| -rw-r--r-- | res/values/strings.xml | 9 | ||||
| -rw-r--r-- | 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 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2010 Google Inc. +<!-- Copyright (c) 2014, The Linux Foundation. All rights reserved. + Not a Contribution. + + Copyright (C) 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -34,4 +37,7 @@ android:title="@string/help" android:visible="false" android:showAsAction="never" /> + <item android:id="@+id/action_more_image" + android:title="@string/more_image" + android:showAsAction="never" /> </menu> diff --git a/res/values/config.xml b/res/values/config.xml index 33e1e146b..5af45db56 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2012 The Android Open Source Project +<!-- Copyright (c) 2014, The Linux Foundation. All rights reserved. + Not a Contribution. + + Copyright (C) 2012 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,4 +22,5 @@ <resources> <!-- Maximum recording length in milliseconds. 0 means unlimited. --> <integer name="max_video_recording_length">0</integer> + <bool name="config_show_more_images">false</bool> </resources> 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 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2007 The Android Open Source Project +<!-- Copyright (c) 2014, The Linux Foundation. All rights reserved. + Not a Contribution. + + Copyright (C) 2007 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -278,6 +281,10 @@ some albums to be viewable offline [CHAR LIMIT=30] --> <string name="make_available_offline">Make available offline</string> + <!-- A label describing to link website [CHAR LIMIT=30] --> + <string name="more_image">More Images</string> + <string name="website_for_more_image"></string> + <!-- A label of a menu item for user to sync the content [CHAR LIMIT=30] --> <string name="sync_picasa_albums">Refresh</string> 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(); |
