5
0
mirror of https://github.com/cwinfo/envayasms.git synced 2024-12-04 12:35:32 +00:00

add help screen

This commit is contained in:
Jesse Young 2011-09-12 19:06:03 -07:00
parent da334a04c9
commit 307f354deb
13 changed files with 83 additions and 2 deletions

View File

@ -19,6 +19,9 @@
</intent-filter>
</activity>
<activity android:name=".Help" android:label="@string/app_name">
</activity>
<receiver android:name=".IncomingMessageForwarder">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />

3
icons_license.txt Executable file
View File

@ -0,0 +1,3 @@
This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
These icons can be used both commercially and for personal use, but you must always add a link to www.androidicons.com inside your software or your website. You must not resell any icons or distribute them in any other way than referring to www.androidicons.com. The Icons as such are the property of the author.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

19
res/layout/help.xml Executable file
View File

@ -0,0 +1,19 @@
<?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="#333333">
<ScrollView android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_weight="1">
<TextView
android:linksClickable="true"
android:drawablePadding="5px"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/help"
android:textColor="#FFFFFF"
android:layout_margin="5px">
</TextView>
</ScrollView>
</LinearLayout>

View File

@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/settings"
android:icon="@drawable/ic_menu_settings"
android:icon="@drawable/ic_menu_equalizer"
android:title="@string/settings" />
<item android:id="@+id/test"
android:icon="@drawable/ic_menu_link"
android:title="@string/test" />
<item android:id="@+id/check_now"
<item android:id="@+id/check_now"
android:icon="@drawable/ic_menu_tick"
android:title="@string/check_now" />
<item android:id="@+id/help"
android:icon="@drawable/ic_menu_puzzle"
android:title="@string/help" />
</menu>

View File

@ -4,4 +4,5 @@
<string name="settings">Settings</string>
<string name="test">Test Connection</string>
<string name="check_now">Check Messages</string>
<string name="help">Help</string>
</resources>

49
src/org/envaya/kalsms/Help.java Executable file
View File

@ -0,0 +1,49 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.envaya.kalsms;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.Html;
import android.view.Menu;
import android.widget.TextView;
/**
*
* @author Jesse
*/
public class Help extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.help);
TextView help = (TextView) this.findViewById(R.id.help);
String html = "<b>KalSMS</b> is a SMS gateway.<br /><br /> "
+ "It forwards all incoming SMS messages received by this phone to a server on the internet, "
+ "and also sends outgoing SMS messages from that server to other phones.<br /><br />"
+ "(See https://github.com/youngj/KalSMS/wiki "
+ "for information about setting up a server.)<br /><br />"
+ "The Settings screen allows you configure KalSMS to work with a particular server, "
+ "by entering the server URL, your phone number, "
+ "and the password assigned to your phone on the server.<br /><br />"
+ "Menu icons cc/by www.androidicons.com<br /><br />";
help.setText(Html.fromHtml(html));
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
startActivity(new Intent(this, Main.class));
return(true);
}
}

View File

@ -138,6 +138,9 @@ public class Main extends Activity {
case R.id.check_now:
app.checkOutgoingMessages();
return true;
case R.id.help:
startActivity(new Intent(this, Help.class));
return true;
case R.id.test:
app.log("Testing server connection...");
new TestTask().execute(