projects
/
pub
/
Android
/
ownCloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d90b10d
)
Save message in onSaveInstanceState when folder is empty for allowing that it disappe...
author
jabarros
<jabarros@solidgear.es>
Mon, 28 Jul 2014 11:06:29 +0000
(13:06 +0200)
committer
jabarros
<jabarros@solidgear.es>
Mon, 28 Jul 2014 11:06:29 +0000
(13:06 +0200)
AndroidManifest.xml
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/fragment/LocalFileListFragment.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
patch
|
blob
|
blame
|
history
diff --git
a/AndroidManifest.xml
b/AndroidManifest.xml
index
b14ea56
..
5a86dcf
100644
(file)
--- a/
AndroidManifest.xml
+++ b/
AndroidManifest.xml
@@
-51,7
+51,6
@@
<activity
android:name=".ui.activity.FileDisplayActivity"
android:label="@string/app_name"
<activity
android:name=".ui.activity.FileDisplayActivity"
android:label="@string/app_name"
- android:configChanges="orientation|screenSize"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git
a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
index
03aca99
..
991ea30
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
@@
-38,7
+38,6
@@
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.content.SyncRequest;
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;
import android.content.res.Resources.NotFoundException;
import android.database.Cursor;
import android.net.Uri;
@@
-993,7
+992,7
@@
FileFragment.ContainerActivity, OnNavigationListener, OnSslUntrustedCertListener
// In case file list is empty
message = R.string.file_list_empty;
}
// 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");
}
} else {
Log.e(TAG, "OCFileListFragment is null");
}
@@
-1654,10
+1653,5
@@
FileFragment.ContainerActivity, OnNavigationListener, OnSslUntrustedCertListener
}
onTransferStateChanged(file, false, false);
}
}
onTransferStateChanged(file, false, false);
}
-
- @Override
- public void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
- }
}
}
diff --git
a/src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
b/src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
index
5cb737b
..
917f7a5
100644
(file)
--- a/
src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
+++ b/
src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
@@
-167,11
+167,19
@@
public class ExtendedListFragment extends SherlockFragment implements OnItemClic
/**
* Set message for empty list view
*/
/**
* Set message for empty list view
*/
- public void setMessageforEmptyView(
int
message) {
+ public void setMessageforEmptyView(
String
message) {
if (mEmptyListMessage != null) {
mEmptyListMessage.setText(message);
}
}
if (mEmptyListMessage != null) {
mEmptyListMessage.setText(message);
}
}
-
+
+ /**
+ * Get the text of EmptyListMessage TextView
+ *
+ * @return String
+ */
+ public String getEmptyViewText() {
+ return (mEmptyListMessage != null) ? mEmptyListMessage.getText().toString() : "";
+ }
}
}
diff --git
a/src/com/owncloud/android/ui/fragment/LocalFileListFragment.java
b/src/com/owncloud/android/ui/fragment/LocalFileListFragment.java
index
9e21272
..
00aac24
100644
(file)
--- a/
src/com/owncloud/android/ui/fragment/LocalFileListFragment.java
+++ b/
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
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;
}
Log_OC.i(TAG, "onCreateView() end");
return v;
}
diff --git
a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java
b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java
index
ebe9a91
..
77f50cd
100644
(file)
--- a/
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
+++ b/
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
@@
-62,6
+62,7
@@
public class OCFileListFragment extends ExtendedListFragment {
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_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;
private FileFragment.ContainerActivity mContainerActivity;
@@
-115,6
+116,7
@@
public class OCFileListFragment extends ExtendedListFragment {
mFirstPositions = savedInstanceState.getIntegerArrayList(KEY_FIRST_POSITIONS);
mTops = savedInstanceState.getIntegerArrayList(KEY_TOPS);
mHeightCell = savedInstanceState.getInt(KEY_HEIGHT_CELL);
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>();
} else {
mIndexes = new ArrayList<Integer>();
@@
-143,6
+145,7
@@
public class OCFileListFragment extends ExtendedListFragment {
outState.putIntegerArrayList(KEY_FIRST_POSITIONS, mFirstPositions);
outState.putIntegerArrayList(KEY_TOPS, mTops);
outState.putInt(KEY_HEIGHT_CELL, mHeightCell);
outState.putIntegerArrayList(KEY_FIRST_POSITIONS, mFirstPositions);
outState.putIntegerArrayList(KEY_TOPS, mTops);
outState.putInt(KEY_HEIGHT_CELL, mHeightCell);
+ outState.putString(KEY_EMPTY_LIST_MESSAGE, getEmptyViewText());
}
/**
}
/**