From: <kro...@us...> - 2010-12-10 11:12:49
|
Revision: 4026 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4026&view=rev Author: kroko_koenig Date: 2010-12-10 11:12:42 +0000 (Fri, 10 Dec 2010) Log Message: ----------- vibration and small layout Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/splash.java trunk/plugins/AndroidRemote/Release/settings.jpg Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote02.xml Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-10 11:12:42 UTC (rev 4026) @@ -82,38 +82,38 @@ public static final int GridView01=0x7f060017; public static final int ImageView01=0x7f060019; public static final int LinearLayout01=0x7f06001a; - public static final int ListView01=0x7f060029; + public static final int ListView01=0x7f060028; public static final int TableLayout01=0x7f060005; public static final int TableRow01=0x7f060006; public static final int TextView01=0x7f060003; public static final int TextView02=0x7f060004; - public static final int btnBack=0x7f06003f; - public static final int btnChannelDown=0x7f060044; - public static final int btnChannelUp=0x7f060041; - public static final int btnDown=0x7f06003e; - public static final int btnExit=0x7f060045; - public static final int btnFBack=0x7f06002c; - public static final int btnFForw=0x7f06002e; - public static final int btnHibernate=0x7f060047; - public static final int btnHome=0x7f060035; - public static final int btnInfo=0x7f060037; - public static final int btnLeft=0x7f060039; - public static final int btnMenu=0x7f06003d; - public static final int btnOk=0x7f06003a; - public static final int btnPause=0x7f060032; - public static final int btnPlay=0x7f06002d; - public static final int btnRestart=0x7f060048; - public static final int btnRight=0x7f06003b; - public static final int btnShutOff=0x7f060049; - public static final int btnSkipBack=0x7f060030; - public static final int btnSkipForw=0x7f060033; - public static final int btnStop=0x7f060031; - public static final int btnSuspend=0x7f060046; - public static final int btnUp=0x7f060036; - public static final int btnVolumeDown=0x7f060043; - public static final int btnVolumeMute=0x7f060042; - public static final int btnVolumeUp=0x7f060040; - public static final int btnWakeOnLan=0x7f06004a; + public static final int btnBack=0x7f06003e; + public static final int btnChannelDown=0x7f060043; + public static final int btnChannelUp=0x7f060040; + public static final int btnDown=0x7f06003d; + public static final int btnExit=0x7f060044; + public static final int btnFBack=0x7f06002b; + public static final int btnFForw=0x7f06002d; + public static final int btnHibernate=0x7f060046; + public static final int btnHome=0x7f060034; + public static final int btnInfo=0x7f060036; + public static final int btnLeft=0x7f060038; + public static final int btnMenu=0x7f06003c; + public static final int btnOk=0x7f060039; + public static final int btnPause=0x7f060031; + public static final int btnPlay=0x7f06002c; + public static final int btnRestart=0x7f060047; + public static final int btnRight=0x7f06003a; + public static final int btnShutOff=0x7f060048; + public static final int btnSkipBack=0x7f06002f; + public static final int btnSkipForw=0x7f060032; + public static final int btnStop=0x7f060030; + public static final int btnSuspend=0x7f060045; + public static final int btnUp=0x7f060035; + public static final int btnVolumeDown=0x7f060042; + public static final int btnVolumeMute=0x7f060041; + public static final int btnVolumeUp=0x7f06003f; + public static final int btnWakeOnLan=0x7f060049; public static final int btn_main_music=0x7f060008; public static final int btn_main_now_playing=0x7f06000b; public static final int btn_main_pictures=0x7f060007; @@ -132,14 +132,13 @@ public static final int list_song=0x7f060016; public static final int main_now_playing=0x7f06000d; public static final int music_grid=0x7f060012; - public static final int naviRemote_text=0x7f06002a; + public static final int naviRemote_text=0x7f060029; public static final int now_album=0x7f06001c; public static final int now_artist=0x7f060022; public static final int now_cd=0x7f06001d; - public static final int now_list=0x7f060028; - public static final int now_next=0x7f060027; - public static final int now_pause=0x7f060025; - public static final int now_play=0x7f060026; + public static final int now_list=0x7f060027; + public static final int now_next=0x7f060026; + public static final int now_play=0x7f060025; public static final int now_playing=0x7f06001b; public static final int now_playing_right=0x7f060020; public static final int now_playing_t_left=0x7f06001f; @@ -151,17 +150,18 @@ public static final int rslide=0x7f060053; public static final int save=0x7f06004f; public static final int send=0x7f060051; - public static final int server_ip=0x7f06004b; - public static final int server_macid=0x7f06004d; - public static final int server_port=0x7f06004c; + public static final int server_ip=0x7f06004a; + public static final int server_macid=0x7f06004c; + public static final int server_port=0x7f06004b; public static final int slide=0x7f060052; public static final int title=0x7f06004e; + public static final int vibration=0x7f06004d; public static final int widget0=0x7f060011; - public static final int widget00=0x7f06002b; - public static final int widget01=0x7f06002f; - public static final int widget02=0x7f060034; - public static final int widget03=0x7f060038; - public static final int widget04=0x7f06003c; + public static final int widget00=0x7f06002a; + public static final int widget01=0x7f06002e; + public static final int widget02=0x7f060033; + public static final int widget03=0x7f060037; + public static final int widget04=0x7f06003b; public static final int widget44=0x7f060000; } public static final class layout { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-10 11:12:42 UTC (rev 4026) @@ -1,22 +1,37 @@ Pictures section ---------------- - -implemented: - browse folders (MP shares) display thumbs - - save to sd open browser send picture slide show random slide show -wishes: +Music section +------------- +browse folders (MP shares) +Video section +------------- +nothing yet + +NowPlaying +---------- +show actual title +show actual time +show actual cover + +Remote +------ +most functions as on my remote + + +Main issues +------------ +Vibration (on/off settings) +Vibration feedback +Check if WIFI is on gesture control for pictures (swipe) save files from Android to MP - -Music section -------------- +if the MP has no focus the remote doesnt work (normal) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml 2010-12-10 11:12:42 UTC (rev 4026) @@ -35,13 +35,13 @@ android:layout_height="wrap_content" android:layout_marginTop="10dip"> <TextView android:id="@+id/now_playing_t_left" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="12dip" android:textColor="#FF8080ff" android:text="00:00" - android:gravity="left" /> + android:textSize="12dip" android:text="00:00" + android:gravity="left" android:textColor="#FF000000"/> <TextView android:id="@+id/now_playing_right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:textSize="12dip" - android:textColor="#FF8080ff" android:gravity="right" android:text="00:00" - android:singleLine="true" /> + android:gravity="right" android:text="00:00" + android:singleLine="true" android:textColor="#FF000000"/> </RelativeLayout> <TextView android:id="@+id/now_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="16dip" @@ -57,19 +57,17 @@ </LinearLayout> <LinearLayout android:layout_height="wrap_content" - android:orientation="horizontal" android:layout_width="fill_parent"> + android:orientation="horizontal" android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> <ImageButton android:id="@+id/now_prev" - android:background="@drawable/rewind" android:layout_height="60dip" android:layout_width="60dip"/> + android:layout_height="60dip" android:background="@drawable/skip_back" android:layout_width="60dip"/> <ImageButton android:id="@+id/now_stop" - android:background="@drawable/stop" android:layout_height="60dip" android:layout_width="60dip"/> - <ImageButton android:id="@+id/now_pause" - android:background="@drawable/pause" android:layout_width="60dip" android:layout_height="60dip"/> + android:background="@drawable/stop" android:layout_height="60dip" android:layout_width="60dip"/> <ImageButton android:id="@+id/now_play" - android:layout_height="60dip" android:layout_width="60dip" android:background="@drawable/right"/> + android:layout_height="60dip" android:background="@drawable/right" android:layout_width="60dip"/> <ImageButton android:id="@+id/now_next" - android:background="@drawable/forward" android:layout_width="60dip" android:layout_height="60dip"/> + android:layout_height="60dip" android:background="@drawable/skip_forward" android:layout_width="60dip"/> <ImageButton android:id="@+id/now_list" - android:background="@drawable/document" android:layout_width="60dip" android:layout_height="60dip"/> + android:background="@drawable/document" android:layout_height="60dip" android:layout_width="60dip"/> </LinearLayout> </LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2010-12-10 11:12:42 UTC (rev 4026) @@ -24,5 +24,6 @@ <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="12-34-56-78-90-12" android:inputType="number|numberSigned"></EditText> - + +<CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000" android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback"></CheckBox> </LinearLayout> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml 2010-12-10 11:12:42 UTC (rev 4026) @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="fill_parent" + android:layout_height="fill_parent" android:background="@drawable/brush"> + +<TableLayout + android:id="@+id/TableLayout01" + xmlns:android="http://schemas.android.com/apk/res/android" + + android:layout_height="wrap_content" + android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> + + +<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="5dip"> + + <ImageButton android:src="@drawable/main_pictures" android:scaleType="fitXY" + android:layout_height="80dip" android:layout_width="80dip" + android:layout_marginRight="40dip" android:padding="5dip" android:id="@+id/btn_main_pictures"> + </ImageButton> + + <ImageButton android:layout_height="80dip" android:layout_width="80dip" + android:scaleType="fitXY" android:padding="5dip" + android:src="@drawable/main_music" android:id="@+id/btn_main_music"> + </ImageButton> + + </TableRow> + + <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="5dip"> + + <ImageButton android:scaleType="fitXY" + android:layout_height="80dip" android:layout_width="80dip" + android:padding="5dip" android:layout_marginRight="40dip" android:src="@drawable/main_video" android:id="@+id/btn_main_video"> + </ImageButton> + + <ImageButton android:layout_height="80dip" android:layout_width="80dip" + android:scaleType="fitXY" android:padding="5dip" android:src="@drawable/main_remote" android:id="@+id/btn_main_remote"> + </ImageButton> + + </TableRow> + + <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="5dip"> + + <ImageButton android:scaleType="fitXY" + android:layout_height="80dip" android:layout_width="80dip" + android:padding="5dip" android:layout_marginRight="40dip" android:src="@drawable/main_now_playing" android:id="@+id/btn_main_now_playing"> + </ImageButton> + + <ImageButton android:layout_height="80dip" android:layout_width="80dip" + android:scaleType="fitXY" android:padding="5dip" android:src="@drawable/main_settings" android:id="@+id/btn_main_settings"> + </ImageButton> + + </TableRow> + +</TableLayout> + + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="nothing playing" + android:gravity="center_horizontal" android:textSize="15dip" + android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:background="#FFA9A9A9" android:padding="5dip" android:id="@+id/main_now_playing"> + </TextView> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" android:background="#0FF0FFFF" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:padding="5dip"> + + + + + + + <ImageButton android:src="@drawable/main_skp_back" android:scaleType="fitXY" + android:layout_height="60dip" android:layout_width="60dip" + android:id="@+id/btn_main_skp_back" android:padding="2dip" android:layout_marginRight="5dip"></ImageButton> + <ImageButton android:scaleType="fitXY" + android:layout_height="60dip" android:layout_width="60dip" + android:id="@+id/btn_main_play" android:src="@drawable/main_play" android:padding="2dip" android:layout_marginRight="5dip"></ImageButton> + <ImageButton android:scaleType="fitXY" + android:layout_height="60dip" android:layout_width="60dip" + android:id="@+id/btn_main_skp_forw" android:src="@drawable/main_skp_forw" android:padding="2dip"></ImageButton> +</LinearLayout> +</LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml 2010-12-10 11:12:42 UTC (rev 4026) @@ -1,7 +1,7 @@ <LinearLayout android:id="@+id/LinearLayout01" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:background="@drawable/back" + android:background="@drawable/brush" xmlns:android="http://schemas.android.com/apk/res/android"> <TextView android:id="@+id/now_playing" android:layout_width="fill_parent" @@ -36,13 +36,13 @@ android:layout_height="wrap_content" android:layout_marginTop="10dip"> <TextView android:id="@+id/now_playing_t_left" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="12dip" android:textColor="#FF8080ff" android:text="00:00" - android:gravity="left" /> + android:textSize="12dip" android:text="00:00" + android:gravity="left" android:textColor="#FF000000"/> <TextView android:id="@+id/now_playing_right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:textSize="12dip" - android:textColor="#FF8080ff" android:gravity="right" android:text="00:00" - android:singleLine="true" /> + android:gravity="right" android:text="00:00" + android:singleLine="true" android:textColor="#FF000000"/> </RelativeLayout> <TextView android:id="@+id/now_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="14dip" @@ -58,24 +58,17 @@ </LinearLayout> <LinearLayout android:layout_height="wrap_content" - android:orientation="horizontal" android:layout_width="fill_parent"> + android:orientation="horizontal" android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> <ImageButton android:id="@+id/now_prev" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="@drawable/rewind" /> + android:background="@drawable/skip_back" android:layout_width="60dip" android:layout_height="40dip"/> <ImageButton android:id="@+id/now_stop" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="@drawable/stop" /> - <ImageButton android:id="@+id/now_pause" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="@drawable/pause" /> + android:background="@drawable/stop" android:layout_width="60dip" android:layout_height="40dip"/> <ImageButton android:id="@+id/now_play" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="@drawable/play" /> + android:background="@drawable/right" android:layout_width="60dip" android:layout_height="40dip"/> <ImageButton android:id="@+id/now_next" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="@drawable/forward" /> + android:background="@drawable/skip_forward" android:layout_width="60dip" android:layout_height="40dip"/> <ImageButton android:id="@+id/now_list" - android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/document"/> + android:background="@drawable/document" android:layout_width="60dip" android:layout_height="40dip"/> </LinearLayout> </LinearLayout> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml 2010-12-10 11:12:42 UTC (rev 4026) @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + android:id="@+id/widget0" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical" + android:background="@drawable/brush" + xmlns:android="http://schemas.android.com/apk/res/android"> + + <TextView android:id="@+id/naviRemote_text" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="Remote 01" + android:gravity="center_horizontal" android:background="#FFA9A9A9" + android:textSize="15dip" + android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:padding="5dip"> + </TextView> + + <LinearLayout + android:id="@+id/widget00" + android:layout_width="fill_parent" + android:layout_height="wrap_content" android:layout_marginTop="5dip"> + + <Button android:id="@+id/btnFBack" + android:layout_width="80dip" + android:layout_height="60dip" + android:background="@drawable/rewind"> + </Button> + + <Button android:id="@+id/btnPlay" + android:layout_width="160dip" + android:layout_height="60dip" + android:background="@drawable/play"> + </Button> + + <Button android:id="@+id/btnFForw" + android:layout_width="80dip" + android:layout_height="60dip" android:background="@drawable/forward"> + </Button> + + </LinearLayout> + + <LinearLayout + android:id="@+id/widget01" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + > + <Button android:id="@+id/btnSkipBack" + android:layout_width="80dip" + android:layout_height="60dip" + android:background="@drawable/skip_back"> + </Button> + + <Button android:id="@+id/btnStop" + android:layout_width="80dip" + android:layout_height="60dip" + android:background="@drawable/stop"> + </Button> + + <Button android:id="@+id/btnPause" + android:layout_width="80dip" + android:layout_height="60dip" + android:background="@drawable/pause"> + </Button> + + <Button android:id="@+id/btnSkipForw" + android:layout_width="80dip" + android:layout_height="60dip" + android:background="@drawable/skip_forward"> + </Button> + + </LinearLayout> + + <LinearLayout + android:id="@+id/widget02" + android:layout_width="fill_parent" + android:layout_height="wrap_content" android:paddingTop="10dip"> + + <Button android:id="@+id/btnHome" + android:layout_width="80dip" + android:background="@drawable/home" android:layout_height="50dip"> + </Button> + + <Button android:id="@+id/btnUp" + android:layout_width="160dip" android:background="@drawable/up" android:layout_height="50dip"> + </Button> + + <Button android:id="@+id/btnInfo" + android:layout_width="80dip" + android:background="@drawable/info" android:layout_height="50dip"> + </Button> + + </LinearLayout> + + <LinearLayout + android:id="@+id/widget03" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <Button android:id="@+id/btnLeft" + android:layout_width="80dip" + android:background="@drawable/left" android:layout_height="100dip"> + </Button> + + <Button android:id="@+id/btnOk" + android:layout_width="160dip" android:background="@drawable/select" android:layout_height="100dip"> + </Button> + + <Button android:id="@+id/btnRight" + android:layout_width="80dip" + android:background="@drawable/right" android:layout_height="100dip"> + </Button> + </LinearLayout> + + <LinearLayout + android:id="@+id/widget04" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + > + + <Button android:id="@+id/btnMenu" + android:layout_width="80dip" + android:background="@drawable/menu" android:layout_height="50dip"> + </Button> + + <Button android:id="@+id/btnDown" + android:layout_width="160dip" + android:background="@drawable/down" android:layout_height="50dip"> + </Button> + + <Button android:id="@+id/btnBack" + android:layout_width="80dip" + android:background="@drawable/back" android:layout_height="50dip"> + </Button> + + </LinearLayout> + +</LinearLayout> \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote02.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote02.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote02.xml 2010-12-10 11:12:42 UTC (rev 4026) @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout android:id="@+id/widget0" + android:layout_width="fill_parent" android:layout_height="fill_parent" + android:background = "@drawable/brush" + android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"> + + <TextView android:id="@+id/naviRemote_text" + android:layout_width="fill_parent" android:layout_height="wrap_content" + android:text="Remote 02" android:gravity="center_horizontal" + android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:background="#FFA9A9A9" android:textSize="15dip" android:padding="2dip"> + </TextView> + + <LinearLayout android:id="@+id/widget00" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" android:layout_marginTop="0dip"> + + <Button android:id="@+id/btnVolumeUp" android:background="@drawable/volume_p" android:layout_height="50dip" android:layout_width="60dip"> + </Button> + + <Button android:id="@+id/btnChannelUp" android:layout_marginLeft="40dip" android:background="@drawable/channel_p" android:layout_height="50dip" android:layout_width="60dip"> + </Button> + </LinearLayout> + + <LinearLayout android:id="@+id/widget00" + android:layout_height="wrap_content" android:layout_width="wrap_content" + android:layout_gravity="center_vertical"> + + <Button android:id="@+id/btnVolumeMute" android:background="@drawable/mute" android:layout_height="50dip" android:layout_width="60dip"> + </Button> + + </LinearLayout> + + <LinearLayout android:id="@+id/widget00" + android:layout_height="wrap_content" android:layout_width="wrap_content" + android:layout_gravity="center_vertical" android:paddingBottom="5dip"> + + <Button android:id="@+id/btnVolumeDown" android:background="@drawable/volume_m" android:layout_height="50dip" android:layout_width="60dip"> + </Button> + + <Button android:id="@+id/btnChannelDown" android:layout_marginLeft="40dip" android:background="@drawable/channel_m" android:layout_height="50dip" android:layout_width="60dip"> + </Button> + </LinearLayout> + + <TextView android:id="@+id/naviRemote_text" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="Power control" + android:gravity="center_horizontal" android:textSize="15dip" + android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:background="#FFA9A9A9" android:padding="2dip"> + </TextView> + + <LinearLayout android:id="@+id/widget00" + android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> + + <Button android:layout_width="60dip" android:textSize="12dip" + android:layout_height="60dip" android:textColor="#FFFFFFFF" + android:id="@+id/btnExit" android:gravity="bottom|center" android:background="@drawable/exit"> + </Button> + + <Button android:textSize="12dip" android:layout_height="60dip" + android:textColor="#FFFFFFFF" android:id="@+id/btnSuspend" + android:gravity="bottom|center" + android:layout_width="60dip" android:background="@drawable/suspend"> + </Button> + + <Button android:layout_width="60dip" android:textSize="12dip" + android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnHibernate" + android:gravity="bottom|center" android:background="@drawable/hibernate"> + </Button> + + <Button android:layout_width="60dip" android:textSize="12dip" + android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnRestart" + android:gravity="bottom|center" android:background="@drawable/restart"> + </Button> + + <Button android:layout_width="60dip" android:textSize="12dip" + android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnShutOff" + android:gravity="bottom|center" android:background="@drawable/power_off"> + </Button> + </LinearLayout> + + <LinearLayout android:id="@+id/widget00" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="10dip" android:layout_gravity="center_horizontal"> + + <Button android:layout_width="60dip" android:textSize="12dip" + android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnWakeOnLan" + android:gravity="bottom|center" android:background="@drawable/wake_on_lan"> + </Button> + </LinearLayout> + +</LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-10 11:12:42 UTC (rev 4026) @@ -23,9 +23,7 @@ import java.io.IOException; import java.io.InputStream; - import mediaportal.remote.R; - import android.app.Activity; import android.content.Intent; import android.content.res.AssetManager; @@ -35,6 +33,7 @@ import android.view.View; import android.view.GestureDetector.OnGestureListener; import android.widget.Button; +import android.widget.Toast; public class Remote_01 extends Activity implements OnGestureListener { @@ -164,6 +163,10 @@ PostCommand("rewind"); } }); + + Toast.makeText(this, + "swipe to left for more", Toast.LENGTH_LONG) + .show(); } public void PostCommand(String button) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java 2010-12-10 11:12:42 UTC (rev 4026) @@ -26,5 +26,5 @@ public static String Server = "192.168.0.30"; public static String Port = "8200"; public static String MacId = "11-22-33-44-55-66"; - + public static Boolean Vibrate= true; } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-10 11:12:42 UTC (rev 4026) @@ -21,23 +21,29 @@ package mediaportal.remote; +import java.io.IOException; +import java.io.InputStream; + import mediaportal.remote.R; import android.app.Activity; +import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; +import android.content.res.AssetManager; import android.os.Bundle; +import android.os.Vibrator; import android.view.View; import android.widget.*; public class main extends Activity { private static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; - + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); - + SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, MODE_PRIVATE); @@ -48,6 +54,7 @@ ImageButton btnPictures = (ImageButton) findViewById(R.id.btn_main_pictures); btnPictures.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); Intent myIntent = new Intent(view.getContext(), pictures.class); startActivityForResult(myIntent, 0); } @@ -56,6 +63,7 @@ ImageButton btnMusic = (ImageButton) findViewById(R.id.btn_main_music); btnMusic.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); Intent myIntent = new Intent(view.getContext(), musicTab.class); startActivityForResult(myIntent, 0); } @@ -64,13 +72,17 @@ ImageButton btnVideo = (ImageButton) findViewById(R.id.btn_main_video); btnVideo.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - Toast.makeText(view.getContext(), "not implemented yet. Sorry !", Toast.LENGTH_LONG).show(); + DoVibrate(); + Toast.makeText(view.getContext(), + "not implemented yet. Sorry !", Toast.LENGTH_LONG) + .show(); } }); ImageButton btnRemote = (ImageButton) findViewById(R.id.btn_main_remote); btnRemote.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); Intent myIntent = new Intent(view.getContext(), Remote_01.class); startActivityForResult(myIntent, 0); } @@ -79,6 +91,7 @@ ImageButton btnNowPlaying = (ImageButton) findViewById(R.id.btn_main_now_playing); btnNowPlaying.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { + DoVibrate(); Intent myIntent = new Intent(view.getContext(), nowplaying.class); startActivityForResult(myIntent, 0); @@ -88,12 +101,65 @@ ImageButton btnSettings = (ImageButton) findViewById(R.id.btn_main_settings); btnSettings.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - Intent myIntent = new Intent(view.getContext(), - setup.class); + DoVibrate(); + Intent myIntent = new Intent(view.getContext(), setup.class); startActivityForResult(myIntent, 0); } }); + + ImageButton skipForw = (ImageButton) findViewById(R.id.btn_main_skp_forw); + skipForw.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + DoVibrate(); + PostCommand("nextItem"); + } + }); + + ImageButton skipBack = (ImageButton) findViewById(R.id.btn_main_skp_back); + skipBack.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + DoVibrate(); + PostCommand("prevItem"); + } + }); + + ImageButton play = (ImageButton) findViewById(R.id.btn_main_play); + play.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + DoVibrate(); + PostCommand("play"); + } + }); } - + public void PostCommand(String button) { + + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); + + AssetManager assetManager = getAssets(); + String xml = ""; + + try { + InputStream inputStream = null; + inputStream = assetManager.open("cmd_" + button + ".xml"); + + int x = inputStream.read(); + + while (x != -1) { + xml = xml + (char) x; + x = inputStream.read(); + } + post.Post(xml); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public void DoVibrate() { + if (Settings.Vibrate) { + // Get instance of Vibrator from current Context + Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + v.vibrate(100); + } + } } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-10 11:12:42 UTC (rev 4026) @@ -41,7 +41,6 @@ ImageButton btn1 = (ImageButton) findViewById(R.id.now_prev); ImageButton btn2 = (ImageButton) findViewById(R.id.now_stop); - ImageButton btn3 = (ImageButton) findViewById(R.id.now_pause); ImageButton btn4 = (ImageButton) findViewById(R.id.now_play); ImageButton btn5 = (ImageButton) findViewById(R.id.now_next); ImageButton btn6 = (ImageButton) findViewById(R.id.now_list); @@ -56,11 +55,7 @@ PostCommand("stop"); } }); - btn3.setOnClickListener(new View.OnClickListener() { - public void onClick(View view) { - PostCommand("pause"); - } - }); + btn4.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { PostCommand("play"); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2010-12-10 11:12:42 UTC (rev 4026) @@ -25,6 +25,7 @@ import android.app.Activity; import android.content.SharedPreferences; import android.os.Bundle; +import android.widget.CheckBox; import android.widget.EditText; public class setup extends Activity { @@ -47,14 +48,17 @@ Settings.Server = settings.getString("Server", "192.168.0.30"); Settings.Port = settings.getString("Port", "8200"); Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); + Settings.Vibrate = settings.getBoolean("Vibrate", true); EditText txt1 = (EditText)findViewById(R.id.server_ip); EditText txt2 = (EditText)findViewById(R.id.server_port); EditText txt3 = (EditText)findViewById(R.id.server_macid); + CheckBox chk = (CheckBox)findViewById(R.id.vibration); txt1.setText(Settings.Server); txt2.setText(Settings.Port); txt3.setText(Settings.MacId); + chk.setChecked(Settings.Vibrate); } @Override @@ -64,6 +68,7 @@ EditText txt1 = (EditText)findViewById(R.id.server_ip); EditText txt2 = (EditText)findViewById(R.id.server_port); EditText txt3 = (EditText)findViewById(R.id.server_macid); + CheckBox chk = (CheckBox)findViewById(R.id.vibration); SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, MODE_PRIVATE); SharedPreferences.Editor prefEditor = settings.edit(); @@ -71,10 +76,12 @@ prefEditor.putString("Server", txt1.getText().toString()); prefEditor.putString("Port",txt2.getText().toString()); prefEditor.putString("MacId", txt3.getText().toString()); + prefEditor.putBoolean("Vibrate", chk.isChecked()); prefEditor.commit(); Settings.Server = settings.getString("Server", "192.168.0.30"); Settings.Port = settings.getString("Port", "8200"); Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); + Settings.Vibrate = settings.getBoolean("Vibrate", true); } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/splash.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/splash.java 2010-12-10 08:51:46 UTC (rev 4025) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/splash.java 2010-12-10 11:12:42 UTC (rev 4026) @@ -29,7 +29,7 @@ public class splash extends Activity { - private final int SPLASH_DISPLAY_LENGHT = 1500; + private final int SPLASH_DISPLAY_LENGHT = 2000; @Override public void onCreate(Bundle icicle) { Modified: trunk/plugins/AndroidRemote/Release/settings.jpg =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |