mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-02-16 15:00:14 -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 ServerReceiver receiver;
|
||||
private ServerListAdapter adapter;
|
||||
private ListView list;
|
||||
|
||||
/**
|
||||
* On create
|
||||
@ -76,8 +77,9 @@ public class ServersActivity extends ListActivity implements ServiceConnection,
|
||||
adapter = new ServerListAdapter();
|
||||
setListAdapter(adapter);
|
||||
|
||||
getListView().setOnItemLongClickListener(this);
|
||||
getListView().setBackgroundDrawable(new NonScalingBackgroundDrawable(this, getListView(), R.drawable.background));
|
||||
list = getListView();
|
||||
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()) {
|
||||
// Hide background if there are servers in the list
|
||||
getListView().setBackgroundDrawable(null);
|
||||
list.setBackgroundDrawable(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user