소스 검색

Changes after CR

jabarros 10 년 전
부모
커밋
ac18a468e8

+ 1 - 9
res/layout/list_fragment.xml

@@ -44,23 +44,15 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent" >
 
-            <LinearLayout
-		        android:id="@+id/linearLayout1"
-		        android:layout_width="match_parent"
-		        android:layout_height="wrap_content"
-		        android:orientation="vertical"
-		        android:layout_gravity="center"
-		        android:gravity="center">
-
 	            <TextView
 			        android:id="@+id/empty_list_view"
 			        android:layout_width="match_parent"
 			        android:layout_height="wrap_content"
 			        android:gravity="center_vertical|center_horizontal"
 			        android:text="@string/empty"
+					android:layout_gravity="center"
 			        android:visibility="visible" />
 
-            </LinearLayout>
         </ScrollView>
     </android.support.v4.widget.SwipeRefreshLayout>
 </FrameLayout>

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

@@ -196,7 +196,7 @@ FileFragment.ContainerActivity, OnNavigationListener, OnSslUntrustedCertListener
         getSupportActionBar().setHomeButtonEnabled(true);       // mandatory since Android ICS, according to the official documentation
         setSupportProgressBarIndeterminateVisibility(mSyncInProgress /*|| mRefreshSharesInProgress*/);    // always AFTER setContentView(...) ; to work around bug in its implementation
         
-        showMessageView();
+        setBackgroundText();
 
         Log_OC.d(TAG, "onCreate() end");
     }
@@ -963,7 +963,7 @@ FileFragment.ContainerActivity, OnNavigationListener, OnSslUntrustedCertListener
                     Log_OC.d(TAG, "Setting progress visibility to " + mSyncInProgress);
                     setSupportProgressBarIndeterminateVisibility(mSyncInProgress /*|| mRefreshSharesInProgress*/);
 
-                    showMessageView();
+                    setBackgroundText();
                         
                 }
                 
@@ -984,7 +984,7 @@ FileFragment.ContainerActivity, OnNavigationListener, OnSslUntrustedCertListener
      * Show a text message on screen view for notifying user if content is
      * loading or folder is empty
      */
-    private void showMessageView() {
+    private void setBackgroundText() {
         OCFileListFragment ocFileListFragment = getListOfFilesFragment();
         if (ocFileListFragment != null) {
             int message = R.string.file_list_loading;
@@ -992,7 +992,7 @@ FileFragment.ContainerActivity, OnNavigationListener, OnSslUntrustedCertListener
                 // In case file list is empty
                 message = R.string.file_list_empty;
             }
-            ocFileListFragment.setMessageforEmptyView(getString(message));
+            ocFileListFragment.setMessageForEmptyList(getString(message));
         } else {
             Log.e(TAG, "OCFileListFragment is null");
         }
@@ -1551,7 +1551,7 @@ FileFragment.ContainerActivity, OnNavigationListener, OnSslUntrustedCertListener
         
         setSupportProgressBarIndeterminateVisibility(true);
 
-        showMessageView();
+        setBackgroundText();
     }
 
     /**

+ 1 - 1
src/com/owncloud/android/ui/fragment/ExtendedListFragment.java

@@ -170,7 +170,7 @@ public class ExtendedListFragment extends SherlockFragment implements OnItemClic
     /**
      * Set message for empty list view
      */
-    public void setMessageforEmptyView(String message) {
+    public void setMessageForEmptyList(String message) {
         if (mEmptyListMessage != null) {
             mEmptyListMessage.setText(message);
         }

+ 1 - 1
src/com/owncloud/android/ui/fragment/LocalFileListFragment.java

@@ -77,7 +77,7 @@ public class LocalFileListFragment extends ExtendedListFragment {
         View v = super.onCreateView(inflater, container, savedInstanceState);
         getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
         disableSwipe(); // Disable pull refresh
-        setMessageforEmptyView(getString(R.string.local_file_list_empty));
+        setMessageForEmptyList(getString(R.string.local_file_list_empty));
         Log_OC.i(TAG, "onCreateView() end");
         return v;
     }    

+ 1 - 1
src/com/owncloud/android/ui/fragment/OCFileListFragment.java

@@ -116,7 +116,7 @@ public class OCFileListFragment extends ExtendedListFragment {
             mFirstPositions = savedInstanceState.getIntegerArrayList(KEY_FIRST_POSITIONS);
             mTops = savedInstanceState.getIntegerArrayList(KEY_TOPS);
             mHeightCell = savedInstanceState.getInt(KEY_HEIGHT_CELL);
-            setMessageforEmptyView(savedInstanceState.getString(KEY_EMPTY_LIST_MESSAGE));
+            setMessageForEmptyList(savedInstanceState.getString(KEY_EMPTY_LIST_MESSAGE));
             
         } else {
             mIndexes = new ArrayList<Integer>();