Permalink
Browse files

Widget feature.

  • Loading branch information...
hide92795
hide92795 committed Jan 22, 2014
1 parent d06f24f commit 5a9252d41efcc33fc9fe751f147887d362e73794
Showing with 1,074 additions and 180 deletions.
  1. +1 −1 RemoteController/src/hide92795/bukkit/plugin/remotecontroller/command/CommandServerInfo.java
  2. +15 −3 RemoteController_for_Android/AndroidManifest.xml
  3. BIN RemoteController_for_Android/res/drawable/background_widget.9.png
  4. BIN RemoteController_for_Android/res/drawable/ic_action_refresh.png
  5. BIN RemoteController_for_Android/res/drawable/ic_action_settings.png
  6. +0 −13 RemoteController_for_Android/res/drawable/roundedrect_widget.xml
  7. +1 −1 RemoteController_for_Android/res/layout/activity_login_server.xml
  8. +54 −0 RemoteController_for_Android/res/layout/activity_widget_config.xml
  9. +4 −0 RemoteController_for_Android/res/layout/pref_title_layout.xml
  10. +42 −0 RemoteController_for_Android/res/layout/view_widget_config_buttons.xml
  11. +148 −67 RemoteController_for_Android/res/layout/widget_server_info.xml
  12. +33 −0 RemoteController_for_Android/res/layout/widget_server_info_not_receive.xml
  13. +16 −3 RemoteController_for_Android/res/values-ja/strings.xml
  14. +1 −0 RemoteController_for_Android/res/values/colors.xml
  15. +14 −1 RemoteController_for_Android/res/values/strings.xml
  16. +8 −4 RemoteController_for_Android/res/values/styles.xml
  17. +8 −0 RemoteController_for_Android/res/values/widget_config_keys.xml
  18. +3 −2 RemoteController_for_Android/res/xml-v14/widget_server_info.xml
  19. +27 −0 RemoteController_for_Android/res/xml/widget_config.xml
  20. +3 −2 RemoteController_for_Android/res/xml/widget_server_info.xml
  21. +113 −61 RemoteController_for_Android/src/hide92795/android/remotecontroller/Session.java
  22. +258 −0 ...eController_for_Android/src/hide92795/android/remotecontroller/activity/WidgetConfigActivity.java
  23. +4 −2 ...ller_for_Android/src/hide92795/android/remotecontroller/autoupdate/AutoUpdateDispatchService.java
  24. +100 −14 ...Android/src/hide92795/android/remotecontroller/autoupdate/AutoUpdatePublishBroadcastReceiver.java
  25. +45 −1 ...teController_for_Android/src/hide92795/android/remotecontroller/autoupdate/AutoUpdateService.java
  26. +24 −0 RemoteController_for_Android/src/hide92795/android/remotecontroller/config/WidgetConfig.java
  27. +20 −0 RemoteController_for_Android/src/hide92795/android/remotecontroller/ui/WidgetConfigFragment.java
  28. +40 −0 ...teController_for_Android/src/hide92795/android/remotecontroller/util/SerializableSparseArray.java
  29. +15 −0 RemoteController_for_Android/src/hide92795/android/remotecontroller/util/Utils.java
  30. +38 −0 RemoteController_for_Android/src/hide92795/android/remotecontroller/widget/WidgetData.java
  31. +39 −5 RemoteController_for_Android/src/hide92795/android/remotecontroller/widget/WidgetProvider.java
@@ -13,7 +13,7 @@
public synchronized void doCommand(RemoteController plugin, ClientConnection connection, int pid, String arg) {
try {
if (connection.isAuthorized()) {
String servername = plugin.getServer().getServerName();
String servername = plugin.getServer().getServerName().replaceAll("\r\n", "\n");
String port = String.valueOf(plugin.getServer().getPort());
String max = String.valueOf(plugin.getServer().getMaxPlayers());
String current = String.valueOf(plugin.getServer().getOnlinePlayers().length);
@@ -111,6 +111,15 @@
android:label="@string/str_notification"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activity.WidgetConfigActivity"
android:label="@string/str_widget_config"
android:screenOrientation="portrait"
android:theme="@style/PreferenceTheme" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<service android:name=".autoupdate.AutoUpdateService" >
</service>
@@ -131,14 +140,17 @@
</receiver>
<receiver
android:name=".widget.WidgetProvider"
android:label="@string/info_app_name">
android:label="@string/info_app_name" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_ENABLED" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<action android:name="android.appwidget.action.APPWIDGET_DISABLED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_server_info"
/>
android:resource="@xml/widget_server_info" />
</receiver>
</application>

This file was deleted.

Oops, something went wrong.
@@ -130,7 +130,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:inputType="textVisiblePassword" />
android:inputType="textPassword" />
</TableRow>
</TableLayout>
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/background"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<Button
android:id="@+id/btn_widget_config_ok"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="@drawable/button_bg"
android:enabled="false"
android:paddingBottom="15dp"
android:paddingLeft="15dp"
android:paddingRight="20dp"
android:paddingTop="15dp"
android:text="@string/str_ok" />
<Button
android:id="@+id/btn_widget_config_cancel"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="@drawable/button_bg"
android:paddingBottom="15dp"
android:paddingLeft="15dp"
android:paddingRight="20dp"
android:paddingTop="15dp"
android:text="@string/str_cancel" />
</LinearLayout>
</LinearLayout>
@@ -0,0 +1,4 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+android:id/title"
style="?android:attr/listSeparatorTextViewStyle"
android:textColor="@color/black" />
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/background"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<Button
android:id="@+id/btn_widget_config_ok"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="@drawable/button_bg"
android:enabled="false"
android:paddingBottom="15dp"
android:paddingLeft="15dp"
android:paddingRight="20dp"
android:paddingTop="15dp"
android:text="@string/str_ok" />
<Button
android:id="@+id/btn_widget_config_cancel"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="@drawable/button_bg"
android:paddingBottom="15dp"
android:paddingLeft="15dp"
android:paddingRight="20dp"
android:paddingTop="15dp"
android:text="@string/str_cancel" />
</LinearLayout>
Oops, something went wrong.

0 comments on commit 5a9252d

Please sign in to comment.