diff --git a/astrid/res/drawable/share_facebook.png b/astrid/res/drawable/share_facebook.png
new file mode 100644
index 000000000..10c47fef1
Binary files /dev/null and b/astrid/res/drawable/share_facebook.png differ
diff --git a/astrid/res/drawable/share_google.png b/astrid/res/drawable/share_google.png
new file mode 100644
index 000000000..c2baf76dd
Binary files /dev/null and b/astrid/res/drawable/share_google.png differ
diff --git a/astrid/res/drawable/share_twitter.png b/astrid/res/drawable/share_twitter.png
new file mode 100644
index 000000000..32374929d
Binary files /dev/null and b/astrid/res/drawable/share_twitter.png differ
diff --git a/astrid/res/layout-land/share_activity.xml b/astrid/res/layout-land/share_activity.xml
new file mode 100644
index 000000000..e8dec7ca4
--- /dev/null
+++ b/astrid/res/layout-land/share_activity.xml
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/astrid/res/layout/billing_activity.xml b/astrid/res/layout/billing_activity.xml
index 96c811ca5..b613a0bda 100644
--- a/astrid/res/layout/billing_activity.xml
+++ b/astrid/res/layout/billing_activity.xml
@@ -2,7 +2,7 @@
+ android:orientation="vertical"
+ android:background="#aaa" >
-
-
-
+
+
+
+
+
+
+
+
+ android:layout_height="50dip"
+ android:layout_weight="1"
+ android:gravity="center"
+ android:orientation="horizontal">
+
+
+
+
+
+
-
+ android:layout_height="50dip"
+ android:layout_weight="1"
+ android:gravity="center"
+ android:orientation="horizontal"
+ android:layout_marginBottom="50dip">
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/astrid/res/values/strings-actfm.xml b/astrid/res/values/strings-actfm.xml
index e13f9cf89..39e24c00c 100644
--- a/astrid/res/values/strings-actfm.xml
+++ b/astrid/res/values/strings-actfm.xml
@@ -323,9 +323,11 @@
Attach files, voice backups, premium support & more
- Share with Facebook
- Share with Twitter
- Share with Google+
+ Like on Facebook
+ Follow on Twitter
+ Share on Google+
+ Share the love!
+ By sharing, you\'ll help others be more productive!
diff --git a/astrid/res/values/strings-core.xml b/astrid/res/values/strings-core.xml
index 2a5a29d30..c37d5aa86 100644
--- a/astrid/res/values/strings-core.xml
+++ b/astrid/res/values/strings-core.xml
@@ -572,7 +572,7 @@
Tell others about Astrid
- Rate us or share on your favorite social network
+ Share about Astrid on your favorite social network
deactivated
diff --git a/astrid/src/com/todoroo/astrid/activity/ShareActivity.java b/astrid/src/com/todoroo/astrid/activity/ShareActivity.java
index eb0788988..2c8bc8952 100644
--- a/astrid/src/com/todoroo/astrid/activity/ShareActivity.java
+++ b/astrid/src/com/todoroo/astrid/activity/ShareActivity.java
@@ -1,23 +1,37 @@
package com.todoroo.astrid.activity;
-import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
-import android.text.SpannableString;
-import android.text.style.UnderlineSpan;
+import android.support.v4.app.ActionBar;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.view.MenuItem;
+import android.util.DisplayMetrics;
import android.view.View;
import android.view.View.OnClickListener;
+import android.widget.ImageView;
+import android.widget.ImageView.ScaleType;
+import android.widget.LinearLayout;
import android.widget.TextView;
import com.timsu.astrid.R;
+import com.todoroo.astrid.service.ThemeService;
-public class ShareActivity extends Activity {
+public class ShareActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
+ ThemeService.applyTheme(this);
super.onCreate(savedInstanceState);
+ ActionBar actionBar = getSupportActionBar();
+ actionBar.setDisplayHomeAsUpEnabled(true);
+ actionBar.setDisplayShowTitleEnabled(false);
+
+ actionBar.setDisplayShowCustomEnabled(true);
+ actionBar.setCustomView(R.layout.header_title_view);
+ ((TextView) actionBar.getCustomView().findViewById(R.id.title)).setText(R.string.share_title);
+
setContentView(R.layout.share_activity);
TextView fb = (TextView) findViewById(R.id.share_facebook);
setUpTextView(fb, getString(R.string.share_with_facebook), "http://facebook.com/weloveastrid"); //$NON-NLS-1$
@@ -28,13 +42,13 @@ public class ShareActivity extends Activity {
TextView google = (TextView) findViewById(R.id.share_google);
setUpTextView(google, getString(R.string.share_with_google), "https://plus.google.com/116404018347675245869"); //$NON-NLS-1$
+ setupText();
+
}
private void setUpTextView(TextView tv, String text, final String url) {
- SpannableString span = new SpannableString(text);
- span.setSpan(new UnderlineSpan(), 0, text.length(), 0);
- tv.setText(span);
- tv.setOnClickListener(new OnClickListener() {
+ tv.setText(text);
+ ((View) tv.getParent()).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
@@ -43,4 +57,30 @@ public class ShareActivity extends Activity {
});
}
+ private void setupText() {
+ View speechBubbleBackground = findViewById(R.id.speech_bubble_container);
+ speechBubbleBackground.setBackgroundColor(0);
+
+ DisplayMetrics metrics = getResources().getDisplayMetrics();
+ ImageView icon = (ImageView) findViewById(R.id.astridIcon);
+
+ int dim = (int) (80 * metrics.density);
+ icon.setLayoutParams(new LinearLayout.LayoutParams(dim, dim));
+ icon.setScaleType(ScaleType.FIT_CENTER);
+
+ TextView speechBubble = (TextView) findViewById(R.id.reminder_message);
+
+ speechBubble.setText(R.string.share_speech_bubble);
+ speechBubble.setTextSize(17);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ finish();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
}
diff --git a/astrid/src/com/todoroo/astrid/billing/BillingActivity.java b/astrid/src/com/todoroo/astrid/billing/BillingActivity.java
index add98b644..de9bafa82 100644
--- a/astrid/src/com/todoroo/astrid/billing/BillingActivity.java
+++ b/astrid/src/com/todoroo/astrid/billing/BillingActivity.java
@@ -11,6 +11,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.ActionBar;
import android.support.v4.app.FragmentActivity;
+import android.support.v4.view.MenuItem;
import android.text.Html;
import android.text.Spanned;
import android.util.DisplayMetrics;
@@ -274,4 +275,13 @@ public class BillingActivity extends FragmentActivity {
billingService.restoreTransactions();
}
}
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ finish();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
}