Update MissedCallActivity theme + launch behavior

pull/281/head
Alex Baker 11 years ago
parent 97e7c44baa
commit 6a0c50705c

@ -300,7 +300,10 @@
<activity <activity
android:name="com.todoroo.astrid.calls.MissedCallActivity" android:name="com.todoroo.astrid.calls.MissedCallActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"/> android:theme="@style/Tasks.Dialog"
android:taskAffinity=""
android:excludeFromRecents="true"
android:launchMode="singleTask"/>
<activity <activity
android:name=".reminders.SnoozeActivity" android:name=".reminders.SnoozeActivity"

@ -106,13 +106,11 @@ public class MissedCallActivity extends InjectingFragmentActivity {
private TextView returnCallButton; private TextView returnCallButton;
private TextView callLaterButton; private TextView callLaterButton;
private TextView ignoreButton; private TextView ignoreButton;
private View dismissButton;
private View ignoreSettingsButton; private View ignoreSettingsButton;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
preferences.applyTranslucentDialogTheme();
startupService.onStartupApplication(this); startupService.onStartupApplication(this);
setContentView(R.layout.missed_call_activity); setContentView(R.layout.missed_call_activity);
@ -130,7 +128,6 @@ public class MissedCallActivity extends InjectingFragmentActivity {
callLaterButton = (TextView) findViewById(R.id.call_later); callLaterButton = (TextView) findViewById(R.id.call_later);
ignoreButton = (TextView) findViewById(R.id.call_ignore); ignoreButton = (TextView) findViewById(R.id.call_ignore);
ignoreSettingsButton = findViewById(R.id.ignore_settings); ignoreSettingsButton = findViewById(R.id.ignore_settings);
dismissButton = findViewById(R.id.dismiss);
((TextView) findViewById(R.id.reminder_title)) ((TextView) findViewById(R.id.reminder_title))
.setText(getString(R.string.MCA_title, .setText(getString(R.string.MCA_title,
TextUtils.isEmpty(name) ? number : name, timeString)); TextUtils.isEmpty(name) ? number : name, timeString));
@ -155,13 +152,10 @@ public class MissedCallActivity extends InjectingFragmentActivity {
callLaterButton.setBackgroundColor(color); callLaterButton.setBackgroundColor(color);
addListeners(); addListeners();
findViewById(R.id.missed_calls_speech_bubble).setVisibility(View.GONE);
} }
private void addListeners() { private void addListeners() {
ignoreButton.setOnClickListener(ignoreListener); ignoreButton.setOnClickListener(ignoreListener);
dismissButton.setOnClickListener(dismissListener);
ignoreSettingsButton.setOnClickListener(new OnClickListener() { ignoreSettingsButton.setOnClickListener(new OnClickListener() {
@Override @Override

@ -128,7 +128,7 @@ public class PhoneStateChangedReceiver extends InjectingBroadcastReceiver {
missedCallIntent.putExtra(MissedCallActivity.EXTRA_NAME, name); missedCallIntent.putExtra(MissedCallActivity.EXTRA_NAME, name);
missedCallIntent.putExtra(MissedCallActivity.EXTRA_TIME, timeString); missedCallIntent.putExtra(MissedCallActivity.EXTRA_TIME, timeString);
missedCallIntent.putExtra(MissedCallActivity.EXTRA_CONTACT_ID, contactId); missedCallIntent.putExtra(MissedCallActivity.EXTRA_CONTACT_ID, contactId);
missedCallIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK); missedCallIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(missedCallIntent); context.startActivity(missedCallIntent);
} }
} catch (Exception e) { } catch (Exception e) {

@ -8,10 +8,7 @@
android:id="@+id/reminder_root" android:id="@+id/reminder_root"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dip" android:orientation="vertical">
android:layout_marginRight="10dip"
android:orientation="vertical"
android:background="@drawable/reminder_dialog_background">
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="fill_parent"
@ -37,15 +34,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="1dip" android:layout_marginTop="1dip"
android:textSize="24sp" android:textSize="24sp"
android:textColor="@android:color/white"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/MCA_title"/> android:text="@string/MCA_title"/>
<ImageView
android:id="@+id/dismiss"
android:layout_width="25dip"
android:layout_height="25dip"
android:scaleType="fitCenter"
android:src="@drawable/ic_menu_close"/>
</LinearLayout> </LinearLayout>
@ -101,11 +91,4 @@
android:src="@drawable/single_gear"/> android:src="@drawable/single_gear"/>
</RelativeLayout> </RelativeLayout>
<FrameLayout
android:id="@+id/missed_calls_speech_bubble"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<include layout="@layout/astrid_speech_bubble" />
</FrameLayout>
</LinearLayout> </LinearLayout>

@ -112,6 +112,7 @@
<item name="colorPrimary">@color/primary</item> <item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item> <item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/primary</item> <item name="colorAccent">@color/primary</item>
<item name="asThemeTextColor">@color/dark_blue_theme_color</item>
</style> </style>
<!--================================================== General == --> <!--================================================== General == -->

Loading…
Cancel
Save