Skip to content

Instantly share code, notes, and snippets.

InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm.isAcceptingText()) {
writeToLog("Software Keyboard was shown");
} else {
writeToLog("Software Keyboard was not shown");
}
@ohjongin
ohjongin / holo theme color code
Created July 10, 2013 01:31
http://stackoverflow.com/questions/9947156/what-are-the-default-color-values-for-the-holo-theme-on-android-4-0 If you want the default colors of Android ICS, you just have to go to your Android SDK and look for this path: platforms\android-15\data\res\values\colors.xml. perhaps this is what you're looking for: https://github.com/android/platform…
<!-- For holo theme -->
<drawable name="screen_background_holo_light">#fff3f3f3</drawable>
<drawable name="screen_background_holo_dark">#ff000000</drawable>
<color name="background_holo_dark">#ff000000</color>
<color name="background_holo_light">#fff3f3f3</color>
<color name="bright_foreground_holo_dark">@android:color/background_holo_light</color>
<color name="bright_foreground_holo_light">@android:color/background_holo_dark</color>
<color name="bright_foreground_disabled_holo_dark">#ff4c4c4c</color>
<color name="bright_foreground_disabled_holo_light">#ffb2b2b2</color>
<color name="bright_foreground_inverse_holo_dark">@android:color/bright_foreground_holo_light</color>
@ohjongin
ohjongin / gist:5344536
Created April 9, 2013 09:57
Android 캡쳐 방지 카카오 페이지에서는 컨텐츠 유출을 막기위해 스샷을 하지 못하게 해두었네요. 어떤 방법이 있나 궁금해서 찾아봤는데 의외로 간단한 방법이. https://plus.google.com/u/0/110330998862784153023/posts/SoMFkYMafm4
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);