Skip to content

Commit

Permalink
added testsuite and improved service client
Browse files Browse the repository at this point in the history
  • Loading branch information
derveloper committed Oct 22, 2011
1 parent c609059 commit 3fd79db
Show file tree
Hide file tree
Showing 12 changed files with 354 additions and 207 deletions.
37 changes: 19 additions & 18 deletions AndroidManifest.xml
@@ -1,23 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fNordeingang"
android:versionCode="18" android:versionName="Beta 0.18" android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name=".fNordeingangActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name="fNordTweetActivity"></activity>
<activity android:name="fNordSettingsActivity"></activity>
</application>


package="org.fNordeingang"
android:versionCode="18" android:versionName="Beta 0.18" android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name=".fNordeingangActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

<activity android:name="fNordTweetActivity"/>
<activity android:name="fNordSettingsActivity"/>
<uses-library android:name="android.test.runner" />
</application>
<uses-sdk android:minSdkVersion="3" />

<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="org.fNordeingang" android:label="Tests for fNordApp" />
</manifest>
48 changes: 24 additions & 24 deletions res/layout/fnordtweet.xml
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fNordTweetLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<Button
android:id="@+id/refreshButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/refresh"/>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroller"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fNordTweetTable"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1">
</TableLayout>
</ScrollView>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fNordTweetLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<Button
android:id="@+id/refreshButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/refresh"/>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroller"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fNordTweetTable"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1">
</TableLayout>
</ScrollView>
</LinearLayout>
208 changes: 104 additions & 104 deletions res/layout/main.xml
@@ -1,104 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableRow android:gravity="center">
<TableRow>
<ImageView android:id="@+id/fNordLogo" android:src="@drawable/logo" android:layout_width="150dp" android:layout_height="150dp"></ImageView>
<TextView android:id="@+id/fNordStatusLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/fNordStatusUnknown"/>
<ImageView android:src="@drawable/unknownstatus_icon" android:id="@+id/fNordStatusIcon" android:paddingLeft="10dp" android:paddingTop="12dp"></ImageView>
</TableRow>
</TableRow>
<TextView android:gravity="center" android:text="fNordControl" android:textSize="20dp" android:textColor="@color/fNordGreen" android:textStyle="bold"/>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<ImageButton android:id="@+id/fNordTweet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/twitter_icon"/>
<ImageButton android:id="@+id/fNordDoor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/key_icon"/>
<ImageButton android:id="@+id/fNordStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/status_icon"/>
<ImageButton android:id="@+id/fNordCalendar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/calendar_icon"/>
</TableRow>
<TableRow android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/fNordTweetText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/fNordDoorText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/fNordToggleText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/fNordCalendarText"/>
</TableRow>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<ImageButton android:id="@+id/fNordPowerCtrl"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/powerctrl_icon"/>
<ImageButton android:id="@+id/fNordCash"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/cash_icon"/>
<ImageButton android:id="@+id/fNordSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/settings_icon"/>
<ImageButton android:id="@+id/fNordAbout"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/about_icon"/>
</TableRow>
<TableRow android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/fNordPowerCtrlText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/fNordCashText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/fNordSettingsText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/fNordAboutText"/>
</TableRow>
</TableLayout>
</TableLayout>
</TableLayout>

<?xml version="1.0" encoding="utf-8"?>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableRow android:gravity="center">
<TableRow>
<ImageView android:id="@+id/fNordLogo" android:src="@drawable/logo" android:layout_width="150dp" android:layout_height="150dp"></ImageView>
<TextView android:id="@+id/fNordStatusLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/fNordStatusUnknown"/>
<ImageView android:src="@drawable/unknownstatus_icon" android:id="@+id/fNordStatusIcon" android:paddingLeft="10dp" android:paddingTop="12dp"></ImageView>
</TableRow>
</TableRow>
<TextView android:gravity="center" android:text="fNordControl" android:textSize="20dp" android:textColor="@color/fNordGreen" android:textStyle="bold"/>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<ImageButton android:id="@+id/fNordTweet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/twitter_icon"/>
<ImageButton android:id="@+id/fNordDoor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/key_icon"/>
<ImageButton android:id="@+id/fNordStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/status_icon"/>
<ImageButton android:id="@+id/fNordCalendar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/calendar_icon"/>
</TableRow>
<TableRow android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/fNordTweetText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/fNordDoorText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/fNordToggleText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/fNordCalendarText"/>
</TableRow>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<ImageButton android:id="@+id/fNordPowerCtrl"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/powerctrl_icon"/>
<ImageButton android:id="@+id/fNordCash"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/cash_icon"/>
<ImageButton android:id="@+id/fNordSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/settings_icon"/>
<ImageButton android:id="@+id/fNordAbout"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/about_icon"/>
</TableRow>
<TableRow android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/fNordPowerCtrlText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/fNordCashText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/fNordSettingsText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/fNordAboutText"/>
</TableRow>
</TableLayout>
</TableLayout>
</TableLayout>

