1
0
Fork 0

- Add support for Update the uptime with a button

- Fix a bug where the client wouldn't update the uptime at the server
- Languages updates
This commit is contained in:
Carlos Mogas da Silva 2010-10-07 18:53:59 +01:00
parent 5b2431be5f
commit 11b7e2e339
8 changed files with 185 additions and 96 deletions

View file

@ -1,38 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/org.r3pek.droiduptime"
android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:layout_width="fill_parent" android:layout_height="fill_parent">
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.admob.android.ads.AdView android:layout_gravity="bottom" android:id="@+id/ad" android:layout_width="fill_parent" android:layout_alignParentBottom="true" myapp:backgroundColor="#000000" myapp:primaryTextColor="#FFFFFF" myapp:secondaryTextColor="#CCCCCC" android:layout_height="wrap_content" />
<ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/droiduptime" android:layout_gravity="center_horizontal" android:layout_marginTop="20dip"></ImageView>
<ImageView android:id="@+id/ImageView01"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/droiduptime" android:layout_gravity="center_horizontal"
android:layout_marginTop="20dip"></ImageView>
<TableLayout android:id="@+id/TableLayout01"
android:layout_height="wrap_content" android:layout_width="fill_parent"
android:stretchColumns="1" android:paddingTop="20dip">
<TableRow android:id="@+id/TableRow01"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_height="wrap_content" android:orientation="horizontal"
android:layout_width="fill_parent">
<TextView android:id="@+id/TextView01"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold" android:layout_marginTop="15dip"
android:text="@string/servicestatus"></TextView>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginLeft="20dip"
android:id="@+id/tvStatus" android:layout_marginTop="15dip"></TextView>
</LinearLayout>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/btnStartStopService"
android:layout_gravity="right"></Button>
</TableRow>
</TableLayout>
<LinearLayout android:id="@+id/LinearLayout02"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:paddingTop="10dip">
<TextView android:id="@+id/TextView02"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold" android:text="@string/uptime"></TextView>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginLeft="20dip"
android:id="@+id/tvUptime"></TextView>
</LinearLayout>
<TableLayout android:id="@+id/TableLayout02"
android:layout_height="wrap_content" android:layout_width="fill_parent"
android:stretchColumns="1" android:paddingTop="20dip">
<TableRow android:id="@+id/TableRow02"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<LinearLayout android:id="@+id/LinearLayout05"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:layout_marginTop="15dip">
<TextView android:id="@+id/TextView06"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold" android:text="@string/lastupdate"></TextView>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginLeft="20dip"
android:id="@+id/tvLastUpdate"></TextView>
</LinearLayout>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/btnUpdate"
android:text="@string/update" android:layout_gravity="right"></Button>
</TableRow>
</TableLayout>
<TextView android:id="@+id/TextView03" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginTop="15dip"
android:linksClickable="true" android:autoLink="web" android:text="@string/message"></TextView>
<TableLayout android:id="@+id/TableLayout01" android:layout_height="wrap_content" android:layout_width="fill_parent" android:stretchColumns="1" android:paddingTop="20dip">
<TableRow android:id="@+id/TableRow01" android:layout_width="wrap_content" android:layout_height="wrap_content">
<LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="fill_parent">
<TextView android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold" android:layout_marginTop="15dip" android:text="@string/servicestatus"></TextView>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20dip" android:id="@+id/tvStatus" android:layout_marginTop="15dip"></TextView>
</LinearLayout>
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/btnStartStopService" android:layout_gravity="right"></Button>
</TableRow>
</TableLayout>
<LinearLayout android:id="@+id/LinearLayout02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingTop="10dip"><TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold" android:text="@string/uptime"></TextView>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20dip" android:id="@+id/tvUptime"></TextView>
</LinearLayout>
<LinearLayout android:id="@+id/LinearLayout05" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_marginTop="15dip"><TextView android:id="@+id/TextView06" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold" android:text="@string/lastupdate"></TextView>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20dip" android:id="@+id/tvLastUpdate"></TextView>
</LinearLayout><TextView android:id="@+id/TextView03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="15dip" android:linksClickable="true" android:autoLink="web" android:text="@string/message"></TextView>
</LinearLayout>
</ScrollView>
</ScrollView>
<com.admob.android.ads.AdView
android:layout_gravity="bottom" android:id="@+id/ad"
android:layout_width="fill_parent" android:layout_alignParentBottom="true"
myapp:backgroundColor="#000000" myapp:primaryTextColor="#FFFFFF"
myapp:secondaryTextColor="#CCCCCC" android:layout_height="wrap_content" />
</RelativeLayout>

View file

@ -41,6 +41,9 @@
<item>7200</item>
</string-array>
<string name="no_user_pass">Insira o utilizador e a senha no menu configuração</string>
<string name="pref_gen_hostname">Hostname</string>
<string name="pref_gen_hostname_desc">Hostname a reportar para o Uptime Project</string>
<string name="pref_gen_hostname">Nome do telefone</string>
<string name="pref_gen_hostname_desc">Nome do telefone a reportar para o Uptime Project</string>
<string name="perm_allow_update_label">Força uma actualização do Uptime no site</string>
<string name="perm_allow_update_desc">Permite que uma aplicação submita o uptime corrente para o site uptimeprj.com</string>
<string name="update">Actualizar</string>
</resources>

View file

@ -41,6 +41,9 @@
<item>7200</item>
</string-array>
<string name="no_user_pass">请设定用户名和密码</string>
<string name="pref_gen_hostname">主机名</string>
<string name="pref_gen_hostname_desc">主机名发送到 Uptime 项目</string>
<string name="pref_gen_hostname">电话名称</string>
<string name="pref_gen_hostname_desc">手机名称发送到系统正常运行时间</string>
<string name="perm_allow_update_label">强制提交系统正常运行时间</string>
<string name="perm_allow_update_desc">允许任何应用程序强制提交系统正常运行时间执行时间到 uptimeprj.com 网站</string>
<string name="update">更新</string>
</resources>

View file

@ -41,6 +41,9 @@
<item>7200</item>
</string-array>
<string name="no_user_pass">請設定使用者名稱和密碼</string>
<string name="pref_gen_hostname">主機名</string>
<string name="pref_gen_hostname_desc">主機名發送到 Uptime 項目</string>
<string name="pref_gen_hostname">電話名稱</string>
<string name="pref_gen_hostname_desc">手機名稱發送到系統正常執行時間</string>
<string name="perm_allow_update_label">強制提交系統正常執行時間</string>
<string name="perm_allow_update_desc">允許任何套用程式強制提交系統正常執行時間執行時間到 uptimeprj.com 網站</string>
<string name="update">更新</string>
</resources>

View file

@ -41,6 +41,9 @@
<item>7200</item>
</string-array>
<string name="no_user_pass">Please setup Username and Password</string>
<string name="pref_gen_hostname">Hostname</string>
<string name="pref_gen_hostname_desc">Hostname to send to the Uptime Project</string>
<string name="pref_gen_hostname">Phone Name</string>
<string name="pref_gen_hostname_desc">Phone Name to send to the Uptime Project</string>
<string name="perm_allow_update_label">Force an uptime submission</string>
<string name="perm_allow_update_desc">Allows any application to force the current uptime to be submitted to the uptimeprj.com site</string>
<string name="update">Update</string>
</resources>