зеркало из https://github.com/mozilla/gecko-dev.git
Bug 767437 - Don't hard code Android Sync brand names in Send Tab activity. r=rnewman
--HG-- extra : rebase_source : 25205e5ce15e9d92fc20970b2b8819ca389fc8c7
This commit is contained in:
Родитель
f58ad725ea
Коммит
1438664748
|
@ -10,5 +10,5 @@ SYNC_RES_DRAWABLE := mobile/android/base/resources/drawable/desktop.png mobile/a
|
|||
SYNC_RES_DRAWABLE_LDPI := mobile/android/base/resources/drawable-ldpi/sync_fx_icon.png mobile/android/base/resources/drawable-ldpi/sync_ic_launcher.png
|
||||
SYNC_RES_DRAWABLE_MDPI := mobile/android/base/resources/drawable-mdpi/sync_fx_icon.png mobile/android/base/resources/drawable-mdpi/sync_ic_launcher.png
|
||||
SYNC_RES_DRAWABLE_HDPI := mobile/android/base/resources/drawable-hdpi/sync_fx_icon.png mobile/android/base/resources/drawable-hdpi/sync_ic_launcher.png
|
||||
SYNC_RES_LAYOUT := res/layout/sync_account.xml res/layout/sync_custom_popup.xml res/layout/sync_list_item.xml res/layout/sync_redirect_to_setup.xml res/layout/sync_send_tab.xml res/layout/sync_setup.xml res/layout/sync_setup_failure.xml res/layout/sync_setup_jpake_waiting.xml res/layout/sync_setup_nointernet.xml res/layout/sync_setup_pair.xml res/layout/sync_setup_success.xml res/layout/sync_stub.xml
|
||||
SYNC_RES_LAYOUT := res/layout/sync_account.xml res/layout/sync_list_item.xml res/layout/sync_redirect_to_setup.xml res/layout/sync_send_tab.xml res/layout/sync_setup.xml res/layout/sync_setup_failure.xml res/layout/sync_setup_jpake_waiting.xml res/layout/sync_setup_nointernet.xml res/layout/sync_setup_pair.xml res/layout/sync_setup_success.xml res/layout/sync_stub.xml
|
||||
SYNC_RES_VALUES := res/values/sync_styles.xml
|
||||
|
|
|
@ -86,8 +86,7 @@
|
|||
<!-- Send tab to device. -->
|
||||
<!ENTITY sync.title.send.tab.label 'Send Tab To Devices'>
|
||||
<!ENTITY sync.button.send.label 'Send'>
|
||||
<!ENTITY sync.button.setup.label 'Setup Sync'>
|
||||
<!ENTITY sync.button.continue.browsing.label 'Continue Browsing'>
|
||||
<!ENTITY sync.title.redirect.to.setup.label 'Setup Sync to Send Tabs'>
|
||||
<!ENTITY sync.text.redirect.to.setup.label 'Setup Firefox Sync on your device to send tabs to other devices.'>
|
||||
<!ENTITY sync.button.set.up.sync.label 'Set up &syncBrand.shortName.label;'>
|
||||
<!ENTITY sync.title.redirect.to.set.up.sync.label 'Set up &syncBrand.shortName.label; to send tabs'>
|
||||
<!ENTITY sync.text.redirect.to.set.up.sync.label 'Set up &syncBrand.fullName.label; on your device to send tabs to other devices.'>
|
||||
<!ENTITY sync.text.tab.sent.label 'Your tab was sent!'>
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="15dip"
|
||||
android:paddingRight="15dip" >
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@android:drawable/ic_menu_send"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dip"
|
||||
android:textSize="15sp"
|
||||
android:text="@string/sync_text_tab_sent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:background="#808080" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/continue_browsing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sync_button_continue_browsing"
|
||||
android:layout_marginTop="15dip"
|
||||
android:layout_marginBottom="10dip"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
|
@ -8,14 +8,14 @@
|
|||
style="@style/SyncTopIcon" />
|
||||
<TextView
|
||||
style="@style/SyncTextTitle"
|
||||
android:text="@string/sync_title_redirect_to_setup" />
|
||||
android:text="@string/sync_title_redirect_to_set_up_sync" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
style="@style/SyncTextItem"
|
||||
android:layout_below="@id/redirect_top"
|
||||
android:layout_above="@+id/redirect_bottom"
|
||||
android:padding="20dp"
|
||||
android:text="@string/sync_text_redirect_to_setup" />
|
||||
android:text="@string/sync_text_redirect_to_set_up_sync" />
|
||||
<LinearLayout
|
||||
android:id="@id/redirect_bottom"
|
||||
style="@style/SyncBottom"
|
||||
|
@ -26,7 +26,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:onClick="redirectToSetupHandler"
|
||||
android:text="@string/sync_button_setup" />
|
||||
android:text="@string/sync_button_set_up_sync" />
|
||||
<Button
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -15,14 +15,11 @@ import org.mozilla.gecko.sync.setup.Constants;
|
|||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.Window;
|
||||
import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class SendTabActivity extends Activity {
|
||||
public static final String LOG_TAG = "SendTabActivity";
|
||||
|
@ -111,23 +108,20 @@ public class SendTabActivity extends Activity {
|
|||
}
|
||||
}.start();
|
||||
|
||||
openDialog();
|
||||
notifyAndFinish();
|
||||
}
|
||||
|
||||
private void openDialog() {
|
||||
final Dialog dialog = new Dialog(this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.setContentView(R.layout.sync_custom_popup);
|
||||
Button button = (Button) dialog.findViewById(R.id.continue_browsing);
|
||||
button.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
/**
|
||||
* Notify the user that tabs were sent and then finish the activity.
|
||||
* <p>
|
||||
* This is a bit of a misnomer: we wrote "displayURI" commands to the local
|
||||
* command database, and they will be sent on next sync. There is no way to
|
||||
* verify that the commands were successfully received by the intended remote
|
||||
* client, so we lie and say they were sent.
|
||||
*/
|
||||
private void notifyAndFinish() {
|
||||
Toast.makeText(this, R.string.sync_text_tab_sent, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
}
|
||||
|
||||
public void enableSend(boolean shouldEnable) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
res/layout/sync_account.xml
|
||||
res/layout/sync_custom_popup.xml
|
||||
res/layout/sync_list_item.xml
|
||||
res/layout/sync_redirect_to_setup.xml
|
||||
res/layout/sync_send_tab.xml
|
||||
|
|
|
@ -79,8 +79,7 @@
|
|||
<string name="sync_new_tab">&new_tab;</string>
|
||||
<string name="sync_title_send_tab">&sync.title.send.tab.label;</string>
|
||||
<string name="sync_button_send">&sync.button.send.label;</string>
|
||||
<string name="sync_button_setup">&sync.button.setup.label;</string>
|
||||
<string name="sync_button_continue_browsing">&sync.button.continue.browsing.label;</string>
|
||||
<string name="sync_title_redirect_to_setup">&sync.title.redirect.to.setup.label;</string>
|
||||
<string name="sync_text_redirect_to_setup">&sync.text.redirect.to.setup.label;</string>
|
||||
<string name="sync_button_set_up_sync">&sync.button.set.up.sync.label;</string>
|
||||
<string name="sync_title_redirect_to_set_up_sync">&sync.title.redirect.to.set.up.sync.label;</string>
|
||||
<string name="sync_text_redirect_to_set_up_sync">&sync.text.redirect.to.set.up.sync.label;</string>
|
||||
<string name="sync_text_tab_sent">&sync.text.tab.sent.label;</string>
|
||||
|
|
Загрузка…
Ссылка в новой задаче