We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 49216b6f authored by Mike Sheldon's avatar Mike Sheldon

Allow users to add custom tag stations to Libre Droid

parent dd906ab9
......@@ -203,6 +203,12 @@ public class LibreDroid extends ListActivity {
LibreDroid.this.libreServiceConn.service.ban();
}
});
final Button addStationButton = (Button) findViewById(R.id.addStationButton);
addStationButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
LibreDroid.this.addStation();
}
});
}
@Override
......@@ -240,6 +246,13 @@ public class LibreDroid extends ListActivity {
albumImage.setImageResource(R.drawable.album);
}
}
public void addStation() {
final EditText stationEntry = (EditText) findViewById(R.id.stationEntry);
stations.add(0, stationEntry.getText().toString());
setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, stations));
this.prevPage();
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment