文章目录

隔了好久都没写过笔记了,这几天就突然迷茫了,不知道学什么了,就没事去B站看了下安卓的教程,心血来潮安装了Android Studio,也不知道自己能坚持几天.挺没信心的,前端,后台,安卓不知道该怎么选择了,也许只能等到以后找到了工作才能解答我这个问题了.好了,记笔记了~

一.TextView :跑马灯效果

<TextView
    android:id="@+id/tv_one" 
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:text="@string/tv_one"
    android:gravity="center_vertical"
    android:textSize="30sp"
    android:textColor="#2C618A"
    android:shadowColor="#434343"
    android:shadowRadius="10"
    android:shadowDx="6.0"
    android:shadowDy="6.0"
    android:singleLine="true"
    android:ellipsize="marquee"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:marqueeRepeatLimit="marquee_forever"
    tools:ignore="MissingConstraints">
    <requestFocus/>
<!--    id: 属性的id,在之后的java中获取这个属性的标志-->
<!--    layout-width:属性的宽度-->
<!--    layout-height:属性的高度-->
<!--    text:里面的文字-->
<!--    gravity(重力):里面文字的位置-->
<!--    textSize:文字的大小(单位:sp)-->
<!--    textColor:文字的颜色-->
<!--    shadowColor:阴影的颜色-->
<!--    shadowRadius:阴影的模糊程度(没有单位)-->
<!--    shadowDx:阴影的X偏移量(没有单位)-->
<!--    shadowDy:阴影的Y偏移量(没有单位)-->
<!--    singleLine:是否单行显示(和Lines="1"类似,但在这个效果中不行)-->
<!--    ellipsize(省略):在哪里省略文本 marquee:选取框-->
<!--    focusable:是否可以获取焦点-->
<!--    focusableInTouchMode:控制视图在触目模式下是否可以获取焦点-->
<!--    marqueeRepeatLimit:字幕动画重复的次数-->
<!--    tools:ignore:必须要添加的东西-->
<!--    requestFocus/:获取焦点-->
</TextView>