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>
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");
}
Log_OC.d(TAG, "Setting progress visibility to " + mSyncInProgress);
setSupportProgressBarIndeterminateVisibility(mSyncInProgress /*|| mRefreshSharesInProgress*/);
- showMessageView();
+ setBackgroundText();
}
* 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;
// 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");
}
setSupportProgressBarIndeterminateVisibility(true);
- showMessageView();
+ setBackgroundText();
}
/**
/**
* Set message for empty list view
*/
- public void setMessageforEmptyView(String message) {
+ public void setMessageForEmptyList(String message) {
if (mEmptyListMessage != null) {
mEmptyListMessage.setText(message);
}
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;
}
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>();