Commit d85844d5 authored by Mike Sheldon's avatar Mike Sheldon

Add custom station creation page to Libre Droid (doesn't do anything yet)

parent fa4759ed
......@@ -27,36 +27,42 @@ public final class R {
}
public static final class id {
public static final int ImageView01=0x7f050004;
public static final int ImageView05=0x7f050015;
public static final int LinearLayout01=0x7f050000;
public static final int LinearLayout02=0x7f050013;
public static final int ScrollView01=0x7f050002;
public static final int ScrollView02=0x7f05000e;
public static final int ScrollView03=0x7f050014;
public static final int ScrollView03=0x7f05001a;
public static final int StationLayout=0x7f05000f;
public static final int TableLayout02=0x7f050015;
public static final int TableLayout01=0x7f050014;
public static final int TableLayout02=0x7f05001b;
public static final int TableLayout03=0x7f050003;
public static final int TableRow02=0x7f05001a;
public static final int TableRow02=0x7f050020;
public static final int TextView02=0x7f050007;
public static final int TextView03=0x7f050009;
public static final int TextView04=0x7f05000d;
public static final int TextView05=0x7f05000c;
public static final int TextView06=0x7f050005;
public static final int TextView07=0x7f050006;
public static final int albumImage=0x7f050017;
public static final int artistText=0x7f050019;
public static final int banButton=0x7f05001b;
public static final int TextView08=0x7f050016;
public static final int TextView09=0x7f050018;
public static final int addStationButton=0x7f050019;
public static final int albumImage=0x7f05001d;
public static final int artistText=0x7f05001f;
public static final int banButton=0x7f050021;
public static final int communityStationButton=0x7f050012;
public static final int loginButton=0x7f05000b;
public static final int loveButton=0x7f050020;
public static final int loveButton=0x7f050026;
public static final int loveStationButton=0x7f050011;
public static final int nextButton=0x7f05001e;
public static final int nextButton=0x7f050024;
public static final int passwordEntry=0x7f05000a;
public static final int playPauseButton=0x7f05001d;
public static final int prevButton=0x7f05001c;
public static final int saveButton=0x7f05001f;
public static final int stationNameText=0x7f050016;
public static final int playPauseButton=0x7f050023;
public static final int prevButton=0x7f050022;
public static final int saveButton=0x7f050025;
public static final int stationEntry=0x7f050017;
public static final int stationNameText=0x7f05001c;
public static final int tagStationButton=0x7f050010;
public static final int titleText=0x7f050018;
public static final int titleText=0x7f05001e;
public static final int usernameEntry=0x7f050008;
public static final int viewAnimator=0x7f050001;
}
......
......@@ -25,6 +25,14 @@
<ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</LinearLayout>
<TableLayout android:id="@+id/TableLayout01" android:layout_height="wrap_content" android:layout_width="fill_parent">
<ImageView android:id="@+id/ImageView05" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_marginTop="10px" android:src="@drawable/logo"></ImageView>
<TextView android:id="@+id/TextView08" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Station tagged with:" android:textStyle="bold" android:layout_marginTop="10px" android:layout_marginBottom="0px"></TextView>
<EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/stationEntry" android:singleLine="true"></EditText>
<TextView android:id="@+id/TextView09" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Examples: acoustic, female vocals, german, piano, violin, french, etc." android:layout_marginBottom="10px"></TextView>
<Button android:layout_width="wrap_content" android:id="@+id/addStationButton" android:text="Add Station" android:layout_height="wrap_content"></Button>
</TableLayout>
<ScrollView android:id="@+id/ScrollView03" android:layout_height="fill_parent" android:layout_width="fill_parent">
<TableLayout android:id="@+id/TableLayout02" android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="center_horizontal" android:layout_gravity="center_horizontal"><ImageView android:id="@+id/ImageView01" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_marginTop="10px" android:src="@drawable/logo"></ImageView><TextView android:layout_height="wrap_content" android:id="@+id/stationNameText" android:textStyle="bold" android:layout_gravity="center_horizontal" android:layout_width="fill_parent" android:gravity="center_horizontal"></TextView><ImageView android:layout_height="wrap_content" android:id="@+id/albumImage" android:src="@drawable/album" android:layout_width="fill_parent" android:layout_marginTop="10px"></ImageView><TextView android:layout_height="wrap_content" android:id="@+id/titleText" style="bold" android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_gravity="center_horizontal" android:layout_marginTop="5px" android:textSize="7pt" android:maxLines="2"></TextView><TextView android:layout_height="wrap_content" android:id="@+id/artistText" android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_gravity="center_horizontal" android:maxLines="2"></TextView>
<TableRow android:id="@+id/TableRow02" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_marginTop="10px" android:layout_gravity="center_horizontal" android:gravity="center_horizontal">
......
......@@ -136,6 +136,7 @@ public class LibreDroid extends ListActivity {
LibreDroid.this.libreServiceConn.service.tuneStation("user", username + "/loved");
LibreDroid.this.nextPage();
LibreDroid.this.nextPage();
LibreDroid.this.nextPage();
}
});
......@@ -145,6 +146,7 @@ public class LibreDroid extends ListActivity {
LibreDroid.this.libreServiceConn.service.tuneStation("community", "loved");
LibreDroid.this.nextPage();
LibreDroid.this.nextPage();
LibreDroid.this.nextPage();
}
});
......@@ -196,10 +198,11 @@ public class LibreDroid extends ListActivity {
super.onListItemClick(l, v, pos, id);
String selection = l.getItemAtPosition(pos).toString();
if(selection.equals("Add A Custom Station...")) {
LibreDroid.this.nextPage();
} else {
LibreDroid.this.libreServiceConn.service.tuneStation("globaltags", selection);
LibreDroid.this.nextPage();
LibreDroid.this.nextPage();
}
}
......@@ -225,8 +228,9 @@ public class LibreDroid extends ListActivity {
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK)) {
if (this.libreServiceConn.service.getCurrentPage() > 0) {
if(this.libreServiceConn.service.getCurrentPage() == 3) {
// Back two pages if we're on the player page to get back to the main menu
if(this.libreServiceConn.service.getCurrentPage() == 4) {
// Back three pages if we're on the player page to get back to the main menu
this.prevPage();
this.prevPage();
}
this.prevPage();
......
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