2023.2.22每日总结

今天主要学习了一些关于android studio的用法

match_parent 适配整个容器
wrap_parent 适配textview里面的东西
TextView Tvone= findViewById(R.id.TeV);//通过id找到xml里面的textView
Tvone.setText("xiaobiesan");//java里面设置的text会将xml里面的覆盖
android:textColor="#FF 00 00 00"
透明度 红 绿 蓝 要的话就变为FF
android:textStyle="normal" 正常
italic 斜体
bold 加粗
android:textSize="30sp"字体大小 单位sp
android:gravity="bottom" 字体位置
阴影
1. android:shadowColor:设 置阴影颜色,需要与shadowRadius-起使用
2. android:shadowRadius:设 置阴影的模糊程度,设为0.1就变成字体颜色了,建议使用3.0
3. android:shadowDx:设 置阴影在水平方向的偏移,就是水平方向阴影开始的横坐标位置
4. android:shadowDy:设置阴影在竖直方向的偏移就是竖直方向阴影开始的纵坐标位置

1. android:singleLine=“true”:内容单行显示
2. android:focusable:是否 可以获取焦点
3. android:focusableInTouchMode:用于控制视图在触摸模式下是否可以聚焦
4. android:ellipsize:在哪里 省略文本
5. android:marqueeRepeatLimit:字幕 动画重复的次数I

<?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:background="@color/purple_200"
    android:orientation="horizontal"
    >

    .<TextView
    android:id="@+id/TeV"
    android:layout_width="200dp"
    android:layout_height="200dp"
    android:textColor="#FFFF0000"
    android:textStyle="italic"
    android:textSize="50sp"
    android:gravity="bottom"

    android:shadowColor="@color/white"
    android:shadowRadius="3.0"
    android:shadowDx="10.0"
    android:shadowDy="10.0"
    android:text="有实力!" />
</LinearLayout>

 

posted @ 2023-02-22 19:40  超爱彬宝同学  阅读(23)  评论(0)    收藏  举报