TabletLayout 数据库

该博客主要介绍了如何在Android应用程序中使用TableLayout,并结合数据库实现数据展示。MainActivity作为入口,使用FragmentManager和FragmentTransaction管理多个Frag_01、Frag01_item等Fragment。Frag01_item中包含了一个PullToRefreshListView,用于加载和刷新商品列表,数据通过JsonDao与SQLite数据库交互,实现了数据的存储和读取。同时,应用还集成了Universal Image Loader库进行图片加载。
摘要由CSDN通过智能技术生成

Main_activity

<?xml version="1.0" encoding="utf-8"?>

<FrameLayout
    android:id="@+id/fragment_frage"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="1">


</FrameLayout>

<RadioGroup
    android:id="@+id/radioGroup"

    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <RadioButton
        android:id="@+id/shou"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:button="@null"
        android:gravity="center"
        android:text="首页" />

    <RadioButton
        android:id="@+id/video"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:button="@null"
        android:gravity="center"
        android:text="视频" />

    <RadioButton
        android:id="@+id/my"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:button="@null"
        android:gravity="center"
        android:text="我的" />
</RadioGroup>
***TableLayout*** <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.TabLayout
    android:id="@+id/tableLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"></android.support.design.widget.TabLayout>

<android.support.v4.view.ViewPager
    android:id="@+id/viewPager_frag01"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="1"></android.support.v4.view.ViewPager>
***PullToRefresh*** <?xml version="1.0" encoding="utf-8"?>
<com.handmark.pulltorefresh.library.PullToRefreshListView
    android:id="@+id/plv"
    android:layout_width="match_parent"
    android:layout_height="match_parent"></com.handmark.pulltorefresh.library.PullToRefreshListView>
***listView*** <?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:orientation="horizontal">

    <ImageView
        android:id="@+id/imageView01_tabfrag01_list"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:src="@drawable/ic_launcher_background" />
</LinearLayout>

<LinearLayout
    android:layout
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值