JDK+Android Studio,自己之前写过java语言,JDK已经安装,至于Android Studio,
①参照菜鸟教程 https://www.runoob.com/android/android-environment-setup.html
②通过官网下载,http://www.android-studio.org/ 这是中文社区的网址,
我没有在官网下载安装文件,因为我下载之后无法成功配置,中文社区的直接下就可以了,可能是电脑的问题。
简约记账本主页面开发
<?xml version="1.0" encoding="utf-8"?> <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" android:background="@color/grey_f3f3f3"> <RelativeLayout android:id="@+id/frag_record_r1_top" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white" android:padding="10dp"> <ImageView android:id="@+id/frag_record_iv" android:layout_width="30dp" android:layout_height="30dp" android:src="@mipmap/ic_qita_fs"/> <TextView android:id="@+id/frag_record_tv_type" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="其他" android:layout_toRightOf="@id/frag_record_iv" android:layout_centerVertical="true" android:textSize="16sp" android:textStyle="bold" android:layout_marginLeft="10dp"/> <EditText android:id="@+id/frag_record_et_money" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:inputType="number" android:background="@color/white"/> </RelativeLayout> <View android:id="@+id/frag_record_line1" android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@id/frag_record_r1_top" android:background="@color/grey_f3f3f3"/> <GridView android:id="@+id/frag_record_gv" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/frag_record_line1" android:background="@color/white" android:numColumns="5" android:paddingTop="5dp" android:paddingBottom="5dp"/> <!-- 自定义软键盘--> <android.inputmethodservice.KeyboardView android:id="@+id/frag_record_keyboard" android:layout_width="match_parent" android:layout_height="wrap_content" android:keyBackground="@color/grey_f3f3f3" android:keyTextColor="@color/black" android:focusable="true" android:focusableInTouchMode="true" android:paddingTop="1dp" android:layout_alignParentBottom="true" android:shadowColor="@color/white" android:shadowRadius="0.0"/> <RelativeLayout android:layout_above="@id/frag_record_keyboard" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white"> <TextView android:id="@+id/frag_record_tv_time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2021年8月29日 19:34" android:layout_alignParentRight="true" android:padding="10dp"/> <TextView android:id="@+id/frag_record_tv_beizhu" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="添加备注" android:layout_toLeftOf="@id/frag_record_tv_time" android:padding="10dp"/> </RelativeLayout> </RelativeLayout>
其他页面
<?xml version="1.0" encoding="utf-8"?> <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" android:background="@color/grey_f3f3f3"> <RelativeLayout android:id="@+id/frag_record_r1_top" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white" android:padding="10dp"> <ImageView android:id="@+id/frag_record_iv" android:layout_width="30dp" android:layout_height="30dp" android:src="@mipmap/ic_qita_fs"/> <TextView android:id="@+id/frag_record_tv_type" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="其他" android:layout_toRightOf="@id/frag_record_iv" android:layout_centerVertical="true" android:textSize="16sp" android:textStyle="bold" android:layout_marginLeft="10dp"/> <EditText android:id="@+id/frag_record_et_money" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:inputType="number" android:background="@color/white"/> </RelativeLayout> <View android:id="@+id/frag_record_line1" android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@id/frag_record_r1_top" android:background="@color/grey_f3f3f3"/> <GridView android:id="@+id/frag_record_gv" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/frag_record_line1" android:background="@color/white" android:numColumns="5" android:paddingTop="5dp" android:paddingBottom="5dp"/> <!-- 自定义软键盘--> <android.inputmethodservice.KeyboardView android:id="@+id/frag_record_keyboard" android:layout_width="match_parent" android:layout_height="wrap_content" android:keyBackground="@color/grey_f3f3f3" android:keyTextColor="@color/black" android:focusable="true" android:focusableInTouchMode="true" android:paddingTop="1dp" android:layout_alignParentBottom="true" android:shadowColor="@color/white" android:shadowRadius="0.0"/> <RelativeLayout android:layout_above="@id/frag_record_keyboard" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white"> <TextView android:id="@+id/frag_record_tv_time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2021年8月29日 19:34" android:layout_alignParentRight="true" android:padding="10dp"/> <TextView android:id="@+id/frag_record_tv_beizhu" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="添加备注" android:layout_toLeftOf="@id/frag_record_tv_time" android:padding="10dp"/> </RelativeLayout> </RelativeLayout>
为了方便使用,最好不要下载Android Studio自带的模拟器,而是自己下一个,我用的夜神,两个软件都打开就会自动关联,不需再特意关联。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。