本文实例为大家分享了ListView实现网上订餐首页的具体代码,供大家参考,具体内容如下
效果图
布局文件
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".SimpleAdapterActivity">
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_margin="10dp">
title.xml
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/title_style">
设置福利图标的样式
android:layout_width="match_parent"
android:layout_height="match_parent">
点击listview后跳转的页面布局
android:layout_width="match_parent"
android:layout_height="400dp"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_margin="5dp"
tools:context=".FirstActivity">
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_margin="10dp">
/>
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_margin="10dp">
/>
java文件
public class SimpleAdapterActivity extends AppCompatActivity {
private ListView listView;
private List
public class FirstActivity extends AppCompatActivity {
private Button btnjoin;
private ListView listView;
private List
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。