| | |
| | | <ScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_marginTop="40dp"> <!-- 留出顶部广告位的高度 --> |
| | | android:layout_marginTop="0dp"> <!-- 留出顶部广告位的高度 --> |
| | | > |
| | | |
| | | <!-- LinearLayout的作用是按照垂直或者水平方向排列其子视图--> |
| | | <!-- CardView组件是用于实现卡片式布局--> |
| | | <!-- RecyclerView 回收商视图 它使用适配器(Adapter)来管理数据的显示,--> |
| | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginEnd="30dp" |
| | | android:layout_marginEnd="70dp" |
| | | android:orientation="horizontal"> |
| | | |
| | | <com.example.firstapp.view.UnderlineTextView |
| | |
| | | |
| | | </LinearLayout> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginEnd="32dp"> |
| | | |
| | | <ImageButton |
| | | android:id="@+id/categoryButton" |
| | | android:layout_width="28dp" |
| | | android:layout_height="28dp" |
| | | android:layout_gravity="center_vertical|end" |
| | | android:layout_marginEnd="32dp" |
| | | android:background="?attr/selectableItemBackgroundBorderless" |
| | | android:contentDescription="分类设置" |
| | | android:padding="4dp" |
| | | android:scaleType="fitCenter" |
| | | android:src="@drawable/home_add" /> |
| | | |
| | | </FrameLayout> |
| | | |
| | | <ImageButton |
| | | android:id="@+id/categoryButton" |
| | | android:id="@+id/reminderButton" |
| | | android:layout_width="28dp" |
| | | android:layout_height="28dp" |
| | | android:layout_gravity="center_vertical|end" |
| | | android:background="?attr/selectableItemBackgroundBorderless" |
| | | android:contentDescription="分类设置" |
| | | android:contentDescription="提醒设置" |
| | | android:padding="4dp" |
| | | android:scaleType="fitCenter" |
| | | android:src="@drawable/home_add" /> |
| | |
| | | </LinearLayout> |
| | | </ScrollView> |
| | | |
| | | <!-- 顶部广告位 --> |
| | | <androidx.cardview.widget.CardView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <!-- <!– 顶部广告位 –>--> |
| | | <!-- <androidx.cardview.widget.CardView--> |
| | | <!-- android:layout_width="match_parent"--> |
| | | <!-- android:layout_height="wrap_content">--> |
| | | |
| | | <ImageView |
| | | android:id="@+id/adBanner" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="40dp" |
| | | android:scaleType="centerCrop" |
| | | android:src="@drawable/up_back" /> |
| | | </androidx.cardview.widget.CardView> |
| | | <!-- <ImageView--> |
| | | <!-- android:id="@+id/adBanner"--> |
| | | <!-- android:layout_width="match_parent"--> |
| | | <!-- android:layout_height="40dp"--> |
| | | <!-- android:scaleType="centerCrop"--> |
| | | <!-- android:src="@drawable/up_back" />--> |
| | | <!-- </androidx.cardview.widget.CardView>--> |
| | | |
| | | <!-- 在适当的位置添加 --> |
| | | |