diff options
-rw-r--r-- | res/layout/abstract_list_fragment.xml | 47 | ||||
-rw-r--r-- | res/layout/chat.xml | 82 | ||||
-rw-r--r-- | res/layout/select_album.xml | 45 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/ChatFragment.java | 1 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 2 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectListFragment.java | 1 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 1 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/service/RESTMusicService.java | 1 |
8 files changed, 88 insertions, 92 deletions
diff --git a/res/layout/abstract_list_fragment.xml b/res/layout/abstract_list_fragment.xml index 3923f120..be3889ee 100644 --- a/res/layout/abstract_list_fragment.xml +++ b/res/layout/abstract_list_fragment.xml @@ -1,36 +1,35 @@ <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/fragment_list_layout"
+<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/refresh_layout"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
+ android:layout_height="fill_parent">
- <View
+ <LinearLayout
+ android:id="@+id/fragment_list_layout"
android:layout_width="fill_parent"
- android:layout_height="1px"
- android:background="@color/dividerColor"/>
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
- <include layout="@layout/tab_progress" />
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1px"
+ android:background="@color/dividerColor"/>
- <TextView
- android:id="@+id/fragment_list_empty"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:padding="10dip"
- android:text="@string/common.empty"
- android:visibility="gone" />
+ <include layout="@layout/tab_progress" />
- <android.support.v4.widget.SwipeRefreshLayout
- android:id="@+id/refresh_layout"
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1.0">
+ <TextView
+ android:id="@+id/fragment_list_empty"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="10dip"
+ android:text="@string/common.empty"
+ android:visibility="gone" />
<ListView
android:id="@+id/fragment_list"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1.0"
android:fastScrollEnabled="true"/>
-
- </android.support.v4.widget.SwipeRefreshLayout>
-</LinearLayout>
+ </LinearLayout>
+</android.support.v4.widget.SwipeRefreshLayout>
\ No newline at end of file diff --git a/res/layout/chat.xml b/res/layout/chat.xml index f2c1c3fd..a62cfa65 100644 --- a/res/layout/chat.xml +++ b/res/layout/chat.xml @@ -1,53 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/chat_layout" +<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/refresh_layout" android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" > + android:layout_height="fill_parent"> - <include layout="@layout/tab_progress" /> - - <android.support.v4.widget.SwipeRefreshLayout - android:id="@+id/refresh_layout" + <LinearLayout + android:id="@+id/chat_layout" android:layout_width="fill_parent" - android:layout_height="0dip" - android:layout_weight="1.0"> + android:layout_height="fill_parent" + android:orientation="vertical" > + + <include layout="@layout/tab_progress" /> <ListView android:id="@+id/chat_entries" android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_height="0dip" + android:layout_weight="1.0" android:textFilterEnabled="true" /> - </android.support.v4.widget.SwipeRefreshLayout> - - <LinearLayout - android:layout_height="4dip" - android:layout_width="fill_parent" - android:layout_marginTop="4dip"/> - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:gravity="bottom" > - - <EditText - android:id="@+id/chat_edittext" - android:layout_width="0dip" - android:layout_height="40dip" - android:layout_weight="1" - android:autoLink="all" - android:hint="@string/chat.send_a_message" - android:inputType="textEmailAddress|textMultiLine" - android:linksClickable="true" - android:paddingBottom="10dip" - android:paddingTop="10dip" /> - - <ImageButton - android:id="@+id/chat_send" - android:layout_width="60dip" - android:layout_height="40dip" - android:src="?attr/chat_send" /> + <LinearLayout + android:layout_height="4dip" + android:layout_width="fill_parent" + android:layout_marginTop="4dip"/> + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="bottom" > + + <EditText + android:id="@+id/chat_edittext" + android:layout_width="0dip" + android:layout_height="40dip" + android:layout_weight="1" + android:autoLink="all" + android:hint="@string/chat.send_a_message" + android:inputType="textEmailAddress|textMultiLine" + android:linksClickable="true" + android:paddingBottom="10dip" + android:paddingTop="10dip" /> + + <ImageButton + android:id="@+id/chat_send" + android:layout_width="60dip" + android:layout_height="40dip" + android:src="?attr/chat_send" /> + + </LinearLayout> </LinearLayout> -</LinearLayout>
\ No newline at end of file +</android.support.v4.widget.SwipeRefreshLayout>
\ No newline at end of file diff --git a/res/layout/select_album.xml b/res/layout/select_album.xml index 55747a18..9b1e36dd 100644 --- a/res/layout/select_album.xml +++ b/res/layout/select_album.xml @@ -1,38 +1,37 @@ <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/select_album_layout"
- android:orientation="vertical"
+<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/refresh_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
- <View
+ <LinearLayout
+ android:id="@+id/select_album_layout"
+ android:orientation="vertical"
android:layout_width="fill_parent"
- android:layout_height="1px"
- android:background="@color/dividerColor"/>
+ android:layout_height="fill_parent">
- <include layout="@layout/tab_progress"/>
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1px"
+ android:background="@color/dividerColor"/>
- <TextView
- android:id="@+id/select_album_empty"
- android:text="@string/select_album.empty"
- android:visibility="gone"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:padding="10dip"/>
+ <include layout="@layout/tab_progress"/>
- <android.support.v4.widget.SwipeRefreshLayout
- android:id="@+id/refresh_layout"
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1.0">
+ <TextView
+ android:id="@+id/select_album_empty"
+ android:text="@string/select_album.empty"
+ android:visibility="gone"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="10dip"/>
<com.mobeta.android.dslv.DragSortListView
style="@style/DragDropListView"
android:id="@+id/select_album_entries"
android:textFilterEnabled="true"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1.0"
android:fastScrollEnabled="true"/>
-
- </android.support.v4.widget.SwipeRefreshLayout>
-</LinearLayout>
\ No newline at end of file + </LinearLayout>
+</android.support.v4.widget.SwipeRefreshLayout>
\ No newline at end of file diff --git a/src/github/daneren2005/dsub/fragments/ChatFragment.java b/src/github/daneren2005/dsub/fragments/ChatFragment.java index a44221ee..1742a489 100644 --- a/src/github/daneren2005/dsub/fragments/ChatFragment.java +++ b/src/github/daneren2005/dsub/fragments/ChatFragment.java @@ -217,7 +217,6 @@ public class ChatFragment extends SubsonicFragment { ChatAdapter chatAdapter = new ChatAdapter(context, messageList);
chatListView.setAdapter(chatAdapter);
}
- refreshLayout.setRefreshing(false);
}
};
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index dc9c0e85..1ed4f185 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -606,8 +606,6 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter if (playAll && !restoredInstance) {
playAll(args.getBoolean(Constants.INTENT_EXTRA_NAME_SHUFFLE, false), false);
}
-
- refreshLayout.setRefreshing(false);
}
private void playNow(final boolean shuffle, final boolean append) {
diff --git a/src/github/daneren2005/dsub/fragments/SelectListFragment.java b/src/github/daneren2005/dsub/fragments/SelectListFragment.java index a568d65b..9657c66c 100644 --- a/src/github/daneren2005/dsub/fragments/SelectListFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectListFragment.java @@ -138,7 +138,6 @@ public abstract class SelectListFragment<T> extends SubsonicFragment implements listView.setAdapter(adapter = getAdapter(result));
listView.setVisibility(View.VISIBLE);
}
- refreshLayout.setRefreshing(false);
}
};
task.execute();
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 015aa1de..45ab87e5 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -407,6 +407,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR @Override
public void onRefresh() {
+ refreshLayout.setRefreshing(false);
refresh();
}
diff --git a/src/github/daneren2005/dsub/service/RESTMusicService.java b/src/github/daneren2005/dsub/service/RESTMusicService.java index 1f128ee8..404a6e23 100644 --- a/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -1300,6 +1300,7 @@ public class RESTMusicService implements MusicService { if (progressListener != null) { progressListener.updateProgress(R.string.service_connecting); } + Util.sleepQuietly(2000L); String url = getRestUrl(context, method); return getReaderForURL(context, url, requestParams, parameterNames, parameterValues, progressListener); |