Polish custom filter activity buttons

pull/14/head
Sam Bosley 14 years ago
parent 753ffcd801
commit 823893c729

@ -45,6 +45,7 @@ import com.todoroo.andlib.sql.Criterion;
import com.todoroo.andlib.sql.Field;
import com.todoroo.andlib.sql.Query;
import com.todoroo.andlib.sql.UnaryCriterion;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.astrid.actfm.TagSettingsActivity;
import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.api.CustomFilterCriterion;
@ -321,10 +322,8 @@ public class CustomFilterActivity extends FragmentActivity {
public void afterTextChanged(Editable s) {
if(s.length() == 0) {
saveAndView.setText(R.string.CFA_button_view);
saveAndView.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.tango_next, 0);
} else {
saveAndView.setText(R.string.CFA_button_save);
saveAndView.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.tango_save, 0);
}
}
@Override
@ -365,6 +364,14 @@ public class CustomFilterActivity extends FragmentActivity {
});
}
@Override
public void finish() {
super.finish();
if (!AstridPreferences.useTabletLayout(this))
AndroidUtilities.callOverridePendingTransition(this, R.anim.slide_right_in, R.anim.slide_right_out);
}
// --- listeners and action events
@Override

@ -32,7 +32,8 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:gravity="left"
android:paddingLeft="5dip"
android:text="@string/CFA_help"
style="@style/TextAppearance"/>
@ -48,17 +49,25 @@
<Button android:id="@+id/add"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="10dip"
android:paddingBottom="10dip"
android:layout_marginRight="3dip"
android:layout_weight="1"
android:drawableLeft="@drawable/tango_add"
android:text="@string/CFA_button_add" />
android:text="@string/CFA_button_add"
android:background="?attr/asThemeTextColor"
android:textColor="?attr/asContentBackground" />
<Button
android:id="@+id/saveAndView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="10dip"
android:paddingBottom="10dip"
android:layout_marginLeft="3dip"
android:text="@string/CFA_button_view"
android:drawableRight="@drawable/tango_next" />
android:background="?attr/asThemeTextColor"
android:textColor="?attr/asContentBackground" />
</LinearLayout>

Loading…
Cancel
Save