diff --git a/app/build.gradle b/app/build.gradle
index e2e43034..7f69dc9b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -9,8 +9,8 @@ android {
applicationId "arun.com.chromer"
minSdkVersion 16
targetSdkVersion 24
- versionCode 24
- versionName "1.6"
+ versionCode 25
+ versionName "1.6.1"
buildConfigField "String", "BASE_64", getBase64()
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 8dcd3e04..1fa4baba 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -60,6 +60,7 @@
+
+ android:theme="@style/Theme.AppCompat.Translucent"/>
+ android:theme="@style/Theme.AppCompat.Translucent">
@@ -140,7 +141,7 @@
android:name=".webheads.helper.ProxyActivity"
android:excludeFromRecents="true"
android:noHistory="true"
- android:theme="@style/Transparent"/>
+ android:theme="@style/Theme.AppCompat.Translucent"/>
glid
}
});
} else {
- mExtractionTask = new ExtractionTask(getIntent().getDataString());
+ mExtractionTask = new ExtractionTask(mBaseUrl);
mExtractionTask.execute();
}
}
@@ -115,6 +141,7 @@ protected void onDestroy() {
mExtractionTask.cancel(true);
}
mExtractionTask = null;
+ LocalBroadcastManager.getInstance(this).unregisterReceiver(mMinimizeReceiver);
}
@Override
@@ -183,6 +210,9 @@ protected void onPostExecute(Void aVoid) {
label = mUrl.toUpperCase();
}
Timber.d("Setting task description %s", label);
+ if (mIcon != null && mIcon.getWidth() < 0) {
+ mIcon = null;
+ }
if (color != Constants.NO_COLOR) {
setTaskDescription(new ActivityManager.TaskDescription(label, mIcon, color));
} else {
diff --git a/app/src/main/java/arun/com/chromer/activities/payments/util/IabHelper.java b/app/src/main/java/arun/com/chromer/activities/payments/util/IabHelper.java
index 2a98aae9..0bfbfebd 100644
--- a/app/src/main/java/arun/com/chromer/activities/payments/util/IabHelper.java
+++ b/app/src/main/java/arun/com/chromer/activities/payments/util/IabHelper.java
@@ -36,6 +36,8 @@
import java.util.ArrayList;
import java.util.List;
+import timber.log.Timber;
+
/**
* Provides convenience methods for in-app billing. You can create one instance of this
@@ -770,6 +772,10 @@ void flagEndAsync() {
int queryPurchases(Inventory inv, String itemType) throws JSONException, RemoteException {
// Query purchases
+ if (mContext == null) {
+ Timber.d("User cancelled");
+ return BILLING_RESPONSE_RESULT_USER_CANCELED;
+ }
logDebug("Querying owned items, item type: " + itemType);
logDebug("Package name: " + mContext.getPackageName());
boolean verificationFailed = false;
diff --git a/app/src/main/java/arun/com/chromer/customtabs/CustomTabs.java b/app/src/main/java/arun/com/chromer/customtabs/CustomTabs.java
index 69d70f6c..b9a8e8b8 100644
--- a/app/src/main/java/arun/com/chromer/customtabs/CustomTabs.java
+++ b/app/src/main/java/arun/com/chromer/customtabs/CustomTabs.java
@@ -9,6 +9,7 @@
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
+import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
@@ -25,11 +26,13 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Random;
import arun.com.chromer.R;
import arun.com.chromer.customtabs.callbacks.AddHomeShortcutService;
import arun.com.chromer.customtabs.callbacks.ClipboardService;
import arun.com.chromer.customtabs.callbacks.FavShareBroadcastReceiver;
+import arun.com.chromer.customtabs.callbacks.MinimizeBroadcastReceiver;
import arun.com.chromer.customtabs.callbacks.OpenInChromeReceiver;
import arun.com.chromer.customtabs.callbacks.OpenInNewTabReceiver;
import arun.com.chromer.customtabs.callbacks.SecondaryBrowserReceiver;
@@ -62,6 +65,7 @@ public class CustomTabs {
private static final int BOTTOM_OPEN_TAB = 11;
private static final int BOTTOM_SHARE_TAB = 12;
+ private static final int BOTTOM_MINIMIZE_TAB = 13;
/**
* Fallback in case there was en error launching custom tabs
*/
@@ -119,6 +123,8 @@ public void openUri(Activity activity, Uri uri) {
private CustomTabs(Activity context) {
mActivity = context;
+ mForWebHead = false;
+ mNoAnimations = false;
}
/**
@@ -133,29 +139,31 @@ public static CustomTabs from(@NonNull Activity activity) {
/**
* Opens the URL on a Custom Tab if possible. Otherwise fallsback to opening it on a WebView.
- *
- * @param activity The host activity.
- * @param customTabsIntent a CustomTabsIntent to be used if Custom Tabs is available.
- * @param uri the Uri to be opened.
*/
- private static void openCustomTab(Activity activity, CustomTabsIntent customTabsIntent, Uri uri) {
- final String packageName = getCustomTabPackage(activity);
-
+ private void openCustomTab() {
+ final String packageName = getCustomTabPackage(mActivity);
+ final CustomTabsIntent customTabsIntent = mIntentBuilder.build();
+ final Uri uri = Uri.parse(mUrl);
if (packageName != null) {
customTabsIntent.intent.setPackage(packageName);
- Intent keepAliveIntent = new Intent()
- .setClassName(activity.getPackageName(), KeepAliveService.class.getCanonicalName());
+
+ final Intent keepAliveIntent = new Intent();
+ keepAliveIntent.setClassName(mActivity.getPackageName(), KeepAliveService.class.getCanonicalName());
customTabsIntent.intent.putExtra(EXTRA_CUSTOM_TABS_KEEP_ALIVE, keepAliveIntent);
+
+ if (mNoAnimations) {
+ // customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
+ }
try {
- customTabsIntent.launchUrl(activity, uri);
+ customTabsIntent.launchUrl(mActivity, uri);
Timber.d("Launched url: %s", uri.toString());
} catch (Exception e) {
- CUSTOM_TABS_FALLBACK.openUri(activity, uri);
+ CUSTOM_TABS_FALLBACK.openUri(mActivity, uri);
Timber.e("Called fallback even though a package was found, weird Exception : %s", e.toString());
}
} else {
Timber.e("Called fallback since no package found!");
- CUSTOM_TABS_FALLBACK.openUri(activity, uri);
+ CUSTOM_TABS_FALLBACK.openUri(mActivity, uri);
}
}
@@ -273,17 +281,12 @@ public CustomTabs prepare() {
// set defaults
mIntentBuilder.setShowTitle(true);
mIntentBuilder.enableUrlBarHiding();
- mIntentBuilder.addDefaultShareMenuItem(); // TODO make this conditional
+ mIntentBuilder.addDefaultShareMenuItem();
- // prepare animations
prepareAnimations();
- // prepare toolbar color
prepareToolbar();
- // prepare action button
prepareActionButton();
- // prepare all the menu items
prepareMenuItems();
- // prepare all bottom bar item
prepareBottomBar();
return this;
}
@@ -293,8 +296,7 @@ public CustomTabs prepare() {
*/
public void launch() {
assertBuilderInitialized();
- CustomTabsIntent customTabsIntent = mIntentBuilder.build();
- openCustomTab(mActivity, customTabsIntent, Uri.parse(mUrl));
+ openCustomTab();
// Dispose reference
mActivity = null;
@@ -469,6 +471,16 @@ private void prepareActionButton() {
mIntentBuilder.setActionButton(icon, mActivity.getString(R.string.fav_share_app), favSharePending);
}
break;
+ case Preferences.PREFERRED_ACTION_GEN_SHARE:
+ final Bitmap shareIcon = new IconicsDrawable(mActivity)
+ .icon(CommunityMaterial.Icon.cmd_share_variant)
+ .color(Color.WHITE)
+ .sizeDp(24).toBitmap();
+ final Intent intent = new Intent(mActivity, ShareBroadcastReceiver.class);
+ final PendingIntent sharePending = PendingIntent.getBroadcast(mActivity, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
+ //noinspection ConstantConditions
+ mIntentBuilder.setActionButton(shareIcon, mActivity.getString(R.string.share_via), sharePending, true);
+ break;
}
}
@@ -560,12 +572,12 @@ private void prepareBottomBar() {
if (!Preferences.bottomBar(mActivity)) {
return;
}
- int iconColor = ColorUtil.getForegroundWhiteOrBlack(mToolbarColor);
+ final int iconColor = ColorUtil.getForegroundWhiteOrBlack(mToolbarColor);
+
if (Util.isLollipopAbove()) {
final Intent openInNewTabIntent = new Intent(mActivity, OpenInNewTabReceiver.class);
final PendingIntent pendingOpenTabIntent = PendingIntent.getBroadcast(mActivity, 0, openInNewTabIntent, PendingIntent.FLAG_UPDATE_CURRENT);
-
- Bitmap openTabIcon = new IconicsDrawable(mActivity)
+ final Bitmap openTabIcon = new IconicsDrawable(mActivity)
.icon(CommunityMaterial.Icon.cmd_plus_box)
.color(iconColor)
.sizeDp(24).toBitmap();
@@ -574,12 +586,24 @@ private void prepareBottomBar() {
final Intent shareIntent = new Intent(mActivity, ShareBroadcastReceiver.class);
final PendingIntent pendingShareIntent = PendingIntent.getBroadcast(mActivity, 0, shareIntent, PendingIntent.FLAG_UPDATE_CURRENT);
-
- Bitmap shareIcon = new IconicsDrawable(mActivity)
+ final Bitmap shareIcon = new IconicsDrawable(mActivity)
.icon(CommunityMaterial.Icon.cmd_share_variant)
.color(iconColor)
.sizeDp(24).toBitmap();
+
mIntentBuilder.addToolbarItem(BOTTOM_SHARE_TAB, shareIcon, mActivity.getString(R.string.share), pendingShareIntent);
+
+ if (mForWebHead /* &&s Preferences.mergeTabs(mActivity) */) {
+ final Intent minimizeIntent = new Intent(mActivity, MinimizeBroadcastReceiver.class);
+ minimizeIntent.putExtra(Intent.EXTRA_TEXT, mUrl);
+ final PendingIntent pendingMin = PendingIntent.getBroadcast(mActivity, new Random().nextInt(), minimizeIntent, PendingIntent.FLAG_UPDATE_CURRENT);
+ final Bitmap minimizeIcon = new IconicsDrawable(mActivity)
+ .icon(CommunityMaterial.Icon.cmd_flip_to_back)
+ .color(iconColor)
+ .sizeDp(24).toBitmap();
+
+ mIntentBuilder.addToolbarItem(BOTTOM_MINIMIZE_TAB, minimizeIcon, mActivity.getString(R.string.minimize), pendingMin);
+ }
}
/**
diff --git a/app/src/main/java/arun/com/chromer/customtabs/callbacks/AddHomeShortcutService.java b/app/src/main/java/arun/com/chromer/customtabs/callbacks/AddHomeShortcutService.java
index f23089c6..c53af4ef 100644
--- a/app/src/main/java/arun/com/chromer/customtabs/callbacks/AddHomeShortcutService.java
+++ b/app/src/main/java/arun/com/chromer/customtabs/callbacks/AddHomeShortcutService.java
@@ -20,7 +20,6 @@
import com.bumptech.glide.Glide;
-import java.net.URL;
import java.util.concurrent.ExecutionException;
import arun.com.chromer.R;
@@ -57,38 +56,41 @@ protected void onHandleIntent(Intent intent) {
return;
}
- String shortCutName = getShortcutName(unShortenedUrl, res);
- String faviconUrl = res.getFaviconUrl();
+ final String shortCutName = getShortcutName(unShortenedUrl, res);
+ final String faviconUrl = res.getFaviconUrl();
Bitmap favicon = getFaviconBitmap(faviconUrl);
- if (favicon != null) {
- if (!isValidFavicon(favicon)) {
- Palette palette = Palette.from(favicon).generate();
- int iconColor = ColorUtil.getBestFaviconColor(palette);
- if (iconColor == -1) {
- iconColor = ContextCompat.getColor(this, R.color.primary);
- }
- favicon = createIcon(iconColor, shortCutName);
- }
- } else {
+ if (favicon == null) {
favicon = createIcon(ContextCompat.getColor(this, R.color.primary), shortCutName);
+ } else if (!isValidFavicon(favicon)) {
+ final Palette palette = Palette.from(favicon).generate();
+ int iconColor = ColorUtil.getBestFaviconColor(palette);
+ if (iconColor == Constants.NO_COLOR) {
+ iconColor = ContextCompat.getColor(this, R.color.primary);
+ }
+ favicon = createIcon(iconColor, shortCutName);
}
Timber.i("Creating shortcut: %s", shortCutName);
+ try {
+ broadcastShortcutIntent(shortCutName, favicon, getWebIntent(unShortenedUrl));
+ } catch (Exception e) {
+ Timber.e("Failed to create shortcut");
+ }
- Intent webIntent = getWebIntent(unShortenedUrl);
-
- Intent addIntent = new Intent(Constants.ACTION_INSTALL_SHORTCUT);
- addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, webIntent);
- addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, shortCutName);
- addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON, favicon);
-
- sendBroadcast(addIntent);
showToast(getString(R.string.added) + " " + shortCutName);
}
}
}
+ private void broadcastShortcutIntent(String shortCutName, Bitmap favicon, Intent webIntent) {
+ Intent addIntent = new Intent(Constants.ACTION_INSTALL_SHORTCUT);
+ addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, webIntent);
+ addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, shortCutName);
+ addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON, favicon);
+ sendBroadcast(addIntent);
+ }
+
@Nullable
private JResult extractWebsiteData(HtmlFetcher fetcher, String unShortenedUrl) {
JResult res = null;
@@ -112,7 +114,7 @@ private Bitmap getFaviconBitmap(String faviconUrl) {
favicon = Glide.with(this)
.load(faviconUrl)
.asBitmap()
- .into(-1, -1)
+ .into(192, 192)
.get();
} catch (InterruptedException | ExecutionException ignored) {
@@ -155,7 +157,7 @@ private Bitmap createIcon(@ColorInt int color, String shortCutName) {
textPaint.setColor(ColorUtil.getForegroundWhiteOrBlack(color));
textPaint.setStyle(Paint.Style.FILL);
- drawTextInCanvasCentre(canvas, textPaint, getLetter(shortCutName));
+ drawTextInCanvasCentre(canvas, textPaint, Util.getFirstLetter(shortCutName));
return icon;
}
@@ -170,40 +172,13 @@ private void drawTextInCanvasCentre(Canvas canvas, Paint paint, String text) {
canvas.drawText(text, x, y, paint);
}
- private String getLetter(String address) {
- String result = "X";
- if (address != null) {
- try {
- URL url = new URL(address);
- String host = url.getHost();
- if (host != null && host.length() != 0) {
- if (host.startsWith("www")) {
- String[] splits = host.split("\\.");
- if (splits.length > 1) result = String.valueOf(splits[1].charAt(0));
- else result = String.valueOf(splits[0].charAt(0));
- } else
- result = String.valueOf(host.charAt(0));
- } else {
- if (address.length() != 0) {
- return String.valueOf(address.charAt(0));
- }
- }
- } catch (Exception e) {
- if (address.length() != 0) {
- return String.valueOf(address.charAt(0));
- } else return result;
- }
- }
- return result.toUpperCase();
- }
-
- private boolean isValidFavicon(Bitmap favicon) {
+ private boolean isValidFavicon(@NonNull Bitmap favicon) {
return !(favicon.getWidth() == 16 || favicon.getHeight() == 16
|| favicon.getWidth() == 32 || favicon.getHeight() == 32);
}
private void legacyAdd(@NonNull String unShortenedUrl) {
- Intent webIntent = getWebIntent(unShortenedUrl);
+ final Intent webIntent = getWebIntent(unShortenedUrl);
String hostName = Uri.parse(unShortenedUrl).getHost();
String shortcutName = hostName == null ? unShortenedUrl : hostName;
@@ -216,20 +191,14 @@ private void legacyAdd(@NonNull String unShortenedUrl) {
Intent.ShortcutIconResource.fromContext(
getApplicationContext(),
R.mipmap.ic_launcher));
-
sendBroadcast(addIntent);
}
private void showToast(@NonNull final String msgToShow) {
- Handler handler = new Handler(Looper.getMainLooper());
- handler.post(new Runnable() {
-
+ new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
- Toast.makeText(
- AddHomeShortcutService.this,
- msgToShow,
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(AddHomeShortcutService.this, msgToShow, Toast.LENGTH_SHORT).show();
}
});
}
diff --git a/app/src/main/java/arun/com/chromer/customtabs/callbacks/MinimizeBroadcastReceiver.java b/app/src/main/java/arun/com/chromer/customtabs/callbacks/MinimizeBroadcastReceiver.java
new file mode 100644
index 00000000..a0b5a73b
--- /dev/null
+++ b/app/src/main/java/arun/com/chromer/customtabs/callbacks/MinimizeBroadcastReceiver.java
@@ -0,0 +1,57 @@
+// Copyright 2015 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package arun.com.chromer.customtabs.callbacks;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.support.annotation.NonNull;
+import android.support.v4.content.LocalBroadcastManager;
+
+import arun.com.chromer.shared.Constants;
+import arun.com.chromer.webheads.WebHeadService;
+import timber.log.Timber;
+
+/**
+ * A BroadcastReceiver that handles the Action Intent from the Custom Tab and fires a Share Intent.
+ */
+public class MinimizeBroadcastReceiver extends BroadcastReceiver {
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String url = intent.getStringExtra(Intent.EXTRA_TEXT);
+ if (url != null) {
+ sendMinimizeIntent(context, url);
+ signalWebHead(context, url);
+ } else {
+ Timber.e("Error");
+ }
+ }
+
+ private void signalWebHead(Context context, @NonNull String url) {
+ final Intent webHeadService = new Intent(context, WebHeadService.class);
+ webHeadService.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ webHeadService.setData(Uri.parse(url));
+ webHeadService.putExtra(Constants.EXTRA_KEY_MINIMIZE, true);
+ context.startService(webHeadService);
+ }
+
+ private void sendMinimizeIntent(Context context, String url) {
+ final Intent minimizeIntent = new Intent(Constants.ACTION_MINIMIZE);
+ minimizeIntent.putExtra(Intent.EXTRA_TEXT, url);
+ LocalBroadcastManager.getInstance(context).sendBroadcastSync(minimizeIntent);
+ }
+}
diff --git a/app/src/main/java/arun/com/chromer/customtabs/callbacks/ShareBroadcastReceiver.java b/app/src/main/java/arun/com/chromer/customtabs/callbacks/ShareBroadcastReceiver.java
index 648401c4..64b9ceb8 100644
--- a/app/src/main/java/arun/com/chromer/customtabs/callbacks/ShareBroadcastReceiver.java
+++ b/app/src/main/java/arun/com/chromer/customtabs/callbacks/ShareBroadcastReceiver.java
@@ -19,6 +19,8 @@
import android.content.Intent;
import android.widget.Toast;
+import arun.com.chromer.R;
+
/**
* A BroadcastReceiver that handles the Action Intent from the Custom Tab and fires a Share Intent.
*/
@@ -37,7 +39,7 @@ public void onReceive(Context context, Intent intent) {
context.startActivity(chooserIntent);
} else {
- Toast.makeText(context, "Try again!", Toast.LENGTH_SHORT).show();
+ Toast.makeText(context, R.string.invalid_link, Toast.LENGTH_SHORT).show();
}
}
}
diff --git a/app/src/main/java/arun/com/chromer/fragments/CustomizeFragment.java b/app/src/main/java/arun/com/chromer/fragments/CustomizeFragment.java
index fae6c90e..fcdd5936 100644
--- a/app/src/main/java/arun/com/chromer/fragments/CustomizeFragment.java
+++ b/app/src/main/java/arun/com/chromer/fragments/CustomizeFragment.java
@@ -1,15 +1,34 @@
package arun.com.chromer.fragments;
+import android.content.Context;
+import android.os.Build;
import android.os.Bundle;
+import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
+import android.support.annotation.StringRes;
import android.support.v4.app.Fragment;
+import android.support.v4.content.ContextCompat;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.Html;
+import android.text.Spanned;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.mikepenz.community_material_typeface_library.CommunityMaterial;
+import com.mikepenz.iconics.IconicsDrawable;
+
+import java.util.LinkedList;
+import java.util.List;
import arun.com.chromer.R;
import arun.com.chromer.preferences.BottomBarPreferenceFragment;
import arun.com.chromer.preferences.PersonalizationPreferenceFragment;
+import arun.com.chromer.util.Util;
+import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
@@ -19,6 +38,9 @@
public class CustomizeFragment extends Fragment {
private Unbinder mUnbinder;
+ @BindView(R.id.bottom_bar_action_list)
+ public RecyclerView mBottomActionsList;
+
public static CustomizeFragment newInstance() {
CustomizeFragment fragment = new CustomizeFragment();
Bundle args = new Bundle();
@@ -41,6 +63,12 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
.replace(R.id.preference_container, PersonalizationPreferenceFragment.newInstance())
.replace(R.id.bottom_bar_container, BottomBarPreferenceFragment.newInstance())
.commit();
+ initBottomActions();
+ }
+
+ private void initBottomActions() {
+ mBottomActionsList.setLayoutManager(new LinearLayoutManager(getContext()));
+ mBottomActionsList.setAdapter(new BottomActionsAdapter(getActivity()));
}
@Override
@@ -48,4 +76,82 @@ public void onDestroyView() {
super.onDestroyView();
mUnbinder.unbind();
}
+
+ public static class BottomActionsAdapter extends RecyclerView.Adapter {
+ private static final String NEW_TAB = "NEW_TAB";
+ private static final String SHARE = "SHARE";
+ private static final String MINIMIZE = "MINIMIZE";
+ private final Context mContext;
+ private final List mItems = new LinkedList<>();
+
+ BottomActionsAdapter(Context context) {
+ mContext = context;
+ if (Util.isLollipopAbove()) {
+ mItems.add(NEW_TAB);
+ }
+ mItems.add(SHARE);
+ mItems.add(MINIMIZE);
+ }
+
+ @Override
+ public BottomActionHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+ return new BottomActionHolder(LayoutInflater.from(mContext).inflate(R.layout.bottom_action_template, parent, false));
+ }
+
+ @Override
+ public void onBindViewHolder(BottomActionHolder holder, int position) {
+ final int iconColor = ContextCompat.getColor(mContext, R.color.colorAccentLighter);
+ switch (mItems.get(position)) {
+ case NEW_TAB:
+ holder.icon.setImageDrawable(new IconicsDrawable(mContext)
+ .icon(CommunityMaterial.Icon.cmd_plus_box)
+ .color(iconColor)
+ .sizeDp(18));
+ holder.action.setText(html(R.string.open_in_new_tab_explanation));
+ break;
+ case SHARE:
+ holder.icon.setImageDrawable(new IconicsDrawable(mContext)
+ .icon(CommunityMaterial.Icon.cmd_share_variant)
+ .color(iconColor)
+ .sizeDp(18));
+ holder.action.setText(html(R.string.share_action_explanation));
+ break;
+ case MINIMIZE:
+ holder.icon.setImageDrawable(new IconicsDrawable(mContext)
+ .icon(CommunityMaterial.Icon.cmd_flip_to_back)
+ .color(iconColor)
+ .sizeDp(18));
+ holder.action.setText(html(R.string.minimize_action_explanation));
+ break;
+ }
+ }
+
+ @Override
+ public int getItemCount() {
+ return mItems.size();
+ }
+
+ @NonNull
+ private Spanned html(@StringRes int res) {
+ final String string = mContext.getString(res);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ return Html.fromHtml(string, Html.FROM_HTML_MODE_LEGACY);
+ } else {
+ //noinspection deprecation
+ return Html.fromHtml(string);
+ }
+ }
+
+ class BottomActionHolder extends RecyclerView.ViewHolder {
+ @BindView(R.id.bottom_action)
+ TextView action;
+ @BindView(R.id.bottom_icon)
+ ImageView icon;
+
+ BottomActionHolder(View view) {
+ super(view);
+ ButterKnife.bind(this, view);
+ }
+ }
+ }
}
diff --git a/app/src/main/java/arun/com/chromer/preferences/BehaviorPreferenceFragment.java b/app/src/main/java/arun/com/chromer/preferences/BehaviorPreferenceFragment.java
index 5cfeba36..48e8fb64 100644
--- a/app/src/main/java/arun/com/chromer/preferences/BehaviorPreferenceFragment.java
+++ b/app/src/main/java/arun/com/chromer/preferences/BehaviorPreferenceFragment.java
@@ -23,7 +23,6 @@
*/
public class BehaviorPreferenceFragment extends DividerLessPreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener {
- private IconSwitchPreference mBlackListPreference;
private IconSwitchPreference mMergeTabsPreference;
public BehaviorPreferenceFragment() {
@@ -47,15 +46,15 @@ public void onCreate(Bundle savedInstanceState) {
}
private void setupBlacklistPreference() {
- mBlackListPreference = (IconSwitchPreference) findPreference(Preferences.BLACKLIST_DUMMY);
- if (mBlackListPreference != null) {
+ IconSwitchPreference blackListPreference = (IconSwitchPreference) findPreference(Preferences.BLACKLIST_DUMMY);
+ if (blackListPreference != null) {
Drawable recentImg = new IconicsDrawable(getActivity())
.icon(CommunityMaterial.Icon.cmd_filter_variant)
.color(ContextCompat.getColor(getActivity(), R.color.material_dark_light))
.sizeDp(24);
- mBlackListPreference.setIcon(recentImg);
- mBlackListPreference.hideSwitch();
- mBlackListPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
+ blackListPreference.setIcon(recentImg);
+ blackListPreference.hideSwitch();
+ blackListPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Intent blacklistedApps = new Intent(getActivity(), BlacklistManagerActivity.class);
diff --git a/app/src/main/java/arun/com/chromer/preferences/BottomBarPreferenceFragment.java b/app/src/main/java/arun/com/chromer/preferences/BottomBarPreferenceFragment.java
index f8a39af1..039b17c2 100644
--- a/app/src/main/java/arun/com/chromer/preferences/BottomBarPreferenceFragment.java
+++ b/app/src/main/java/arun/com/chromer/preferences/BottomBarPreferenceFragment.java
@@ -3,10 +3,8 @@
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
-import android.support.v7.preference.Preference;
import android.support.v7.preference.SwitchPreferenceCompat;
-import com.afollestad.materialdialogs.MaterialDialog;
import com.mikepenz.community_material_typeface_library.CommunityMaterial;
import com.mikepenz.iconics.IconicsDrawable;
@@ -15,8 +13,6 @@
public class BottomBarPreferenceFragment extends DividerLessPreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener {
- private SwitchPreferenceCompat mBottomBarPreference;
-
public BottomBarPreferenceFragment() {
// Required empty public constructor
}
@@ -37,29 +33,11 @@ public void onCreate(Bundle savedInstanceState) {
}
private void setupBottomBarPreference() {
- mBottomBarPreference = (SwitchPreferenceCompat) findPreference(Preferences.BOTTOM_BAR_ENABLED);
- mBottomBarPreference.setIcon(new IconicsDrawable(getActivity())
+ SwitchPreferenceCompat bottomBarPreference = (SwitchPreferenceCompat) findPreference(Preferences.BOTTOM_BAR_ENABLED);
+ bottomBarPreference.setIcon(new IconicsDrawable(getActivity())
.icon(CommunityMaterial.Icon.cmd_more)
.color(ContextCompat.getColor(getActivity(), R.color.material_dark_light))
.sizeDp(24));
- if (mBottomBarPreference != null) {
- mBottomBarPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
- @Override
- public boolean onPreferenceClick(Preference preference) {
- final SwitchPreferenceCompat switchCompat = (SwitchPreferenceCompat) preference;
- boolean isChecked = switchCompat.isChecked();
-
- if (isChecked && Preferences.dummyBottomBar(getActivity().getApplicationContext())) {
- new MaterialDialog.Builder(getActivity())
- .title(R.string.bottom_bar)
- .content(R.string.bottom_bar_expln)
- .positiveText(android.R.string.ok)
- .show();
- }
- return false;
- }
- });
- }
}
diff --git a/app/src/main/java/arun/com/chromer/preferences/manager/Preferences.java b/app/src/main/java/arun/com/chromer/preferences/manager/Preferences.java
index fe7356cd..f0dd1f1b 100644
--- a/app/src/main/java/arun/com/chromer/preferences/manager/Preferences.java
+++ b/app/src/main/java/arun/com/chromer/preferences/manager/Preferences.java
@@ -33,6 +33,7 @@ public class Preferences {
public static final String BOTTOM_BAR_ENABLED = "bottombar_enabled_pref";
public static final int PREFERRED_ACTION_BROWSER = 1;
public static final int PREFERRED_ACTION_FAV_SHARE = 2;
+ public static final int PREFERRED_ACTION_GEN_SHARE = 3;
public static final int ANIMATION_MEDIUM = 1;
public static final int ANIMATION_SHORT = 2;
public static final String TOOLBAR_COLOR_PREF = "toolbar_color_pref";
diff --git a/app/src/main/java/arun/com/chromer/shared/Constants.java b/app/src/main/java/arun/com/chromer/shared/Constants.java
index 259573d1..f309a074 100644
--- a/app/src/main/java/arun/com/chromer/shared/Constants.java
+++ b/app/src/main/java/arun/com/chromer/shared/Constants.java
@@ -33,10 +33,12 @@ public class Constants {
// Intent Actions
public static final String ACTION_TOOLBAR_COLOR_SET = "ACTION_TOOLBAR_COLOR_SET";
public static final String ACTION_WEBHEAD_COLOR_SET = "ACTION_WEBHEAD_COLOR_SET";
+ public static final String ACTION_CLOSE_MAIN = "ACTION_CLOSE_MAIN";
public static final String ACTION_INSTALL_SHORTCUT = "com.android.launcher.action.INSTALL_SHORTCUT";
public static final String ACTION_STOP_WEBHEAD_SERVICE = "close_service";
public static final String ACTION_REBIND_WEBHEAD_TAB_CONNECTION = "rebind_event";
public static final String ACTION_CLOSE_WEBHEAD_BY_URL = "ACTION_CLOSE_WEBHEAD_BY_URL";
+ public static final String ACTION_MINIMIZE = "ACTION_MINIMIZE";
// Extra keys
public static final String EXTRA_KEY_SHOULD_REFRESH_BINDING = "EXTRA_KEY_SHOULD_REFRESH_BINDING";
public static final String EXTRA_KEY_FROM_WEBHEAD = "EXTRA_KEY_FROM_WEBHEAD";
@@ -46,6 +48,7 @@ public class Constants {
public static final String EXTRA_KEY_REBIND_WEBHEAD_CXN = "EXTRA_KEY_REBIND_WEBHEAD_CXN";
public static final String EXTRA_KEY_FROM_NEW_TAB = "EXTRA_KEY_FROM_NEW_TAB";
public static final String EXTRA_KEY_WEBSITE = "EXTRA_KEY_WEBSITE";
+ public static final String EXTRA_KEY_MINIMIZE = "EXTRA_KEY_MINIMIZE";
// Request codes
public static final int REQUEST_CODE_VOICE = 10001;
diff --git a/app/src/main/java/arun/com/chromer/util/Util.java b/app/src/main/java/arun/com/chromer/util/Util.java
index a6ab0986..0946ef46 100644
--- a/app/src/main/java/arun/com/chromer/util/Util.java
+++ b/app/src/main/java/arun/com/chromer/util/Util.java
@@ -43,6 +43,7 @@
import arun.com.chromer.customtabs.prefetch.ScannerService;
import arun.com.chromer.shared.Constants;
import arun.com.chromer.views.IntentPickerSheetView;
+import timber.log.Timber;
/**
* Created by Arun on 17/12/2015.
@@ -307,11 +308,15 @@ public static boolean isNetworkAvailable(@NonNull Context context) {
@Nullable
public static String getClipBoardText(@NonNull Context context) {
final ClipboardManager clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
- if (clipboardManager.hasPrimaryClip()) {
- final ClipData.Item item = clipboardManager.getPrimaryClip().getItemAt(0);
- if (item != null) {
- return item.getText().toString();
+ try {
+ if (clipboardManager.hasPrimaryClip() & clipboardManager.getPrimaryClip().getItemCount() != 0) {
+ final ClipData.Item item = clipboardManager.getPrimaryClip().getItemAt(0);
+ if (item != null && item.getText() != null) {
+ return item.getText().toString();
+ }
}
+ } catch (Exception ignored) {
+ Timber.e(ignored.toString());
}
return null;
}
diff --git a/app/src/main/java/arun/com/chromer/webheads/WebHeadService.java b/app/src/main/java/arun/com/chromer/webheads/WebHeadService.java
index 6a31a227..8390b2b3 100644
--- a/app/src/main/java/arun/com/chromer/webheads/WebHeadService.java
+++ b/app/src/main/java/arun/com/chromer/webheads/WebHeadService.java
@@ -104,6 +104,8 @@ public void onCreate() {
bindToCustomTabSession();
registerReceivers();
PageExtractTasksManager.registerListener(this);
+
+ showNotification();
}
@Override
@@ -137,10 +139,7 @@ public static CustomTabsSession getTabSession() {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
- processIntentAndWebHead(intent);
-
- showNotification();
- // addTestWebHeads();
+ processIntent(intent);
return START_STICKY;
}
@@ -164,18 +163,20 @@ private void showNotification() {
startForeground(1, notification);
}
- private void processIntentAndWebHead(Intent intent) {
+ private void processIntent(Intent intent) {
if (intent == null || intent.getDataString() == null) return; // don't do anything
final boolean isFromNewTab = intent.getBooleanExtra(Constants.EXTRA_KEY_FROM_NEW_TAB, false);
+ final boolean isMinimized = intent.getBooleanExtra(Constants.EXTRA_KEY_MINIMIZE, false);
final String urlToLoad = intent.getDataString();
if (!isLinkAlreadyLoaded(urlToLoad)) {
- addWebHead(urlToLoad, isFromNewTab);
- } else
+ addWebHead(urlToLoad, isFromNewTab, isMinimized);
+ } else if (!isMinimized) {
Toast.makeText(this, R.string.already_loaded, Toast.LENGTH_SHORT).show();
+ }
}
- private void addWebHead(final String webHeadUrl, boolean isNewTab) {
+ private void addWebHead(final String webHeadUrl, final boolean isNewTab, final boolean isMinimized) {
PageExtractTasksManager.startExtraction(webHeadUrl);
mSpringChain2D.clear();
@@ -200,7 +201,7 @@ private void addWebHead(final String webHeadUrl, boolean isNewTab) {
newWebHead.reveal();
mWebHeads.put(webHeadUrl, newWebHead);
- if (Preferences.aggressiveLoading(this)) {
+ if (Preferences.aggressiveLoading(this) && !isMinimized) {
DocumentUtils.openNewCustomTab(this, newWebHead);
}
}
@@ -256,15 +257,6 @@ public void onResourceReady(Bitmap resource, GlideAnimation super Bitmap> glid
}
}
- @SuppressWarnings("unused")
- private void addTestWebHeads() {
- //addWebHead("http://www.medium.com");
- //addWebHead("https://www.linkedin.com/");
- addWebHead("http://www.github.com", false);
- addWebHead("http://www.androidpolice.com", false);
- // addWebHead("https://bitbucket.org/");
- }
-
private boolean isLinkAlreadyLoaded(@Nullable String urlToLoad) {
return urlToLoad == null || mWebHeads.containsKey(urlToLoad);
}
diff --git a/app/src/main/res/layout/bottom_action_template.xml b/app/src/main/res/layout/bottom_action_template.xml
new file mode 100644
index 00000000..c6188ddf
--- /dev/null
+++ b/app/src/main/res/layout/bottom_action_template.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/customize_fragment.xml b/app/src/main/res/layout/customize_fragment.xml
index c5afef59..9041cec0 100644
--- a/app/src/main/res/layout/customize_fragment.xml
+++ b/app/src/main/res/layout/customize_fragment.xml
@@ -52,6 +52,23 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
+
+
+
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 8ba139f3..08ad39e3 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -21,10 +21,12 @@
- Sekundärer Browser
- Lieblings-Teil-App
+ - General share
- 1
- 2
+ - 3
- Rechts
@@ -140,7 +142,7 @@
Web Heads Dienst
Beta beitreten
Tester werden
- “Beta Versionen sind experimentell. Sie haben die neuesten Funktionen, enthalten jedoch auch Fehler. Du kannst bei der Entwicklung helfen, indem du als Tester mitmachst und Fehler in der Google+ Community meldest. \n\nBitte stelle sicher, dass du der Community beigetreten bist und klicke dann auf den Button \”Tester werden\". \n\nBEACHTE: Du musst der Community beitreten um Tester zu werden. "
+ “Beta Versionen sind experimentell. Sie haben die neuesten Funktionen, enthalten jedoch auch Fehler. Du kannst bei der Entwicklung helfen, indem du als Tester mitmachst und Fehler in der Google+ Community meldest. \n\nBitte stelle sicher, dass du der Community beigetreten bist und klicke dann auf den Button \”Tester werden\“. \n\nBEACHTE: Du musst der Community beitreten um Tester zu werden. ”
Keine kompatible Spracherkennungs App gefunden
Ausgeschlossene Apps (Blacklist)
Verhindere, dass Chromer Links von bestimmten Apps verarbeitet
@@ -151,7 +153,6 @@
Öffnest du einen Link aus einer ausgeschlossenen App, dann wird dieser im sekundären Browser geöffnet
Du kannst die Berechtigung für die Bedienungshilfe jetzt deaktivieren.
Letzte geladene URLs
- Ausgeschlossene Apps %1$s
Übersetzungen
Tabs und Apps zusammen anzeigen
Zeige Tabs zusammen mit Apps im \“Zuletzt geöffnet\”-Screen an
@@ -162,8 +163,6 @@
Bottom-Bar
In neuem Tab öffnen
Ungültiger Link. Hast du Text oder einen Link durch langes Drücken auf die Seite kopiert?
- Um sicherzugehen, dass die Bottom-Bar korrekt funktioniert wird empfohlen, die aktuelle Chrome Version als Custom-Tab-Anbieter zu verwenden. Ältere Versionen und andere Browser können Probleme verursachen.\n
-\nDie Bottom-Bar bietet 2 Optionen:\n\nIn neuem Tab öffnen (5.0+) - Kopiere Text oder einen Link vom Bildschirm und drücke auf dieses Icon, um den Link oder eine Suchen nach dem Text in einem neuen Custom Tab zu öffnen.\nTeilen - Öffne Android\'s Teilen-Dialog.\n\nMehr Aktionen kommen bald!
Einstellungen
Anpassen
nicht gesetzt
diff --git a/app/src/main/res/values-es-rUS/strings.xml b/app/src/main/res/values-es-rUS/strings.xml
index fe049c7d..381bc94e 100644
--- a/app/src/main/res/values-es-rUS/strings.xml
+++ b/app/src/main/res/values-es-rUS/strings.xml
@@ -11,7 +11,8 @@
- Navegador secundario
- - "Aplicación favorita para compartir "
+ - "Aplicación favorita para compartir"
+ - General share
- Derecha
diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml
index a1b7cc32..b31bddce 100644
--- a/app/src/main/res/values-hr/strings.xml
+++ b/app/src/main/res/values-hr/strings.xml
@@ -12,6 +12,7 @@
- Sekundarni preglednik
- Aplikacija za dijeljenje
+ - General share
- Desno
@@ -144,8 +145,6 @@
Donja traka
Otvori u novoj kartici
Poveznica je nevažeća. Jeste li kopirali neki tekst ili poveznicu dugim pritiskom stranice?
- Da biste osigurali da donja traka radi ispravno preporučamo vam da postavite najnoviju verziju Chromea kao pružatelja prilagođenih kartica. Ostale verzije i preglednici možda neće funkcionirati. \n
-\nDonja traka omogućava dvije radnje: \n\nOtvaranje u novoj kartici (5.0+) - kopirajte poveznicu ili tekst na zaslonu i pritisnite ovu ikonu da biste otvorili poveznicu ili pretražili tekst u novoj prilagođenoj kartici.\nDijeljenje - brzo izvedite Androidovu radnju dijeljenja. \n\n Više radnji dolazi uskoro.
Opcije
Prilagodba
Nije postavljeno
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index a1ce8b41..3ddf92cf 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -13,10 +13,12 @@
- Browser secondario
- App di condivisione preferita
+ - General share
- 1
- 2
+ - 3
- Destra
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index d6df5ec5..bc183e74 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -12,6 +12,7 @@
- Tweede browser
- Favoriete deel-app
+ - General share
- Rechts
@@ -154,7 +155,6 @@
Bar onderaan
Openen op nieuw tabblad
Ongeldige link, heb je wel tekst of een link gekopieerd door lang op de pagina te drukken?
- Om ervoor te zorgen dat de bar onderaan goed werkt wordt het aangeraden om de nieuwste versie van Chrome als aangepaste tabbladen-leverancier in te stellen. Oudere versies en andere browsers werken mogelijk niet.\n\nDe bar onderaan levert twee acties:\n\nOpenen op nieuw tabblad (5.0+) - kopieer een link of tekst op het scherm en druk op dit icoon om de link te openen of de tekst in een nieuw aangepast tabblad te zoeken.\nDelen- snel de delen-functie van Android gebruiken.\n\nBinnenkort meer functies.
Opties
Aanpassen
"Niet ingesteld "
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 577f7d97..ca49cc75 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -21,10 +21,12 @@
- Navegador secundário
- App para compartilhar favorito
+ - General share
- 1
- 2
+ - 3
- Direita
@@ -162,8 +164,6 @@
Barra Inferior
Abrir em nova aba
Link inválido, você copiou algum texto ou link dando um toque longo na página?
- Para assegurar que a barra funciona bem, definir a versão mais recente do Chrome como provedor de abas padrão é recomendado. Versões antigas e outros navegadores podem não funcionar. \n
- \nA barra inferior fornece duas ações: \n\nAbrir nova aba (5.0+) -Copiar um link ou texto da tela e pressionar o botão para abrir o link ou pesquisar o texto em uma nova aba.\nCompartilhar - Usar rapidamente a ação de compartilhar nativa do Android. \n\n Mais ações virão em breve.
Opções
Personalizar
Não Definido
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 12fb0ccf..26480820 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -21,10 +21,12 @@
- Вторичный браузер
- Избранное приложение для передачи
+ - General share
- 1
- 2
+ - 3
- Право
@@ -162,8 +164,6 @@
Нижняя панель
Открыть в новой вкладке
Неверная ссылка, вы точно скопировали текст или ссылку долгим нажатием на странице?
- Чтобы нижняя панель работала корректно, установите актуальную версию Chrome это рекомендуемый браузер для быстрых вкладок (custom tab). С более старыми версиями и другими браузерами может не работать. \n
-\nНижняя панель обеспечивает две функции: \n\nОткрытие в новой вкладке (Андроид 5.0+) - Копирование ссылки или текста на экране с последующим нажатием иконки на панели для перехода по ссылке или выполнения поиска выделенного текста в новой быстрой вкладке.\nПоделиться - Быстро выполнить стандартное Андроид действие Поделиться. \n\n Больше функций появится со временем.
Опции
Настроить
Не задано
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index 9c51a10c..9093366a 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -16,6 +16,7 @@
- Sekundárny prehliadač
- Aplikácia pre zdieľanie
+ - General share
- Vpravo
@@ -152,9 +153,6 @@
Dolná lišta
Otvoriť na novej karte
Neplatný odkaz, skopírovali ste text alebo odkaz dlhým podržaním?
- Pre zaistenie funkčnosti dolnej lišty, je potrebné nastaviť najnovšiu verziu Chrome ako poskytovateľa Custom Tabs. Staršie verzie a iné prehliadače nemusia fungovať. \n
- \nDolná lišta poskytuje dve akcie:
-\n\nOtvoriť na novej karte (5.0+) - Skopírujte odkaz alebo text na obrazovke a kliknite na túto ikonu pre otvorenie odkazu alebo vyhľadanie textu na novej karte.\nZdieľať - Rýchle spustenie akcie zdieľania. \n\nViac akcií neskôr.
Možnosti
Prispôsobiť
Nenastavené
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index b1a163da..f234db7a 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -12,6 +12,7 @@
- İkincil tarayıcı
- Sık kullanılan paylaşım uygulaması
+ - General share
- Sağ
diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml
index bc1bab48..af24d4ea 100644
--- a/app/src/main/res/values-v21/styles.xml
+++ b/app/src/main/res/values-v21/styles.xml
@@ -5,4 +5,13 @@
- @drawable/launch_screen
- @color/colorPrimaryDarker
+
+
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 3f083f64..d6a07f35 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -21,10 +21,12 @@
- 第二浏览器
- 最喜欢的分享应用
+ - General share
- 1
- 2
+ - 3
- 右侧
@@ -161,8 +163,6 @@
底栏
在新标签页中打开
无效的链接,您是否已通过长按页面操作复制了文本或者链接?
- 为了确保底栏功能正常工作,建议使用 最新版本的 Chrome 浏览器作为自定义标签页的提供程序。较旧版本或其他的浏览器将可能导致无法正常工作。\n
-\n底栏内提供两种操作:\n\n在新标签页中打开 (需安卓 5.0+) - 复制屏幕上的链接或文本后点击图标来选择在新打开的标签页内加载链接或搜索关键词。\n分享 - 快速执行安卓系统内的分享操作。 \n\n 后续还将添加更多操作。
选项
自定义
未设置
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index f136d62f..bafc403f 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -16,6 +16,7 @@
- 第二順位瀏覽器
- 喜好的分享應用程式
+ - General share
- 右側
@@ -149,15 +150,6 @@
底層工具列
在新分頁中開啟
無效的連結。請問您有透過長按頁面來複製任何連結或文字嗎?
- 為了確保底部工具列能正常運作,建議您設定最新的 Chrome 版本 做為自訂分頁的提供者。 舊的版本或者其他瀏覽器可能無法正常運作。
-
-底部工具列提供兩個功能:
-
-在新分頁中開啟(Android 5.0或更新版本)-
-複製螢幕中的連結或文字然後點選圖示來開啟連結或在新分頁中搜尋文字。
-分享-快速顯示Android的分享功能。
-
-更多功能即將推出。
選項
定制
尚未設定
diff --git a/app/src/main/res/values/changelog.xml b/app/src/main/res/values/changelog.xml
index 129378c9..76af5f99 100644
--- a/app/src/main/res/values/changelog.xml
+++ b/app/src/main/res/values/changelog.xml
@@ -18,8 +18,15 @@ a {
You can view this again in the about screen.
-1.6
+1.6.1
View album
+
+ - NEW: Minimize web heads - added a button in bottom bar to minimize current open page back to web head.
+ - NEW: General share as preferred action
+ - IMPROVED: Many performance and crash fixes.
+ - IMPROVED: Translation updates.
+
+1.6
Web heads
- NEW: Grouped web heads and much smoother animations.
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 503cd27c..3617d9ac 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -21,10 +21,12 @@
- Secondary browser
- Favourite share app
+ - General share
- 1
- 2
+ - 3
- Right
@@ -172,8 +174,6 @@
Bottom Bar
Open in new tab
Invalid link, have you copied any text or link by long pressing the page?
- To ensure bottom bar works properly, setting latest Chrome version as custom tab provider is recommended. Older versions and other browsers may not work. \n
- \nBottom bar provides two actions: \n\nOpen in new tab (5.0+) - Copy a link or text on screen and press this icon to launch the link or search the text in a new custom tab.\nShare - Quickly perform Android share action. \n\n More actions coming soon.
Options
Customize
Not Set
@@ -210,4 +210,9 @@
Improves loading times
Web heads will disappear once you open the link
Close web heads once clicked.
+ Minimize
+ Open in new tab (5.0+) - Copy a link or text on screen and press this icon to launch the link or search the copied text in a new custom or bubble.]]>
+ Share - Quickly perform Android share action.]]>
+ Minimize - Will minimize the current page back to a bubble. Only available if web heads is turned on.]]>
+ Available actions
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 9b3832fb..2ec3ee20 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -71,12 +71,12 @@
- @drawable/launch_screen
-