Ver Fonte

Minor CR changes

AndyScherzinger há 6 anos atrás
pai
commit
de4c27aa2e

+ 1 - 1
src/main/java/com/owncloud/android/operations/RestoreFileVersionOperation.java

@@ -89,4 +89,4 @@ public class RestoreFileVersionOperation extends SyncOperation {
     private boolean isSuccess(int status) {
         return status == HttpStatus.SC_CREATED || status == HttpStatus.SC_NO_CONTENT;
     }
-}
+}

+ 6 - 6
src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -590,7 +590,7 @@ public class FileDisplayActivity extends HookActivity
     /**
      * Replaces the second fragment managed by the activity with the received as
      * a parameter.
-     * <p/>
+     *
      * Assumes never will be more than two fragments managed at the same time.
      *
      * @param fragment New second Fragment to set.
@@ -1465,7 +1465,7 @@ public class FileDisplayActivity extends HookActivity
 
     /**
      * Class waiting for broadcast events from the {@link FileDownloader} service.
-     * <p/>
+     *
      * Updates the UI when a download is started or finished, provided that it is relevant for the
      * current folder.
      */
@@ -2113,9 +2113,9 @@ public class FileDisplayActivity extends HookActivity
 
     /**
      * Starts an operation to refresh the requested folder.
-     * <p/>
+     *
      * The operation is run in a new background thread created on the fly.
-     * <p/>
+     *
      * The refresh updates is a "light sync": properties of regular files in folder are updated (including
      * associated shares), but not their contents. Only the contents of files marked to be kept-in-sync are
      * synchronized too.
@@ -2130,9 +2130,9 @@ public class FileDisplayActivity extends HookActivity
 
     /**
      * Starts an operation to refresh the requested folder.
-     * <p/>
+     *
      * The operation is run in a new background thread created on the fly.
-     * <p/>
+     *
      * The refresh updates is a "light sync": properties of regular files in folder are updated (including
      * associated shares), but not their contents. Only the contents of files marked to be kept-in-sync are
      * synchronized too.

+ 3 - 3
src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java

@@ -28,7 +28,6 @@ import android.content.Context;
 import android.graphics.PorterDuff;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
-import android.support.design.widget.Snackbar;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentActivity;
 import android.support.v4.widget.SwipeRefreshLayout;
@@ -64,6 +63,7 @@ import com.owncloud.android.ui.adapter.ActivityAndVersionListAdapter;
 import com.owncloud.android.ui.helpers.FileOperationsHelper;
 import com.owncloud.android.ui.interfaces.ActivityListInterface;
 import com.owncloud.android.ui.interfaces.VersionListInterface;
+import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.utils.ThemeUtils;
 
 import java.io.IOException;
@@ -388,13 +388,13 @@ public class FileDetailActivitiesFragment extends Fragment implements ActivityLi
 
     @Override
     public void onSuccess(String message) {
-        Snackbar.make(recyclerView, message, Snackbar.LENGTH_LONG).show();
+        DisplayUtils.showSnackMessage(recyclerView, message);
         fetchAndSetData(null);
     }
 
     @Override
     public void onError(String message) {
-        Snackbar.make(recyclerView, message, Snackbar.LENGTH_LONG).show();
+        DisplayUtils.showSnackMessage(recyclerView, message);
     }
 
     @Override

+ 10 - 0
src/main/java/com/owncloud/android/utils/DisplayUtils.java

@@ -696,6 +696,16 @@ public class DisplayUtils {
         Snackbar.make(view, messageResource, Snackbar.LENGTH_LONG).show();
     }
 
+    /**
+     * Show a temporary message in a {@link Snackbar} bound to the given view.
+     *
+     * @param view    The view the {@link Snackbar} is bound to.
+     * @param message The message.
+     */
+    public static void showSnackMessage(View view, String message) {
+        Snackbar.make(view, message, Snackbar.LENGTH_LONG).show();
+    }
+
     /**
      * create a temporary message in a {@link Snackbar} bound to the given view.
      *

+ 1 - 1
src/main/res/drawable/ic_history.xml

@@ -8,4 +8,4 @@
     <path
         android:fillColor="#000000"
         android:pathData="M9.025 1.08c-3.95 0-6.535 3.447-6.364 6.72h-2.161l3.904 3.92 4.08-3.874h-2.147c-0.237-1.7 1.163-3.114 2.689-3.092 1.595 0.024 2.8 1.23 2.8 2.734 0.09 1.594-1.63 3.428-3.966 2.53 0 1.23 0.003 2.545 0 3.765 4.19 0.83 7.64-2.51 7.64-6.25 0-3.563-2.92-6.453-6.475-6.453z"/>
-</vector>
+</vector>

+ 3 - 1
src/main/res/layout/version_list_item.xml

@@ -22,6 +22,7 @@
 
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="horizontal"
@@ -81,7 +82,8 @@
         android:layout_gravity="end"
         android:layout_weight="1"
         android:ellipsize="end"
-        android:text="@string/placeholder_sentence"
+        android:textAlignment="textEnd"
+        tools:text="13:24"
         android:textColor="?android:attr/textColorSecondary"/>
 
 </LinearLayout>