Flipped landscape and portrait detection.

pull/14/head
Tim Su 17 years ago
parent 480a54bfa1
commit 689c24ccd0

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.timsu.astrid" package="com.timsu.astrid"
android:versionCode="87" android:versionCode="88"
android:versionName="2.4.2"> android:versionName="2.4.3">
<meta-data android:name="com.a0soft.gphone.aTrackDog.webURL" <meta-data android:name="com.a0soft.gphone.aTrackDog.webURL"
android:value="http://www.weloveastrid.com" /> android:value="http://www.weloveastrid.com" />

@ -32,7 +32,7 @@ import java.util.Random;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.pm.ActivityInfo; import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.database.Cursor; import android.database.Cursor;
import android.net.Uri; import android.net.Uri;
@ -483,8 +483,8 @@ public class TaskListSubActivity extends SubActivity {
public void run() { public void run() {
// hide "add" button if we have too many tasks // hide "add" button if we have too many tasks
int threshold = HIDE_ADD_BTN_PORTRAIT; int threshold = HIDE_ADD_BTN_PORTRAIT;
if(getParent().getWindowManager().getDefaultDisplay().getOrientation() == if(getParent().getResources().getConfiguration().orientation ==
ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) Configuration.ORIENTATION_LANDSCAPE)
threshold = HIDE_ADD_BTN_LANDSCPE; threshold = HIDE_ADD_BTN_LANDSCPE;
if(taskArray.size() > threshold) if(taskArray.size() > threshold)

Loading…
Cancel
Save