Loading packages/DocumentsUI/res/layout/drawer_layout.xml +61 −52 Original line number Diff line number Diff line Loading @@ -14,7 +14,15 @@ limitations under the License. --> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <!-- CoordinatorLayout is necessary for various components (e.g. Snackbars, and floating action buttons) to operate correctly. --> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout"> <android.support.v4.widget.DrawerLayout android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"> Loading Loading @@ -73,3 +81,4 @@ </LinearLayout> </android.support.v4.widget.DrawerLayout> </android.support.design.widget.CoordinatorLayout> packages/DocumentsUI/res/layout/fixed_layout.xml +48 −38 Original line number Diff line number Diff line Loading @@ -14,7 +14,15 @@ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <!-- CoordinatorLayout is necessary for various components (e.g. Snackbars, and floating action buttons) to operate correctly. --> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> Loading Loading @@ -60,3 +68,5 @@ </LinearLayout> </LinearLayout> </android.support.design.widget.CoordinatorLayout> packages/DocumentsUI/res/layout/single_pane_layout.xml +28 −18 Original line number Diff line number Diff line Loading @@ -14,7 +14,15 @@ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <!-- CoordinatorLayout is necessary for various components (e.g. Snackbars, and floating action buttons) to operate correctly. --> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> Loading @@ -40,3 +48,5 @@ <include layout="@layout/directory_cluster"/> </LinearLayout> </android.support.design.widget.CoordinatorLayout> packages/DocumentsUI/src/com/android/documentsui/CopyService.java +8 −6 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static com.android.documentsui.Shared.DEBUG; import static com.android.documentsui.model.DocumentInfo.getCursorLong; import static com.android.documentsui.model.DocumentInfo.getCursorString; import android.app.Activity; import android.app.IntentService; import android.app.Notification; import android.app.NotificationManager; Loading @@ -37,6 +38,7 @@ import android.os.RemoteException; import android.os.SystemClock; import android.provider.DocumentsContract; import android.provider.DocumentsContract.Document; import android.support.design.widget.Snackbar; import android.text.format.DateUtils; import android.util.Log; import android.widget.Toast; Loading Loading @@ -107,10 +109,10 @@ public class CopyService extends IntentService { * @param srcDocs A list of src files to copy. * @param dstStack The copy destination stack. */ public static void start(Context context, List<DocumentInfo> srcDocs, DocumentStack dstStack, public static void start(Activity activity, List<DocumentInfo> srcDocs, DocumentStack dstStack, int mode) { final Resources res = context.getResources(); final Intent copyIntent = new Intent(context, CopyService.class); final Resources res = activity.getResources(); final Intent copyIntent = new Intent(activity, CopyService.class); copyIntent.putParcelableArrayListExtra( EXTRA_SRC_LIST, new ArrayList<DocumentInfo>(srcDocs)); copyIntent.putExtra(EXTRA_STACK, (Parcelable) dstStack); Loading @@ -118,10 +120,10 @@ public class CopyService extends IntentService { int toastMessage = (mode == TRANSFER_MODE_COPY) ? R.plurals.copy_begin : R.plurals.move_begin; Toast.makeText(context, Shared.makeSnackbar(activity, res.getQuantityString(toastMessage, srcDocs.size(), srcDocs.size()), Toast.LENGTH_SHORT).show(); context.startService(copyIntent); Snackbar.LENGTH_SHORT).show(); activity.startService(copyIntent); } @Override Loading packages/DocumentsUI/src/com/android/documentsui/CreateDirectoryFragment.java +2 −2 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.provider.DocumentsContract; import android.provider.DocumentsContract.Document; import android.support.design.widget.Snackbar; import android.util.Log; import android.view.KeyEvent; import android.view.LayoutInflater; Loading @@ -39,7 +40,6 @@ import android.view.View; import android.widget.EditText; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; import android.widget.Toast; import com.android.documentsui.model.DocumentInfo; Loading Loading @@ -147,7 +147,7 @@ public class CreateDirectoryFragment extends DialogFragment { // Navigate into newly created child mActivity.onDirectoryCreated(result); } else { Toast.makeText(mActivity, R.string.create_error, Toast.LENGTH_SHORT).show(); Shared.makeSnackbar(mActivity, R.string.create_error, Snackbar.LENGTH_SHORT).show(); } mActivity.setPending(false); Loading Loading
packages/DocumentsUI/res/layout/drawer_layout.xml +61 −52 Original line number Diff line number Diff line Loading @@ -14,7 +14,15 @@ limitations under the License. --> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <!-- CoordinatorLayout is necessary for various components (e.g. Snackbars, and floating action buttons) to operate correctly. --> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout"> <android.support.v4.widget.DrawerLayout android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"> Loading Loading @@ -73,3 +81,4 @@ </LinearLayout> </android.support.v4.widget.DrawerLayout> </android.support.design.widget.CoordinatorLayout>
packages/DocumentsUI/res/layout/fixed_layout.xml +48 −38 Original line number Diff line number Diff line Loading @@ -14,7 +14,15 @@ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <!-- CoordinatorLayout is necessary for various components (e.g. Snackbars, and floating action buttons) to operate correctly. --> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> Loading Loading @@ -60,3 +68,5 @@ </LinearLayout> </LinearLayout> </android.support.design.widget.CoordinatorLayout>
packages/DocumentsUI/res/layout/single_pane_layout.xml +28 −18 Original line number Diff line number Diff line Loading @@ -14,7 +14,15 @@ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <!-- CoordinatorLayout is necessary for various components (e.g. Snackbars, and floating action buttons) to operate correctly. --> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> Loading @@ -40,3 +48,5 @@ <include layout="@layout/directory_cluster"/> </LinearLayout> </android.support.design.widget.CoordinatorLayout>
packages/DocumentsUI/src/com/android/documentsui/CopyService.java +8 −6 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static com.android.documentsui.Shared.DEBUG; import static com.android.documentsui.model.DocumentInfo.getCursorLong; import static com.android.documentsui.model.DocumentInfo.getCursorString; import android.app.Activity; import android.app.IntentService; import android.app.Notification; import android.app.NotificationManager; Loading @@ -37,6 +38,7 @@ import android.os.RemoteException; import android.os.SystemClock; import android.provider.DocumentsContract; import android.provider.DocumentsContract.Document; import android.support.design.widget.Snackbar; import android.text.format.DateUtils; import android.util.Log; import android.widget.Toast; Loading Loading @@ -107,10 +109,10 @@ public class CopyService extends IntentService { * @param srcDocs A list of src files to copy. * @param dstStack The copy destination stack. */ public static void start(Context context, List<DocumentInfo> srcDocs, DocumentStack dstStack, public static void start(Activity activity, List<DocumentInfo> srcDocs, DocumentStack dstStack, int mode) { final Resources res = context.getResources(); final Intent copyIntent = new Intent(context, CopyService.class); final Resources res = activity.getResources(); final Intent copyIntent = new Intent(activity, CopyService.class); copyIntent.putParcelableArrayListExtra( EXTRA_SRC_LIST, new ArrayList<DocumentInfo>(srcDocs)); copyIntent.putExtra(EXTRA_STACK, (Parcelable) dstStack); Loading @@ -118,10 +120,10 @@ public class CopyService extends IntentService { int toastMessage = (mode == TRANSFER_MODE_COPY) ? R.plurals.copy_begin : R.plurals.move_begin; Toast.makeText(context, Shared.makeSnackbar(activity, res.getQuantityString(toastMessage, srcDocs.size(), srcDocs.size()), Toast.LENGTH_SHORT).show(); context.startService(copyIntent); Snackbar.LENGTH_SHORT).show(); activity.startService(copyIntent); } @Override Loading
packages/DocumentsUI/src/com/android/documentsui/CreateDirectoryFragment.java +2 −2 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.provider.DocumentsContract; import android.provider.DocumentsContract.Document; import android.support.design.widget.Snackbar; import android.util.Log; import android.view.KeyEvent; import android.view.LayoutInflater; Loading @@ -39,7 +40,6 @@ import android.view.View; import android.widget.EditText; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; import android.widget.Toast; import com.android.documentsui.model.DocumentInfo; Loading Loading @@ -147,7 +147,7 @@ public class CreateDirectoryFragment extends DialogFragment { // Navigate into newly created child mActivity.onDirectoryCreated(result); } else { Toast.makeText(mActivity, R.string.create_error, Toast.LENGTH_SHORT).show(); Shared.makeSnackbar(mActivity, R.string.create_error, Snackbar.LENGTH_SHORT).show(); } mActivity.setPending(false); Loading