mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-02-19 20:31:49 -05:00
ServersActivity: Make list accessible via property and replace calls to getListView()
This commit is contained in:
parent
7411db41f9
commit
c818458a97
@ -63,6 +63,7 @@ public class ServersActivity extends ListActivity implements ServiceConnection,
|
|||||||
private IRCBinder binder;
|
private IRCBinder binder;
|
||||||
private ServerReceiver receiver;
|
private ServerReceiver receiver;
|
||||||
private ServerListAdapter adapter;
|
private ServerListAdapter adapter;
|
||||||
|
private ListView list;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On create
|
* On create
|
||||||
@ -76,8 +77,9 @@ public class ServersActivity extends ListActivity implements ServiceConnection,
|
|||||||
adapter = new ServerListAdapter();
|
adapter = new ServerListAdapter();
|
||||||
setListAdapter(adapter);
|
setListAdapter(adapter);
|
||||||
|
|
||||||
getListView().setOnItemLongClickListener(this);
|
list = getListView();
|
||||||
getListView().setBackgroundDrawable(new NonScalingBackgroundDrawable(this, getListView(), R.drawable.background));
|
list.setOnItemLongClickListener(this);
|
||||||
|
list.setBackgroundDrawable(new NonScalingBackgroundDrawable(this, list, R.drawable.background));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -308,7 +310,7 @@ public class ServersActivity extends ListActivity implements ServiceConnection,
|
|||||||
|
|
||||||
if (!adapter.isEmpty()) {
|
if (!adapter.isEmpty()) {
|
||||||
// Hide background if there are servers in the list
|
// Hide background if there are servers in the list
|
||||||
getListView().setBackgroundDrawable(null);
|
list.setBackgroundDrawable(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user