use different workaround for swipe2refresh in layout rather than code
This commit is contained in:
parent
cb43edc0fc
commit
f9c83b3353
2 changed files with 21 additions and 31 deletions
|
@ -74,9 +74,6 @@ public class TicketListActivity extends ActionBarActivity {
|
|||
@InjectView(R.id.list_swiperefresh_layout)
|
||||
SwipeRefreshLayout listSwipeRefreshLayout;
|
||||
|
||||
@InjectView(R.id.empty_swiperefresh_layout)
|
||||
SwipeRefreshLayout emptySwipeRefreshLayout;
|
||||
|
||||
private ActionMode actionMode;
|
||||
|
||||
@Subscribe
|
||||
|
@ -117,7 +114,7 @@ public class TicketListActivity extends ActionBarActivity {
|
|||
passAdapter = new PassAdapter(this);
|
||||
listView.setAdapter(passAdapter);
|
||||
|
||||
listView.setEmptyView(emptySwipeRefreshLayout);
|
||||
listView.setEmptyView(emptyView);
|
||||
|
||||
// don't want too many windows in worst case - so check for errors first
|
||||
if (TraceDroid.getStackTraceFiles().length > 0) {
|
||||
|
@ -193,8 +190,6 @@ public class TicketListActivity extends ActionBarActivity {
|
|||
});
|
||||
|
||||
prepareRefreshLayout(listSwipeRefreshLayout);
|
||||
prepareRefreshLayout(emptySwipeRefreshLayout);
|
||||
|
||||
}
|
||||
|
||||
private void prepareRefreshLayout(SwipeRefreshLayout swipeRefreshLayout) {
|
||||
|
@ -276,7 +271,6 @@ public class TicketListActivity extends ActionBarActivity {
|
|||
public void updateUIToScanningState() {
|
||||
|
||||
listSwipeRefreshLayout.setRefreshing(scanning);
|
||||
emptySwipeRefreshLayout.setRefreshing(scanning);
|
||||
|
||||
supportInvalidateOptionsMenu();
|
||||
|
||||
|
|
|
@ -9,40 +9,36 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:id="@+id/list_swiperefresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/content_list"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@null"
|
||||
android:listSelector="@android:color/transparent"></ListView>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/content_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@null"
|
||||
android:listSelector="@android:color/transparent"></ListView>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/emptyView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="7dp"
|
||||
android:text="test"
|
||||
android:textAppearance="?android:textAppearanceLarge" />
|
||||
</FrameLayout>
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:id="@+id/empty_swiperefresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/emptyView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="7dp"
|
||||
android:text="test"
|
||||
android:textAppearance="?android:textAppearanceLarge" />
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue