Android studio GridView应用设计

一、xml布局文件设计:

<GridView
    android:id="@+id/gridView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:layout_editor_absoluteX="1dp"
    tools:layout_editor_absoluteY="1dp"
    android:numColumns="3" />

二、创建子布局:

<?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"
    android:padding="5dp">

    <ImageView
        android:id="@+id/icon"
        android:layout_width="match_parent"
        android:layout_height="64dp"
        android:layout_centerInParent="true"
        android:src=

相关推荐

  1. Android studio SeekBar应用设计

    2024-01-13 21:44:02       35 阅读
  2. Android studio TabHost应用设计

    2024-01-13 21:44:02       36 阅读
  3. Android studio ListView应用设计

    2024-01-13 21:44:02       32 阅读
  4. Android studio GridView应用设计

    2024-01-13 21:44:02       40 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-13 21:44:02       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-13 21:44:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-13 21:44:02       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-13 21:44:02       20 阅读

热门阅读

  1. C++ 并发编程 | 并发世界

    2024-01-13 21:44:02       42 阅读
  2. QT基础篇(4)QT5基本对话框

    2024-01-13 21:44:02       31 阅读
  3. C++ (MFC) 单程序运行(防止多开程序)

    2024-01-13 21:44:02       47 阅读
  4. go如何终止多个for select循环嵌套

    2024-01-13 21:44:02       31 阅读