Browse Source

code review: fixed minor layout optimizations, set generic preference methods to private visibility

Andy Scherzinger 8 years ago
parent
commit
68849c7305

+ 1 - 1
owncloud-android-library

@@ -1 +1 @@
-Subproject commit 954f69de990fe1c54bd29a23e52f12e5f41f1c71
+Subproject commit 48f35c14b4a1ce82c9e09c37aaa918bbfbb98315

+ 2 - 2
res/layout/uploader_layout.xml

@@ -25,8 +25,8 @@
 	android:gravity="center">
 
 	<FrameLayout
-		android:layout_height="fill_parent"
-		android:layout_width="fill_parent"
+		android:layout_height="match_parent"
+		android:layout_width="match_parent"
 		android:id="@+id/upload_list"
 		android:layout_above="@+id/upload_actions">
 

+ 8 - 15
res/layout/uploader_list_item_layout.xml

@@ -18,25 +18,18 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
+    android:layout_width="match_parent"
     android:layout_height="56dp"
     android:background="@drawable/list_selector"
     android:orientation="horizontal">
 
-    <LinearLayout
-        android:layout_width="56dp"
-        android:layout_height="56dp"
-        android:orientation="horizontal">
-
-        <ImageView
-            android:id="@+id/thumbnail"
-            android:layout_width="@dimen/file_icon_size"
-            android:layout_height="@dimen/file_icon_size"
-            android:layout_gravity="center_vertical"
-            android:layout_marginLeft="12dp"
-            android:src="@drawable/ic_menu_archive" />
-
-    </LinearLayout>
+    <ImageView
+        android:id="@+id/thumbnail"
+        android:layout_width="@dimen/file_icon_size"
+        android:layout_height="@dimen/file_icon_size"
+        android:layout_gravity="center_vertical"
+        android:layout_margin="12dp"
+        android:src="@drawable/ic_menu_archive" />
 
     <LinearLayout
         android:layout_width="0dp"

+ 3 - 3
src/com/owncloud/android/db/PreferenceManager.java

@@ -117,19 +117,19 @@ public abstract class PreferenceManager {
         saveBooleanPreference(AUTO_PREF__SORT_ASCENDING, ascending, context);
     }
 
-    public static void saveBooleanPreference(String key, boolean value, Context context) {
+    private static void saveBooleanPreference(String key, boolean value, Context context) {
         SharedPreferences.Editor appPreferences = getDefaultSharedPreferences(context.getApplicationContext()).edit();
         appPreferences.putBoolean(key, value);
         appPreferences.apply();
     }
 
-    public static void saveStringPreference(String key, String value, Context context) {
+    private static void saveStringPreference(String key, String value, Context context) {
         SharedPreferences.Editor appPreferences = getDefaultSharedPreferences(context.getApplicationContext()).edit();
         appPreferences.putString(key, value);
         appPreferences.apply();
     }
 
-    public static void saveIntPreference(String key, int value, Context context) {
+    private static void saveIntPreference(String key, int value, Context context) {
         SharedPreferences.Editor appPreferences = getDefaultSharedPreferences(context.getApplicationContext()).edit();
         appPreferences.putInt(key, value);
         appPreferences.apply();