diff --git a/res/drawable-hdpi/tap1.png b/res/drawable-hdpi/tap1.png
new file mode 100644
index 00000000000..2395c0fd593
Binary files /dev/null and b/res/drawable-hdpi/tap1.png differ
diff --git a/res/drawable-hdpi/tap2.png b/res/drawable-hdpi/tap2.png
new file mode 100644
index 00000000000..afaa24343f0
Binary files /dev/null and b/res/drawable-hdpi/tap2.png differ
diff --git a/res/drawable-hdpi/tap3.png b/res/drawable-hdpi/tap3.png
new file mode 100644
index 00000000000..a6b530e1927
Binary files /dev/null and b/res/drawable-hdpi/tap3.png differ
diff --git a/res/drawable-hdpi/tap4.png b/res/drawable-hdpi/tap4.png
new file mode 100644
index 00000000000..b07d8a6f395
Binary files /dev/null and b/res/drawable-hdpi/tap4.png differ
diff --git a/res/drawable-hdpi/tap5.png b/res/drawable-hdpi/tap5.png
new file mode 100644
index 00000000000..f1c8825b24c
Binary files /dev/null and b/res/drawable-hdpi/tap5.png differ
diff --git a/res/drawable-hdpi/tap6.png b/res/drawable-hdpi/tap6.png
new file mode 100644
index 00000000000..cc22a0be78f
Binary files /dev/null and b/res/drawable-hdpi/tap6.png differ
diff --git a/res/drawable/sharetap_anim.xml b/res/drawable/sharetap_anim.xml
new file mode 100644
index 00000000000..6aa7d4f1d28
--- /dev/null
+++ b/res/drawable/sharetap_anim.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/zeroclick.xml b/res/layout/sharetap.xml
similarity index 64%
rename from res/layout/zeroclick.xml
rename to res/layout/sharetap.xml
index d039e89ea92..fb31d83d79c 100644
--- a/res/layout/zeroclick.xml
+++ b/res/layout/sharetap.xml
@@ -30,15 +30,31 @@
android:layout_height="wrap_content"
android:orientation="vertical">
-
-
-
+
+
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b777fd7d300..821ebd44658 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1098,15 +1098,16 @@
NFC
-
- Tap to share
+
+ ShareTap
On
Off
- Zero-click sharing
- Tap to share allows you to share content from applications, just by tapping your NFC-enabled device to another.
-
+ ShareTap
+ Share content by touching two NFC-enabled devices back to back.
+ The app on the top device\'s screen sends content to the bottom device.
+ Your data is safe: nothing is shared unless both devices are on and unlocked.
Wi-Fi
diff --git a/res/xml/wireless_settings.xml b/res/xml/wireless_settings.xml
index 1e85b9a3563..d908fd7f65e 100644
--- a/res/xml/wireless_settings.xml
+++ b/res/xml/wireless_settings.xml
@@ -39,7 +39,7 @@
android:persistent="false" />
diff --git a/src/com/android/settings/nfc/ZeroClick.java b/src/com/android/settings/nfc/ShareTap.java
similarity index 78%
rename from src/com/android/settings/nfc/ZeroClick.java
rename to src/com/android/settings/nfc/ShareTap.java
index 1b59b528410..e434781d923 100644
--- a/src/com/android/settings/nfc/ZeroClick.java
+++ b/src/com/android/settings/nfc/ShareTap.java
@@ -19,20 +19,25 @@ package com.android.settings.nfc;
import android.app.ActionBar;
import android.app.Activity;
import android.app.Fragment;
+import android.graphics.drawable.AnimationDrawable;
import android.nfc.NfcAdapter;
import android.os.Bundle;
+import android.os.Handler;
import android.preference.PreferenceActivity;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
+import android.widget.ImageView;
import android.widget.Switch;
import com.android.settings.R;
-public class ZeroClick extends Fragment
+public class ShareTap extends Fragment
implements CompoundButton.OnCheckedChangeListener {
private View mView;
+ private AnimationDrawable mAnimation;
+ private ImageView mImageView;
private NfcAdapter mNfcAdapter;
private Switch mActionBarSwitch;
@@ -69,25 +74,42 @@ public class ZeroClick extends Fragment
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
- mView = inflater.inflate(R.layout.zeroclick, container, false);
+ mView = inflater.inflate(R.layout.sharetap, container, false);
initView(mView);
return mView;
}
private void initView(View view) {
- mNfcAdapter = NfcAdapter.getDefaultAdapter(getActivity());
mActionBarSwitch.setOnCheckedChangeListener(this);
mActionBarSwitch.setChecked(mNfcAdapter.isZeroClickEnabled());
}
+ @Override
+ public void onActivityCreated(Bundle savedInstanceState) {
+ super.onActivityCreated(savedInstanceState);
+
+ mImageView = (ImageView) getActivity().findViewById(R.id.sharetap_image);
+ mImageView.setBackgroundResource(R.drawable.sharetap_anim);
+ mAnimation = (AnimationDrawable) mImageView.getBackground();
+
+ }
+
@Override
public void onPause() {
super.onPause();
+ mAnimation.stop();
}
@Override
public void onResume() {
super.onResume();
+ // This is nasty: the animation can only be started once the fragment
+ // is attached to the window, and there are no callbacks for that.
+ mImageView.post(new Runnable() {
+ public void run() {
+ mAnimation.start();
+ }
+ });
}
@Override