今天是我写的第一篇博客,不觉得会写的很好,主要是来练练手的!
在深圳XX程序员学习了近三个月了,这几天开始做项目了才知道,之前老师一直说的那句话:”能听懂不一定能看懂;能看懂不一定能写出来”,现在一想这真是太有道理了!
从星期天开始班里分小组开发一个仿京东的程序,看老师演示的时候觉得好简单(毕竟不可能把里面的逻辑都实现)!but等到真正开发的时候就有点懵逼了,好像之前学的东西都从我脑袋中飞走了,浑然不知该怎么下手,眼睁睁的在那里干瞪眼两天,终于在网上找到一个类似我开发的模块,十万火急的就copy过来了(我应该算不上一个合格的cv程序员)!
惊险告一段落,晚上想着回顾一下之前的知识,于是又把listview加载多种不同的布局写了一遍,这才豁然开朗,原来我之前都是没有灵魂的般的在听课,好了废话也不多说了,let`s go!
布局文件很简单,但是这第一篇博客还是copy一下!
这个是主界面的布局
<?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:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.lhc.frank.customview.MainActivity">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/select_listview"
></ListView>
</RelativeLayout>
第一个需要显示的布局文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:text=