30 changes: 15 additions & 15 deletions res/layout/settings.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" android:weightSum="1">
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/fNordSettingsUserInfo" android:id="@+id/SettingsText1"></TextView>
<TextView android:text="@string/fNordSettingsUserfield" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/SettingsText2"></TextView>
<EditText android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/fNordSettingsUserfield">
<requestFocus></requestFocus>
</EditText>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/fNordSettingsPassfield" android:id="@+id/SettingsText3"></TextView>
<EditText android:layout_height="wrap_content" android:layout_width="match_parent" android:inputType="textPassword" android:id="@+id/fNordSettingsPassfield"></EditText>
<Button android:text="@string/fNordSettingsSaveButton" android:layout_height="wrap_content" android:layout_width="wrap_content" android:onClick="savefNordSettings" android:id="@+id/fNordSettingsSaveButton"></Button>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" android:weightSum="1">
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/fNordSettingsUserInfo" android:id="@+id/SettingsText1"></TextView>
<TextView android:text="@string/fNordSettingsUserfield" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/SettingsText2"></TextView>
<EditText android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/fNordSettingsUserfield">
<requestFocus></requestFocus>
</EditText>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/fNordSettingsPassfield" android:id="@+id/SettingsText3"></TextView>
<EditText android:layout_height="wrap_content" android:layout_width="match_parent" android:inputType="textPassword" android:id="@+id/fNordSettingsPassfield"></EditText>
<Button android:text="@string/fNordSettingsSaveButton" android:layout_height="wrap_content" android:layout_width="wrap_content" android:onClick="savefNordSettings" android:id="@+id/fNordSettingsSaveButton"></Button>
</LinearLayout>
30 changes: 15 additions & 15 deletions res/layout/togglestatus.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" android:weightSum="1">
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/textView1" android:text="@string/fNordStatusInfo"></TextView>
<TextView android:text="@string/fNordStatusUserfield" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/textView2"></TextView>
<EditText android:id="@+id/fNordtoggleuserfield" android:layout_height="wrap_content" android:layout_width="match_parent">
<requestFocus></requestFocus>
</EditText>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/textView3" android:text="@string/fNordStatusPassfield"></TextView>
<EditText android:id="@+id/fNordtogglepassfield" android:layout_height="wrap_content" android:layout_width="match_parent" android:inputType="textPassword"></EditText>
<Button android:text="@string/fNordStatusSendbutton" android:id="@+id/fNordtogglesendbutton" android:layout_height="wrap_content" android:layout_width="wrap_content" android:onClick="togglefNordStatus"></Button>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" android:weightSum="1">
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/textView1" android:text="@string/fNordStatusInfo"></TextView>
<TextView android:text="@string/fNordStatusUserfield" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/textView2"></TextView>
<EditText android:id="@+id/fNordtoggleuserfield" android:layout_height="wrap_content" android:layout_width="match_parent">
<requestFocus></requestFocus>
</EditText>
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/textView3" android:text="@string/fNordStatusPassfield"></TextView>
<EditText android:id="@+id/fNordtogglepassfield" android:layout_height="wrap_content" android:layout_width="match_parent" android:inputType="textPassword"></EditText>
<Button android:text="@string/fNordStatusSendbutton" android:id="@+id/fNordtogglesendbutton" android:layout_height="wrap_content" android:layout_width="wrap_content" android:onClick="togglefNordStatus"></Button>
</LinearLayout>

0 comments on commit 3fd79db

Please sign in to comment.