Commit b66a8193 authored by Mike Sheldon's avatar Mike Sheldon

Make tag stations work in Libre Droid with the new list based selection method

parent 38290690
......@@ -28,34 +28,35 @@ public final class R {
public static final class id {
public static final int ImageView01=0x7f050004;
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=0x7f050013;
public static final int ScrollView03=0x7f050014;
public static final int StationLayout=0x7f05000f;
public static final int TableLayout02=0x7f050014;
public static final int TableLayout02=0x7f050015;
public static final int TableLayout03=0x7f050003;
public static final int TableRow02=0x7f050019;
public static final int TableRow02=0x7f05001a;
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=0x7f050016;
public static final int artistText=0x7f050018;
public static final int banButton=0x7f05001a;
public static final int albumImage=0x7f050017;
public static final int artistText=0x7f050019;
public static final int banButton=0x7f05001b;
public static final int communityStationButton=0x7f050012;
public static final int loginButton=0x7f05000b;
public static final int loveButton=0x7f05001f;
public static final int loveButton=0x7f050020;
public static final int loveStationButton=0x7f050011;
public static final int nextButton=0x7f05001d;
public static final int nextButton=0x7f05001e;
public static final int passwordEntry=0x7f05000a;
public static final int playPauseButton=0x7f05001c;
public static final int prevButton=0x7f05001b;
public static final int saveButton=0x7f05001e;
public static final int stationNameText=0x7f050015;
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 tagStationButton=0x7f050010;
public static final int titleText=0x7f050017;
public static final int titleText=0x7f050018;
public static final int usernameEntry=0x7f050008;
public static final int viewAnimator=0x7f050001;
}
......
......@@ -21,7 +21,9 @@
</TableLayout>
</ScrollView>
<ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
<LinearLayout android:id="@+id/LinearLayout02" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</LinearLayout>
<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>
......
......@@ -46,7 +46,6 @@ import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.params.CoreProtocolPNames;
import android.app.Activity;
import android.app.ListActivity;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
......@@ -76,11 +75,7 @@ import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.ViewAnimator;
......@@ -199,6 +194,13 @@ public class LibreDroid extends ListActivity {
@Override
public void onListItemClick(ListView l, View v, int pos, long id) {
super.onListItemClick(l, v, pos, id);
String selection = l.getItemAtPosition(pos).toString();
if(selection.equals("Add A Custom Station...")) {
} else {
LibreDroid.this.libreServiceConn.service.tuneStation("globaltags", selection);
LibreDroid.this.nextPage();
}
}
public void updateSong() {
......
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