Commit 32ce94a80ed4c3d7623e6710cd52b6e60a43deea
- Diff rendering mode:
- inline
- side by side
build.xml
(1 / 1)
|   | |||
| 1 | 1 | <?xml version="1.0" encoding="UTF-8"?> | |
| 2 | <project name="Amdroid" default="help"> | ||
| 2 | <project name="amdroid" default="help"> | ||
| 3 | 3 | ||
| 4 | 4 | <!-- The local.properties file is created and updated by the 'android' tool. | |
| 5 | 5 | It contain the path to the SDK. It should *NOT* be checked in in Version |
res/layout-land/playlist.xml
(12 / 0)
|   | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:orientation="vertical" | ||
| 4 | android:layout_width="fill_parent" | ||
| 5 | android:layout_height="fill_parent"> | ||
| 6 | |||
| 7 | <ListView android:id="@+id/list" | ||
| 8 | android:layout_alignParentTop="true" | ||
| 9 | android:layout_width="fill_parent" | ||
| 10 | android:layout_height="180sp" /> | ||
| 11 | |||
| 12 | </LinearLayout> |
res/layout/my_media.xml
(1 / 1)
|   | |||
| 33 | 33 | ||
| 34 | 34 | <ImageButton android:id="@+id/prev" style="@android:style/MediaButton.Previous" /> | |
| 35 | 35 | <ImageButton android:id="@+id/pause" style="@android:style/MediaButton.Play" /> | |
| 36 | <ImageButton android:id="@+id/next" style="@android:style/MediaButton.Next" /> | ||
| 36 | <ImageButton android:id="@+id/next" style="@android:style/MediaButton.Next" /> | ||
| 37 | 37 | ||
| 38 | 38 | </LinearLayout> | |
| 39 | 39 |
res/layout/playlist.xml
(1 / 1)
|   | |||
| 8 | 8 | android:layout_alignParentTop="true" | |
| 9 | 9 | android:layout_width="fill_parent" | |
| 10 | 10 | android:layout_height="340sp" /> | |
| 11 | |||
| 11 | |||
| 12 | 12 | </LinearLayout> |
|   | |||
| 42 | 42 | setContentView(R.layout.dash); | |
| 43 | 43 | ||
| 44 | 44 | /* We need a listener for all of the buttons */ | |
| 45 | |||
| 46 | 45 | Button temp; | |
| 47 | 46 | temp = (Button) findViewById(R.id.artists); | |
| 48 | 47 | temp.setOnClickListener(this); | |
| … | … | ||
| 51 | 51 | temp.setOnClickListener(this); | |
| 52 | 52 | temp = (Button) findViewById(R.id.playlists); | |
| 53 | 53 | temp.setOnClickListener(this); | |
| 54 | |||
| 55 | //If they tap the "Now Playing" section, take them to the playlist. | ||
| 54 | |||
| 55 | //If they tap the "Now Playing" section, take them to the playlist. | ||
| 56 | 56 | findViewById(R.id.nowplaying).setOnClickListener(this); | |
| 57 | 57 | ||
| 58 | 58 | /* Verify a valid session */ |
|   | |||
| 1 | package com.sound.amdriod; | ||
| 2 | |||
| 3 | import android.app.Service; | ||
| 4 | |||
| 5 | import android.content.Intent; | ||
| 6 | |||
| 7 | import android.os.Handler; | ||
| 8 | import android.os.IBinder; | ||
| 9 | import android.os.Message; | ||
| 10 | |||
| 11 | public class playerService extends Service { | ||
| 12 | private IBinder mBinder; | ||
| 13 | private boolean mServiceInUse = false; | ||
| 14 | |||
| 15 | @Override | ||
| 16 | public IBinder onBind(Intent intent) { | ||
| 17 | //mDelayedStopHandler.removeCallbacksAndMessages(null); | ||
| 18 | mServiceInUse = true; | ||
| 19 | return mBinder; | ||
| 20 | } | ||
| 21 | |||
| 22 | @Override | ||
| 23 | public void onRebind(Intent intent) { | ||
| 24 | //mDelayedStopHandler.removeCallbacksAndMessages(null); | ||
| 25 | mServiceInUse = true; | ||
| 26 | } | ||
| 27 | |||
| 28 | } |

