我在Android 4.0.4三星galaxy duos上测试我的应用程序,问题是如果我设置:
android:textIsSelectable="true"
Run Code Online (Sandbox Code Playgroud)
键盘没有出现,虽然它出现在模拟器上.有什么建议?
这就是我的EditBox
样子
<EditText
android:focusable="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textVisiblePassword|textCapWords|textMultiLine"
android:textIsSelectable="true"
android:gravity="top|left"
android:minLines="6"
android:maxLines="10"
android:minHeight="140dp"
android:hint="@string/message"
/>
<requestFocus />
Run Code Online (Sandbox Code Playgroud) 即时得到的SQL Server日期时间(2013年1月1日),形成SqlRowSet
像
while (rs.next()) {
myBean.setDateProp(rs.getString(4));
}
Run Code Online (Sandbox Code Playgroud)
的类型myBean
DateProp
是java.util.Date
,有没有办法转换(1 Jan 2013)
为java Date表示.
我试过以下代码
SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss.SSS");
Date date=new Date();
try {
date = sdf.parse("1 Jan 2013");
} catch (Exception e) {
e.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
我得到了 ParseException
严重:java.text.ParseException:无法解析的日期:"2013年1月1日"
任何方向......