fixes for android4

This commit is contained in:
Sergey Solovyev
2011-12-27 11:28:57 +04:00
parent 555b2cdd61
commit 538e0933ca
5 changed files with 20 additions and 7 deletions

View File

@@ -50,16 +50,19 @@ public class CalculatorEditor extends EditText implements SharedPreferences.OnSh
@Override
public boolean onCheckIsTextEditor() {
// fix for missing cursor in android
// Main goal of this implementation is to hide android soft keyboard from appearing when working with text input
// todo serso: refactor
// NOTE: do not copy or reuse code below, it's completely SHIT!!!
if ( Build.VERSION.SDK_INT >= 11 ) {
// cannot be applied as in that case soft keyboard appears on application start
// fix for missing cursor in android 3 and higher
for (StackTraceElement stackTraceElement : CollectionsUtils.asList(Thread.currentThread().getStackTrace())) {
if ( "isCursorVisible".equals(stackTraceElement.getMethodName()) ) {
return true;
}
}
return false;
//return true;
} else {
return false;
}

View File

@@ -64,7 +64,7 @@ public class CalculatorReleaseNotesActivity extends Activity {
first = false;
}
releaseNotesForVersion = releaseNotesForVersion.replace("\n", "<br/>");
result.append("<b>").append(releaseNotesForTitle).append(i).append("</b><br/>");
result.append("<b>").append(releaseNotesForTitle).append(i).append("</b><br/><br/>");
result.append(releaseNotesForVersion);
}
}