Loading res/layout/inspector_fragment.xml +2 −1 Original line number Original line Diff line number Diff line Loading @@ -62,6 +62,7 @@ android:orientation="vertical" android:orientation="vertical" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:paddingTop="20dp" android:visibility="gone" /> android:visibility="gone" /> </LinearLayout> </LinearLayout> Loading src/com/android/documentsui/inspector/DebugView.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -70,7 +70,7 @@ public class DebugView extends TableView implements DebugDisplay { @Override @Override public void accept(DocumentInfo info) { public void accept(DocumentInfo info) { setTitle(R.string.inspector_debug_section); setTitle(R.string.inspector_debug_section, false); put(R.string.debug_content_uri, info.derivedUri.toString()); put(R.string.debug_content_uri, info.derivedUri.toString()); put(R.string.debug_document_id, info.documentId); put(R.string.debug_document_id, info.documentId); Loading Loading @@ -128,7 +128,7 @@ public class DebugView extends TableView implements DebugDisplay { private void dumpMetadata(String type, Bundle bundle) { private void dumpMetadata(String type, Bundle bundle) { String title = mContext.getResources().getString( String title = mContext.getResources().getString( R.string.inspector_debug_metadata_section); R.string.inspector_debug_metadata_section); putTitle(String.format(title, type)); putTitle(String.format(title, type), true); List<String> keys = new ArrayList<>(bundle.keySet()); List<String> keys = new ArrayList<>(bundle.keySet()); Collections.sort(keys); Collections.sort(keys); for (String key : keys) { for (String key : keys) { Loading src/com/android/documentsui/inspector/InspectorController.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -400,11 +400,6 @@ public final class InspectorController { */ */ public interface TableDisplay extends Display { public interface TableDisplay extends Display { /** * Sets the title of the data. */ void setTitle(@StringRes int title); /** /** * Adds a row in the table. * Adds a row in the table. */ */ Loading src/com/android/documentsui/inspector/MediaView.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -57,7 +57,7 @@ public class MediaView extends TableView implements MediaDisplay { @Override @Override public void accept(DocumentInfo doc, Bundle metadata, @Nullable Runnable geoClickListener) { public void accept(DocumentInfo doc, Bundle metadata, @Nullable Runnable geoClickListener) { setTitle(R.string.inspector_metadata_section); setTitle(R.string.inspector_metadata_section, true); Bundle exif = metadata.getBundle(DocumentsContract.METADATA_EXIF); Bundle exif = metadata.getBundle(DocumentsContract.METADATA_EXIF); if (exif != null) { if (exif != null) { Loading src/com/android/documentsui/inspector/TableView.java +6 −4 Original line number Original line Diff line number Diff line Loading @@ -56,17 +56,19 @@ public class TableView extends LinearLayout implements TableDisplay { mRes = context.getResources(); mRes = context.getResources(); } } @Override void setTitle(@StringRes int title, boolean showDivider) { public void setTitle(@StringRes int title) { putTitle(mContext.getResources().getString(title), showDivider); putTitle(mContext.getResources().getString(title)); } } // A naughty title method (that takes strings, not message ids), mostly for DebugView. // A naughty title method (that takes strings, not message ids), mostly for DebugView. protected void putTitle(CharSequence title) { protected void putTitle(CharSequence title, boolean showDivider) { TextView view = mTitles.get(title); TextView view = mTitles.get(title); if (view == null) { if (view == null) { LinearLayout layout = LinearLayout layout = (LinearLayout) mInflater.inflate(R.layout.inspector_section_title, null); (LinearLayout) mInflater.inflate(R.layout.inspector_section_title, null); if (!showDivider) { layout.setDividerDrawable(null); } view = (TextView) layout.findViewById(R.id.inspector_header_title); view = (TextView) layout.findViewById(R.id.inspector_header_title); addView(layout); addView(layout); mTitles.put(title, view); mTitles.put(title, view); Loading Loading
res/layout/inspector_fragment.xml +2 −1 Original line number Original line Diff line number Diff line Loading @@ -62,6 +62,7 @@ android:orientation="vertical" android:orientation="vertical" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:paddingTop="20dp" android:visibility="gone" /> android:visibility="gone" /> </LinearLayout> </LinearLayout> Loading
src/com/android/documentsui/inspector/DebugView.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -70,7 +70,7 @@ public class DebugView extends TableView implements DebugDisplay { @Override @Override public void accept(DocumentInfo info) { public void accept(DocumentInfo info) { setTitle(R.string.inspector_debug_section); setTitle(R.string.inspector_debug_section, false); put(R.string.debug_content_uri, info.derivedUri.toString()); put(R.string.debug_content_uri, info.derivedUri.toString()); put(R.string.debug_document_id, info.documentId); put(R.string.debug_document_id, info.documentId); Loading Loading @@ -128,7 +128,7 @@ public class DebugView extends TableView implements DebugDisplay { private void dumpMetadata(String type, Bundle bundle) { private void dumpMetadata(String type, Bundle bundle) { String title = mContext.getResources().getString( String title = mContext.getResources().getString( R.string.inspector_debug_metadata_section); R.string.inspector_debug_metadata_section); putTitle(String.format(title, type)); putTitle(String.format(title, type), true); List<String> keys = new ArrayList<>(bundle.keySet()); List<String> keys = new ArrayList<>(bundle.keySet()); Collections.sort(keys); Collections.sort(keys); for (String key : keys) { for (String key : keys) { Loading
src/com/android/documentsui/inspector/InspectorController.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -400,11 +400,6 @@ public final class InspectorController { */ */ public interface TableDisplay extends Display { public interface TableDisplay extends Display { /** * Sets the title of the data. */ void setTitle(@StringRes int title); /** /** * Adds a row in the table. * Adds a row in the table. */ */ Loading
src/com/android/documentsui/inspector/MediaView.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -57,7 +57,7 @@ public class MediaView extends TableView implements MediaDisplay { @Override @Override public void accept(DocumentInfo doc, Bundle metadata, @Nullable Runnable geoClickListener) { public void accept(DocumentInfo doc, Bundle metadata, @Nullable Runnable geoClickListener) { setTitle(R.string.inspector_metadata_section); setTitle(R.string.inspector_metadata_section, true); Bundle exif = metadata.getBundle(DocumentsContract.METADATA_EXIF); Bundle exif = metadata.getBundle(DocumentsContract.METADATA_EXIF); if (exif != null) { if (exif != null) { Loading
src/com/android/documentsui/inspector/TableView.java +6 −4 Original line number Original line Diff line number Diff line Loading @@ -56,17 +56,19 @@ public class TableView extends LinearLayout implements TableDisplay { mRes = context.getResources(); mRes = context.getResources(); } } @Override void setTitle(@StringRes int title, boolean showDivider) { public void setTitle(@StringRes int title) { putTitle(mContext.getResources().getString(title), showDivider); putTitle(mContext.getResources().getString(title)); } } // A naughty title method (that takes strings, not message ids), mostly for DebugView. // A naughty title method (that takes strings, not message ids), mostly for DebugView. protected void putTitle(CharSequence title) { protected void putTitle(CharSequence title, boolean showDivider) { TextView view = mTitles.get(title); TextView view = mTitles.get(title); if (view == null) { if (view == null) { LinearLayout layout = LinearLayout layout = (LinearLayout) mInflater.inflate(R.layout.inspector_section_title, null); (LinearLayout) mInflater.inflate(R.layout.inspector_section_title, null); if (!showDivider) { layout.setDividerDrawable(null); } view = (TextView) layout.findViewById(R.id.inspector_header_title); view = (TextView) layout.findViewById(R.id.inspector_header_title); addView(layout); addView(layout); mTitles.put(title, view); mTitles.put(title, view); Loading