|
|
@ -41,6 +41,7 @@ import android.view.View;
|
|
|
|
import android.view.View.OnTouchListener;
|
|
|
|
import android.view.View.OnTouchListener;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.view.inputmethod.InputMethodManager;
|
|
|
|
import android.view.inputmethod.InputMethodManager;
|
|
|
|
|
|
|
|
import android.widget.PopupWindow;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
|
|
|
|
|
import com.todoroo.andlib.data.Property;
|
|
|
|
import com.todoroo.andlib.data.Property;
|
|
|
@ -846,4 +847,20 @@ public class AndroidUtilities {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Dismiss a popup window (should call from main thread)
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param activity
|
|
|
|
|
|
|
|
* @param popup
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static void tryDismissPopup(Activity activity, final PopupWindow popup) {
|
|
|
|
|
|
|
|
if (popup == null)
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
popup.dismiss();
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
// window already closed or something
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|