代码也许是枯燥的,但是创造永远能让人心血澎湃! 大家好,我是小黑,一个还没秃头的程序员~~~ 近日较忙,但是也不能忘记了写文章的初心,就是为了记录自己一段时间内的学习以及改变,今日内容为Android开发中MVC的框架设计,由于最近在学习kotlin,所以本文章将使用kotlin作为开发语言,先来看看效果图
(一)先设计视图xml文件即View层,activity_wechat_official_account.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" android:orientation="vertical"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/rv_list" android:layout_width="match_parent" android:layout_height="match_parent" />LinearLayout>
列表子项item_office_account.xml代码如下:
<?xml version=&