Fix sort menu on pre-honeycomb devices

pull/253/head 4.7.6
Alex Baker 10 years ago
parent 53724a9daf
commit a628ea521f

@ -5,8 +5,8 @@
--> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.tasks" package="org.tasks"
android:versionName="4.7.5" android:versionName="4.7.6"
android:versionCode="346"> android:versionCode="347">
<!-- widgets, alarms, and services will break if Astrid is installed on SD card --> <!-- widgets, alarms, and services will break if Astrid is installed on SD card -->
<!-- android:installLocation="internalOnly"> --> <!-- android:installLocation="internalOnly"> -->

@ -20,6 +20,8 @@ import com.todoroo.astrid.core.SortHelper;
import org.tasks.R; import org.tasks.R;
import org.tasks.preferences.ActivityPreferences; import org.tasks.preferences.ActivityPreferences;
import static com.todoroo.andlib.utility.AndroidUtilities.atLeastHoneycomb;
/** /**
* Shows the sort / hidden dialog * Shows the sort / hidden dialog
* *
@ -87,7 +89,10 @@ public class SortSelectionActivity {
} }
}); });
AlertDialog dialog = new AlertDialog.Builder(activity, editDialogTheme). AlertDialog.Builder builder = atLeastHoneycomb()
? new AlertDialog.Builder(activity, editDialogTheme)
: new AlertDialog.Builder(activity);
AlertDialog dialog = builder.
setTitle(R.string.TLA_menu_sort). setTitle(R.string.TLA_menu_sort).
setView(body). setView(body).
setPositiveButton(R.string.SSD_save_always, setPositiveButton(R.string.SSD_save_always,

Loading…
Cancel
Save