Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Commit

Permalink
Added forgotten files
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Karp committed Apr 14, 2011
1 parent dc0bbef commit 53cc9aa
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 9 deletions.
Empty file added android/myAudio.mp4
Empty file.
18 changes: 18 additions & 0 deletions android/res/layout/change_preferences.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:layout_height="fill_parent">
<ListView android:id="@android:id/list"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button android:id="@+id/login_button"
android:text="Login"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignWithParentIfMissing="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:onClick="onLoginClick" />
</LinearLayout>
7 changes: 7 additions & 0 deletions android/res/xml/prefs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<EditTextPreference android:key="webapp_username"
android:title="@string/webapp_user_title" />
<EditTextPreference android:key="webapp_password"
android:title="@string/webapp_password_title" />
</PreferenceScreen>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
Expand Down Expand Up @@ -82,6 +83,8 @@ public void onCreate(Bundle savedInstanceState) {
private void setUsername()
{
username = (EditText)findViewById(R.id.username_label);
Editor editor = prefs.edit();
editor.commit();
if (prefs.getString("webapp_username", null) != null)
{
username.setText(prefs.getString("webapp_username", null));
Expand Down Expand Up @@ -112,15 +115,15 @@ public boolean onCreateOptionsMenu(Menu menu) {
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case R.id.settings_menu_button:
Log.i("Talk", "Settings Button");
Intent intent = new Intent(this, GeoCamTalkSettings.class);
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
this.startActivity(intent);
return true;
case R.id.create_message_menu_button:
Log.i("Talk", "Create Button");
return false;
//case R.id.settings_menu_button:
// Log.i("Talk", "Settings Button");
// Intent intent = new Intent(this, GeoCamTalkSettings.class);
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// this.startActivity(intent);
// return true;
//case R.id.create_message_menu_button:
// Log.i("Talk", "Create Button");
// return false;
case R.id.message_list_menu_button:
Log.i("Talk", "Message List Button");
return false;
Expand Down

0 comments on commit 53cc9aa

Please sign in to comment.