mirror of
https://github.com/fergalmoran/chrometophone.git
synced 2025-12-22 09:41:51 +00:00
Improve TOS/privacy wording.
Add a final confirmation screen. Misc wording tweaks.
This commit is contained in:
@@ -12,22 +12,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dip"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/connected_text"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/connected_text"
|
||||
android:textColor="#000000"
|
||||
android:layout_below="@+id/header"
|
||||
android:layout_margin="5dip"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_link_action_text"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/select_link_action_text"
|
||||
android:textColor="#000000"
|
||||
android:layout_below="@+id/connected_text"
|
||||
android:layout_below="@+id/header"
|
||||
android:layout_margin="5dip"/>
|
||||
|
||||
<RadioGroup
|
||||
@@ -74,7 +65,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/next"
|
||||
android:text="@string/finish"
|
||||
android:text="@string/next"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dip"
|
||||
|
||||
57
android/res/layout/setup_complete.xml
Normal file
57
android/res/layout/setup_complete.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/background_gradient">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/header"
|
||||
android:background="@drawable/header"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dip"/>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/footer"
|
||||
android:layout_below="@+id/header"
|
||||
android:layout_margin="5dip">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/setup_complete_text"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000000"/>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/footer"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="#FF707070">
|
||||
|
||||
<Button
|
||||
android:id="@+id/prev"
|
||||
android:text="@string/prev"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_btn_prev"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/finish"
|
||||
android:text="@string/finish"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -9,28 +9,34 @@
|
||||
<string name="click_next_text">Click Next to establish the connection between Chrome and this phone.</string>
|
||||
<string name="connecting_text">Connecting...</string>
|
||||
<string name="disconnecting_text">Disconnecting...</string>
|
||||
<string name="connected_text">Your phone is now connected to Chrome.</string>
|
||||
<string name="connect_error_text">Error: Unable to connect.</string>
|
||||
<string name="auth_error_text">Error: Google Apps accounts not supported.</string>
|
||||
<string name="finish">Finish</string>
|
||||
<string name="select_link_action_text">Please set your link action preference:</string>
|
||||
<string name="auto_launch_text">Automatically launch links</string>
|
||||
<string name="manual_launch_text">Let me launch links manually</string>
|
||||
<string name="setup_complete_text">
|
||||
Congratulations! Your phone is now connected and ready to receive links from Chrome. <br><br>
|
||||
If you have not already done so, you now need to install the Chrome Extension by visiting the
|
||||
Chrome Extension gallery on your desktop at<br>http://chrome.google.com/extensions/
|
||||
and searching for "Chrome to Phone".
|
||||
</string>
|
||||
<string name="connected_with_account_text">Your phone is connected to Chrome using this account:</string>
|
||||
<string name="link_action_pref_text">Link action preference:</string>
|
||||
<string name="disconnect">Disconnect phone</string>
|
||||
<string name="disconnect">Disconnect</string>
|
||||
<string name="disconnect_error_text">Error: Unable to disconnect.</string>
|
||||
<string name="help">Help</string>
|
||||
<string name="intro_text">
|
||||
Chrome to Phone lets you easily share links, maps, and selected phone numbers and text
|
||||
between your computer and your phone. <br><br>You need to install the Chrome
|
||||
browser extension on your computer to send links to your phone. The browser extension
|
||||
can be downloaded from the Chrome extension gallery at http://chrome.google.com/extensions/
|
||||
<br><br>There are just 3 simple steps to complete the set up on your phone:
|
||||
<br><br>1. Choose the Google Account to use.<br>2. Connect your Chrome and your
|
||||
phone.<br>3. Set your link action preference.<br><br>
|
||||
<a href="http://m.google.com/tos">Terms of Service</a><br><br>
|
||||
<a href="http://m.google.com/privacy">Privacy</a>
|
||||
can be downloaded from the Chrome extension gallery at http://chrome.google.com/extensions/.
|
||||
Simply search for "Chrome to Phone".<br><br>There are just 3 simple steps to complete
|
||||
the set up on your phone: <br><br>1. Choose the Google Account to use.<br>
|
||||
2. Connect your Chrome and your phone.<br>3. Set your link action preference.<br><br>
|
||||
By using this application, you agree to the <br>
|
||||
<a href="http://m.google.com/tos">Terms of Service</a> and
|
||||
<a href="http://m.google.com/privacy">Privacy Policy</a>
|
||||
</string>
|
||||
<string name="help_text">
|
||||
Chrome to Phone lets you easily share links, maps, and selected phone numbers and text
|
||||
|
||||
@@ -115,6 +115,12 @@ public class MainActivity extends Activity {
|
||||
mScreenId = screenId;
|
||||
setContentView(screenId);
|
||||
switch (screenId) {
|
||||
// Screen shown if phone is registered/connected
|
||||
case R.layout.connected: {
|
||||
setConnectedScreenContent();
|
||||
break;
|
||||
}
|
||||
// Ordered sequence of screens for setup
|
||||
case R.layout.intro: {
|
||||
setIntroScreenContent();
|
||||
break;
|
||||
@@ -127,8 +133,8 @@ public class MainActivity extends Activity {
|
||||
setSelectLaunchModeScreenContent();
|
||||
break;
|
||||
}
|
||||
case R.layout.connected: {
|
||||
setConnectedScreenContent();
|
||||
case R.layout.setup_complete: {
|
||||
setSetupCompleteScreenContent();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -203,12 +209,30 @@ public class MainActivity extends Activity {
|
||||
nextButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
storeLaunchModePreference();
|
||||
setScreenContent(R.layout.connected);
|
||||
setScreenContent(R.layout.setup_complete);
|
||||
}
|
||||
});
|
||||
|
||||
RadioButton manualButton = (RadioButton) findViewById(R.id.manual_launch);
|
||||
manualButton.setChecked(true);
|
||||
setLaunchModePreferenceUI();
|
||||
}
|
||||
|
||||
private void setSetupCompleteScreenContent() {
|
||||
TextView textView = (TextView) findViewById(R.id.setup_complete_text);
|
||||
textView.setText(Html.fromHtml(getString((R.string.setup_complete_text))));
|
||||
|
||||
Button prevButton = (Button) findViewById(R.id.prev);
|
||||
prevButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
setScreenContent(R.layout.select_launch_mode);
|
||||
}
|
||||
});
|
||||
|
||||
Button finishButton = (Button) findViewById(R.id.finish);
|
||||
finishButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setConnectedScreenContent() {
|
||||
@@ -217,13 +241,7 @@ public class MainActivity extends Activity {
|
||||
statusText.setText(getString(R.string.connected_with_account_text) + " " +
|
||||
prefs.getString("accountName", "error"));
|
||||
|
||||
if (prefs.getBoolean("launchBrowserOrMaps", false)) {
|
||||
RadioButton automaticButton = (RadioButton) findViewById(R.id.auto_launch);
|
||||
automaticButton.setChecked(true);
|
||||
} else {
|
||||
RadioButton manualButton = (RadioButton) findViewById(R.id.manual_launch);
|
||||
manualButton.setChecked(true);
|
||||
}
|
||||
setLaunchModePreferenceUI();
|
||||
|
||||
RadioGroup launchMode = (RadioGroup) findViewById(R.id.launch_mode_radio);
|
||||
launchMode.setOnCheckedChangeListener(new OnCheckedChangeListener() {
|
||||
@@ -249,6 +267,17 @@ public class MainActivity extends Activity {
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
private void setLaunchModePreferenceUI() {
|
||||
SharedPreferences prefs = Prefs.get(this);
|
||||
if (prefs.getBoolean("launchBrowserOrMaps", true)) {
|
||||
RadioButton automaticButton = (RadioButton) findViewById(R.id.auto_launch);
|
||||
automaticButton.setChecked(true);
|
||||
} else {
|
||||
RadioButton manualButton = (RadioButton) findViewById(R.id.manual_launch);
|
||||
manualButton.setChecked(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void register(String account) {
|
||||
ProgressBar progressBar = (ProgressBar) findViewById(R.id.progress_bar);
|
||||
progressBar.setVisibility(ProgressBar.VISIBLE);
|
||||
|
||||
Reference in New Issue
Block a user