zoukankan      html  css  js  c++  java
  • 一手遮天 Android

    项目地址 https://github.com/webabcd/AndroidDemo
    作者 webabcd

    一手遮天 Android - UI: shape 形状(矩形,圆形,环形,直线)

    示例如下:

    /ui/ShapeDemo3.java

    /**
     * shape 形状(矩形,圆形,环形,直线)
     */
    
    package com.webabcd.androiddemo.ui;
    
    import androidx.appcompat.app.AppCompatActivity;
    import android.os.Bundle;
    
    import com.webabcd.androiddemo.R;
    
    public class ShapeDemo3 extends AppCompatActivity {
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_ui_shapedemo3);
        }
    }
    
    

    /layout/activity_ui_shapedemo3.xml

    <?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">
    
        <!--矩形 shape,参见 res/drawable/shape_sample_rectangle.xml-->
        <TextView
            android:id="@+id/textView1"
            android:layout_width="200dp"
            android:layout_height="100dp"
            android:background="@drawable/shape_sample_rectangle" />
    
        <!--圆形 shape,参见 res/drawable/shape_sample_oval.xml-->
        <TextView
            android:id="@+id/textView2"
            android:layout_width="200dp"
            android:layout_height="100dp"
            android:layout_marginTop="10dp"
            android:background="@drawable/shape_sample_oval" />
    
        <!--环形 shape,参见 res/drawable/shape_sample_ring.xml-->
        <TextView
            android:id="@+id/textView3"
            android:layout_width="200dp"
            android:layout_height="100dp"
            android:layout_marginTop="10dp"
            android:background="@drawable/shape_sample_ring" />
    
        <!--直线 shape,参见 res/drawable/shape_sample_line.xml-->
        <TextView
            android:id="@+id/textView4"
            android:layout_width="200dp"
            android:layout_height="100dp"
            android:layout_marginTop="10dp"
            android:background="@drawable/shape_sample_line" />
    
    </LinearLayout>
    

    项目地址 https://github.com/webabcd/AndroidDemo
    作者 webabcd

  • 相关阅读:
    centos7 忘记mysql5.7密码
    阿里云Linux(Centos7)下搭建SVN服务器
    JAVA金额格式字符串转数值
    win10下RabbitMQ的安装和配置
    Oracle update 两表及以上关联更新,出现多值情况,不是一对一更新
    java.lang.OutOfMemoryError: java heap space
    bootstrap.min.css.map
    css 边距等常用设置
    html 标签
    数据库总结
  • 原文地址:https://www.cnblogs.com/webabcd/p/android_ui_ShapeDemo3.html
Copyright © 2011-2022 走看看