From 84496b301266c40a5ccbbb1567c50a8f83f44028 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 21 Mar 2012 06:17:09 -0700 Subject: [PATCH] get phone numbers from contacts DB: factor some of BTInviteActivity into superclass that NBSInviteActivity can share and use to make their UIs similar: fetch mobile numbers from DB one-at-a-time, keep a list there, and let you check then delete or return. Rough, and doesn't save state the way BT does, but works. --- .../android/XWords4-bt/AndroidManifest.xml | 1 + .../android/XWords4-bt/res/layout/.gitignore | 1 + .../src/org/eehouse/android/xw4bt/.gitignore | 2 + .../android/XWords4/res/layout/nbsinviter.xml | 59 +++++- .../XWords4/res/layout/nbsinviter_item.xml | 28 +++ .../android/XWords4/res/values/strings.xml | 12 +- .../eehouse/android/xw4/BTInviteActivity.java | 85 ++------ .../eehouse/android/xw4/InviteActivity.java | 115 +++++++++++ .../android/xw4/NBSInviteActivity.java | 182 +++++++++++++++--- .../org/eehouse/android/xw4/NBSListItem.java | 67 +++++++ 10 files changed, 440 insertions(+), 112 deletions(-) create mode 100644 xwords4/android/XWords4/res/layout/nbsinviter_item.xml create mode 100644 xwords4/android/XWords4/src/org/eehouse/android/xw4/InviteActivity.java create mode 100644 xwords4/android/XWords4/src/org/eehouse/android/xw4/NBSListItem.java diff --git a/xwords4/android/XWords4-bt/AndroidManifest.xml b/xwords4/android/XWords4-bt/AndroidManifest.xml index 61de33b4b..92c43747f 100644 --- a/xwords4/android/XWords4-bt/AndroidManifest.xml +++ b/xwords4/android/XWords4-bt/AndroidManifest.xml @@ -35,6 +35,7 @@ + diff --git a/xwords4/android/XWords4-bt/res/layout/.gitignore b/xwords4/android/XWords4-bt/res/layout/.gitignore index a4bd45d58..bd72c5165 100644 --- a/xwords4/android/XWords4-bt/res/layout/.gitignore +++ b/xwords4/android/XWords4-bt/res/layout/.gitignore @@ -28,3 +28,4 @@ relay_game_config.xml rename_game.xml select_dialog_item.xml nbsinviter.xml +nbsinviter_item.xml diff --git a/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/.gitignore b/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/.gitignore index be7ccd75b..e3d9d9c00 100644 --- a/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/.gitignore +++ b/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/.gitignore @@ -53,3 +53,5 @@ GameNamer.java LookupActivity.java NBSInviteActivity.java NBSService.java +InviteActivity.java +NBSListItem.java diff --git a/xwords4/android/XWords4/res/layout/nbsinviter.xml b/xwords4/android/XWords4/res/layout/nbsinviter.xml index e9c3290db..cc033f4b9 100644 --- a/xwords4/android/XWords4/res/layout/nbsinviter.xml +++ b/xwords4/android/XWords4/res/layout/nbsinviter.xml @@ -12,19 +12,58 @@ android:textAppearance="?android:attr/textAppearanceMedium" /> - + + + + + + + + + + + + + + + + + + + + + + + + + + + +