Android studio TabHost应用设计

2024-01-09 15:39:50

一、xml布局文件:

添加TabHost控件

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <TabHost
        android:id="@android:id/tabhost"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:layout_editor_absoluteX="140dp"
        tools:layout_editor_absoluteY="253dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            and

文章来源:https://blog.csdn.net/corlin6688/article/details/135480929
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。