add button to launch BT settings

Let's make it easier to add to the set of available BT devices from the
place where the user sees the need. TODO: update the descriptive text,
but not this release since it'll break existing localizations.
This commit is contained in:
Eric House 2016-12-30 06:35:45 -08:00
parent 74d1967f23
commit 7b30a0229a
6 changed files with 576 additions and 557 deletions

File diff suppressed because it is too large Load diff

View file

@ -10,6 +10,11 @@
style="@style/evenly_spaced_horizontal"
/>
<Button android:id="@+id/button_settings"
android:text="@string/bt_pair_settings"
style="@style/evenly_spaced_horizontal"
/>
<Button android:id="@+id/button_clear"
android:text="@string/bt_pick_clear_button"
style="@style/evenly_spaced_horizontal"

View file

@ -1864,6 +1864,8 @@
<string name="bt_pick_addall_button">Add all Paired</string>
<!-- -->
<string name="bt_pick_clear_button">Remove checked</string>
<!-- -->
<string name="bt_pair_settings">Pair More</string>
<!-- -->
<string name="invite_progress_title">Connecting...</string>

View file

@ -1607,6 +1607,8 @@
<!-- -->
<string name="bt_pick_clear_button">Evomer dekcehc</string>
<!-- -->
<string name="bt_pair_settings">Riap Erom</string>
<!-- -->
<string name="invite_progress_title">Gnitcennoc...</string>
<string name="invite_progress_fmt">Gnidnes noitativni ot Sdrowssorc no %1$s</string>
<!-- -->

View file

@ -1607,6 +1607,8 @@
<!-- -->
<string name="bt_pick_clear_button">REMOVE CHECKED</string>
<!-- -->
<string name="bt_pair_settings">PAIR MORE</string>
<!-- -->
<string name="invite_progress_title">CONNECTING...</string>
<string name="invite_progress_fmt">SENDING INVITATION TO CROSSWORDS ON %1$s</string>
<!-- -->

View file

@ -37,6 +37,7 @@ import java.util.Set;
public class BTInviteDelegate extends InviteDelegate {
private static final int[] BUTTONIDS = { R.id.button_add,
R.id.button_settings,
R.id.button_clear,
};
private Activity m_activity;
@ -82,6 +83,9 @@ public class BTInviteDelegate extends InviteDelegate {
case R.id.button_add:
scan();
break;
case R.id.button_settings:
BTService.openBTSettings( m_activity );
break;
case R.id.button_clear:
removeSelected();
clearChecked();