<activity
android:name=".ui.activity.FileDisplayActivity"
android:label="@string/app_name"
- android:configChanges="orientation|screenSize"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.content.SyncRequest;
-import android.content.res.Configuration;
import android.content.res.Resources.NotFoundException;
import android.database.Cursor;
import android.net.Uri;
// In case file list is empty
message = R.string.file_list_empty;
}
- ocFileListFragment.setMessageforEmptyView(message);
+ ocFileListFragment.setMessageforEmptyView(getString(message));
} else {
Log.e(TAG, "OCFileListFragment is null");
}
}
onTransferStateChanged(file, false, false);
}
-
- @Override
- public void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
- }
}
/**
* Set message for empty list view
*/
- public void setMessageforEmptyView(int message) {
+ public void setMessageforEmptyView(String message) {
if (mEmptyListMessage != null) {
mEmptyListMessage.setText(message);
}
}
-
+
+ /**
+ * Get the text of EmptyListMessage TextView
+ *
+ * @return String
+ */
+ public String getEmptyViewText() {
+ return (mEmptyListMessage != null) ? mEmptyListMessage.getText().toString() : "";
+ }
}
View v = super.onCreateView(inflater, container, savedInstanceState);
getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
disableSwipe(); // Disable pull refresh
- setMessageforEmptyView(R.string.local_file_list_empty);
+ setMessageforEmptyView(getString(R.string.local_file_list_empty));
Log_OC.i(TAG, "onCreateView() end");
return v;
}
private static final String KEY_FIRST_POSITIONS= "FIRST_POSITIONS";
private static final String KEY_TOPS = "TOPS";
private static final String KEY_HEIGHT_CELL = "HEIGHT_CELL";
+ private static final String KEY_EMPTY_LIST_MESSAGE = "EMPTY_LIST_MESSAGE";
private FileFragment.ContainerActivity mContainerActivity;
mFirstPositions = savedInstanceState.getIntegerArrayList(KEY_FIRST_POSITIONS);
mTops = savedInstanceState.getIntegerArrayList(KEY_TOPS);
mHeightCell = savedInstanceState.getInt(KEY_HEIGHT_CELL);
+ setMessageforEmptyView(savedInstanceState.getString(KEY_EMPTY_LIST_MESSAGE));
} else {
mIndexes = new ArrayList<Integer>();
outState.putIntegerArrayList(KEY_FIRST_POSITIONS, mFirstPositions);
outState.putIntegerArrayList(KEY_TOPS, mTops);
outState.putInt(KEY_HEIGHT_CELL, mHeightCell);
+ outState.putString(KEY_EMPTY_LIST_MESSAGE, getEmptyViewText());
}
/**