Loading res/values/strings.xml +5 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,11 @@ <!-- Button label that hides the error bar [CHAR LIMIT=24] --> <string name="button_dismiss">Dismiss</string> <string name="button_retry">Try Again</string> <!-- Button label that removes the default application to open a file. --> <string name="button_clear">Clear</string> <!-- Button label that show in the providers service. Many providers have their own app such as google drive. Pressing this button would open in the file in the providers app. --> <string name="button_show_provider">Show in provider</string> <!-- A string used to show user that currently documents are not sorted in any given order. [CHAR_LIMIT=30] --> <string name="not_sorted">Not sorted</string> Loading src/com/android/documentsui/inspector/actions/Action.java +3 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.documentsui.inspector.actions; import android.annotation.Nullable; import android.annotation.StringRes; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; Loading Loading @@ -54,6 +55,8 @@ public abstract class Action { public abstract @Nullable String getPackageName(); public abstract @StringRes int getButtonLabel(); public @Nullable Drawable getAppIcon() { String packageName = getPackageName(); Loading src/com/android/documentsui/inspector/actions/ActionView.java +3 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.documentsui.inspector.InspectorController; */ public final class ActionView extends LinearLayout implements InspectorController.ActionDisplay { private Context mContext; private final TextView mHeader; private final ImageView mAppIcon; private final TextView mAppName; Loading @@ -56,6 +57,7 @@ public final class ActionView extends LinearLayout implements InspectorControlle View view = inflater.inflate(R.layout.inspector_action_view, null); addView(view); mContext = context; mHeader = (TextView) findViewById(R.id.action_header); mAppIcon = (ImageView) findViewById(R.id.app_icon); mAppName = (TextView) findViewById(R.id.app_name); Loading @@ -69,6 +71,7 @@ public final class ActionView extends LinearLayout implements InspectorControlle setAppIcon(mAction.getAppIcon()); setAppName(mAction.getAppName()); mActionButton.setContentDescription(mContext.getString(action.getButtonLabel())); mActionButton.setOnClickListener(listener); showAction(true); Loading src/com/android/documentsui/inspector/actions/ClearDefaultAppAction.java +5 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.documentsui.inspector.actions; import android.annotation.StringRes; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; Loading Loading @@ -84,4 +85,8 @@ public final class ClearDefaultAppAction extends Action { return null; } } public @StringRes int getButtonLabel() { return R.string.button_clear; } } No newline at end of file src/com/android/documentsui/inspector/actions/ShowInProviderAction.java +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.provider.DocumentsContract.Document.FLAG_SUPPORTS_SETTINGS import android.content.Context; import android.content.pm.PackageManager; import android.support.annotation.StringRes; import com.android.documentsui.R; import com.android.documentsui.base.DocumentInfo; import com.android.documentsui.roots.ProvidersAccess; Loading Loading @@ -67,4 +68,8 @@ public final class ShowInProviderAction extends Action { public String getPackageName() { return mProviders.getPackageName(mDoc.derivedUri.getAuthority()); } public @StringRes int getButtonLabel() { return R.string.button_show_provider; } } No newline at end of file res/layout/inspector_action_view.xml +2 −2 File changed.Contains only whitespace changes. Show changes Loading
res/values/strings.xml +5 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,11 @@ <!-- Button label that hides the error bar [CHAR LIMIT=24] --> <string name="button_dismiss">Dismiss</string> <string name="button_retry">Try Again</string> <!-- Button label that removes the default application to open a file. --> <string name="button_clear">Clear</string> <!-- Button label that show in the providers service. Many providers have their own app such as google drive. Pressing this button would open in the file in the providers app. --> <string name="button_show_provider">Show in provider</string> <!-- A string used to show user that currently documents are not sorted in any given order. [CHAR_LIMIT=30] --> <string name="not_sorted">Not sorted</string> Loading
src/com/android/documentsui/inspector/actions/Action.java +3 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.documentsui.inspector.actions; import android.annotation.Nullable; import android.annotation.StringRes; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; Loading Loading @@ -54,6 +55,8 @@ public abstract class Action { public abstract @Nullable String getPackageName(); public abstract @StringRes int getButtonLabel(); public @Nullable Drawable getAppIcon() { String packageName = getPackageName(); Loading
src/com/android/documentsui/inspector/actions/ActionView.java +3 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.documentsui.inspector.InspectorController; */ public final class ActionView extends LinearLayout implements InspectorController.ActionDisplay { private Context mContext; private final TextView mHeader; private final ImageView mAppIcon; private final TextView mAppName; Loading @@ -56,6 +57,7 @@ public final class ActionView extends LinearLayout implements InspectorControlle View view = inflater.inflate(R.layout.inspector_action_view, null); addView(view); mContext = context; mHeader = (TextView) findViewById(R.id.action_header); mAppIcon = (ImageView) findViewById(R.id.app_icon); mAppName = (TextView) findViewById(R.id.app_name); Loading @@ -69,6 +71,7 @@ public final class ActionView extends LinearLayout implements InspectorControlle setAppIcon(mAction.getAppIcon()); setAppName(mAction.getAppName()); mActionButton.setContentDescription(mContext.getString(action.getButtonLabel())); mActionButton.setOnClickListener(listener); showAction(true); Loading
src/com/android/documentsui/inspector/actions/ClearDefaultAppAction.java +5 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.documentsui.inspector.actions; import android.annotation.StringRes; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; Loading Loading @@ -84,4 +85,8 @@ public final class ClearDefaultAppAction extends Action { return null; } } public @StringRes int getButtonLabel() { return R.string.button_clear; } } No newline at end of file
src/com/android/documentsui/inspector/actions/ShowInProviderAction.java +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.provider.DocumentsContract.Document.FLAG_SUPPORTS_SETTINGS import android.content.Context; import android.content.pm.PackageManager; import android.support.annotation.StringRes; import com.android.documentsui.R; import com.android.documentsui.base.DocumentInfo; import com.android.documentsui.roots.ProvidersAccess; Loading Loading @@ -67,4 +68,8 @@ public final class ShowInProviderAction extends Action { public String getPackageName() { return mProviders.getPackageName(mDoc.derivedUri.getAuthority()); } public @StringRes int getButtonLabel() { return R.string.button_show_provider; } } No newline at end of file
res/layout/inspector_action_view.xml +2 −2 File changed.Contains only whitespace changes. Show changes