代码:
haigelayout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<requestFocus
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TimePicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/timePicker" />
</LinearLayout>
运行截图:
总结:
只是大体会使用了AndroidStudio,开发App依然很艰难,忽然发现学习Android需要很多基础知识都没学好,顿时好失落。不过Android确实比Eclipse好用多了,各种各样的工具。