Tweak styles, remove error catching controls

pull/253/head
Alex Baker 10 years ago
parent 1522dae01b
commit 694abf3f0a

@ -292,10 +292,10 @@ public class TaskListFragment extends InjectingListFragment implements OnSortSel
private void setupRefresh(SwipeRefreshLayout layout) {
layout.setOnRefreshListener(this);
layout.setColorScheme(
R.color.refresh_color_1,
R.color.refresh_color_2,
R.color.refresh_color_3,
R.color.refresh_color_4);
R.color.importance_1,
R.color.importance_2,
R.color.importance_3,
R.color.importance_4);
}
@Override

@ -1,55 +0,0 @@
/**
* Copyright (c) 2012 Todoroo Inc
*
* See the file "LICENSE" for the full license governing this code.
*/
package com.todoroo.astrid.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.EditText;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ErrorCatchingEditText extends EditText {
private static final Logger log = LoggerFactory.getLogger(ErrorCatchingEditText.class);
public ErrorCatchingEditText(Context context, AttributeSet attrs,
int defStyle) {
super(context, attrs, defStyle);
}
public ErrorCatchingEditText(Context context, AttributeSet attrs) {
super(context, attrs);
}
public ErrorCatchingEditText(Context context) {
super(context);
}
@Override
public int getExtendedPaddingTop() {
try {
return super.getExtendedPaddingTop();
} catch (Exception e) {
log.error(e.getMessage(), e);
return 0;
}
}
@Override
public int getExtendedPaddingBottom() {
try {
return super.getExtendedPaddingBottom();
} catch (Exception e) {
log.error(e.getMessage(), e);
return 0;
}
}
}

@ -1,33 +0,0 @@
/**
* Copyright (c) 2012 Todoroo Inc
*
* See the file "LICENSE" for the full license governing this code.
*/
package com.todoroo.astrid.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.Spinner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ErrorCatchingSpinner extends Spinner {
private static final Logger log = LoggerFactory.getLogger(ErrorCatchingSpinner.class);
public ErrorCatchingSpinner(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onDetachedFromWindow() {
try {
super.onDetachedFromWindow();
} catch (IllegalArgumentException e) {
// Bad times
log.error(e.getMessage(), e);
}
}
}

@ -16,7 +16,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<com.todoroo.astrid.ui.ErrorCatchingSpinner
<Spinner
android:id="@+id/calendars"
android:layout_width="0dip"
android:layout_height="0dip"/>

@ -9,7 +9,7 @@
android:orientation="vertical"
android:layout_width="0dip"
android:layout_height="0dip">
<com.todoroo.astrid.ui.ErrorCatchingSpinner
<Spinner
android:id="@+id/hideUntil"
android:layout_width="0dip"
android:layout_height="0dip" />

@ -39,6 +39,7 @@
android:autoText="true"
android:capitalize="sentences"
android:singleLine="false"
android:textColorHint="@color/widget_text_color_light"
android:textColor="?attr/asTextColor"
android:freezesText="true" />
</LinearLayout>

@ -55,7 +55,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:text="@string/TEA_reminder_randomly" />
<com.todoroo.astrid.ui.ErrorCatchingSpinner
<Spinner
android:id="@+id/reminder_random_interval"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
@ -85,7 +85,7 @@
android:gravity="right"
android:paddingLeft="10dip"
android:textColor="?attr/asThemeTextColor" />
<com.todoroo.astrid.ui.ErrorCatchingSpinner
<Spinner
android:id="@+id/reminder_alarm"
android:layout_width="0dip"
android:layout_height="wrap_content" />

@ -37,7 +37,8 @@
</LinearLayout>
<com.todoroo.astrid.ui.ErrorCatchingSpinner android:id="@+id/repeatType"
<Spinner
android:id="@+id/repeatType"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:entries="@array/repeat_type"/>

@ -24,7 +24,7 @@
android:scaleType="center"
android:src="@drawable/btn_check" />
<com.todoroo.astrid.ui.ErrorCatchingEditText
<EditText
android:id="@+id/title"
android:cursorVisible="false"
android:layout_width="fill_parent"

@ -1,6 +1,5 @@
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/asAbBackgroundColor"
android:minHeight="?attr/actionBarSize" />
android:layout_height="?attr/actionBarSize"
android:background="?attr/asAbBackgroundColor" />

@ -25,11 +25,6 @@
<color name="task_row_bg_dark_pressed">#303030</color>
<color name="task_row_bg_white_pressed">#dde1eb</color>
<color name="refresh_color_1">#ff33b5e5</color>
<color name="refresh_color_2">#ffffbb33</color>
<color name="refresh_color_3">#ff99cc00</color>
<color name="refresh_color_4">#ffff4444</color>
<color name="drawer_background_selected">#dddddd</color>
<color name="drawer_background">#efefef</color>
</resources>

@ -59,8 +59,6 @@
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="ActionBarPopupThemeOverlay" parent="Widget.AppCompat.Light.PopupMenu" />
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">false</item>
</style>

Loading…
Cancel
Save