我在我的Android应用程序中实现了自定义webview.如果我触摸此webview中的输入或文本区域,则软键盘不会显示.我没有在我的webview中覆盖任何touchlisteners,也没有在我的清单中更改任何内容.任何人都可以帮我弄清楚为什么键盘没有显示?
我的布局代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<nl.AEGEE.enschede.android.AEGEEWebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:progressTint="@color/aegee_blue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-6dp"
android:layout_alignParentTop="true" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud) 我想从java中的bigdecimal中提取整数部分和小数部分.
我正在使用以下代码.
BigDecimal bd = BigDecimal.valueOf(-1.30)
String textBD = bd.toPlainString();
System.out.println("length = "+textBD.length());
int radixLoc = textBD.indexOf('.');
System.out.println("Fraction "+textBD.substring(0,radixLoc)+"Cents: " + textBD.substring(radixLoc + 1, textBD.length()));
Run Code Online (Sandbox Code Playgroud)
我得到的输出为
-1和3
但我希望尾随零也从-1.30开始
输出应为-1和30