More styling to the billing activity

pull/14/head
Sam Bosley 13 years ago
parent d90f18383d
commit 086bc944da

@ -8,13 +8,11 @@
<LinearLayout
android:id="@+id/premium_description_holder"
android:layout_width="wrap_content"
android:layout_height="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingRight="5dip"
android:paddingLeft="5dip"
android:paddingTop="15dip"
android:paddingBottom="70dip" >
android:paddingTop="10dip" >
<TextView
android:id="@+id/premium_description_title"
@ -24,8 +22,8 @@
android:gravity="left"
android:text="@string/premium_description_header"
android:textColor="#404040"
android:paddingLeft="15dip"
android:textSize="24dip"
android:paddingLeft="20dip"
android:textSize="20dip"
android:textStyle="bold" />
<WebView
android:id="@+id/premium_bullets"

@ -82,14 +82,15 @@
<string name="premium_billing_title">Astrid Premium</string>
<string name="premium_buy_month">1 Month</string>
<string name="premium_buy_year">1 Year</string>
<string name="premium_description_header">Do more with Astrid Premium!</string>
<string name="premium_description_1">Attach files to to-dos (pdfs, doc, ppt…)</string>
<string name="premium_description_header">Do more with premium!</string>
<string name="premium_description_1">Attach files to to-dos &lt;br&gt;(pdfs, doc, ppt…)</string>
<string name="premium_description_2">Syncs files with astrid.com</string>
<string name="premium_description_3">Turn emails with attachments into tasks</string>
<string name="premium_description_3">Add attachments via email</string>
<string name="premium_description_4">Save voice notes as audio files</string>
<string name="premium_description_5">Preview upcoming features</string>
<string name="premium_description_6">Support the Astrid Team!</string>
<string name="premium_speech_bubble">Premium will power up your productivity! Order one year and save 25%!</string>
<string name="premium_speech_bubble_1">Premium will power up your productivity!</string>
<string name="premium_speech_bubble_2">Order one year and save 25%!</string>
<string name="premium_already_subscribed">You are already subscribed to Astrid Premium!</string>
<string name="premium_login_prompt">You need to have an Astrid.com account in order to subscribe to premium. Please log in or sign up.</string>
<string name="premium_success">Thanks for subscribing to Astrid Premium!</string>

@ -11,6 +11,8 @@ import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.ActionBar;
import android.support.v4.app.FragmentActivity;
import android.text.Html;
import android.text.Spanned;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.View;
@ -171,8 +173,13 @@ public class BillingActivity extends FragmentActivity {
StringBuilder builder = new StringBuilder("<html><body><ul>");
for(int item : bullets)
builder.append("<li><font style='color=#404040; font-size: 18px'>").append(getString(item)).append("</font></li>\n");
for (int i = 0; i < bullets.length; i++) {
builder.append("<li><font style='color=#404040; font-size: 18px'>").append(getString(bullets[i]));
if (i != bullets.length - 1)
builder.append("<br><br>");
builder.append("</font></li>\n");
}
builder.append("</ul></body></html>");
WebView list = (WebView) findViewById(R.id.premium_bullets);
@ -190,7 +197,15 @@ public class BillingActivity extends FragmentActivity {
icon.setScaleType(ScaleType.FIT_CENTER);
TextView speechBubble = (TextView) findViewById(R.id.reminder_message);
speechBubble.setText(R.string.premium_speech_bubble);
// Construct speech bubble text
String html = String.format("%s <font color=\"#%s\">%s</font>",
getString(R.string.premium_speech_bubble_1),
Integer.toHexString(getResources().getColor(R.color.red_theme_color) - 0xff000000),
getString(R.string.premium_speech_bubble_2));
Spanned spanned = Html.fromHtml(html);
speechBubble.setText(spanned);
speechBubble.setTextSize(17);
}
/**

Loading…
Cancel
Save