android TextView下划线,圆角边框,数逐字显示,虚线边框, 渐变色背景框, 阴影背景框

 长方形

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"android:shape="rectangle"><size android:width="10dp" android:height="5dp" /><corners android:radius="2dp"/><solid android:color="@color/app_white" />
</shape>

#cccccc#E1E1E1#e5e5e5#dddddd#F5F5F5#F8F8F8#FAFAFA#E6E6E6

xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"

<?xml version="1.0" encoding="utf-8"?>

 阴影背景框

内View 样式drawable

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"android:shape="rectangle"><solid android:color="@color/white" /><corners android:topLeftRadius="7dp" android:topRightRadius="7dp"android:bottomLeftRadius="7dp" android:bottomRightRadius="7dp" />
</shape>

样式文件

<declare-styleable name="ShadowContainer"><attr name="containerShadowColor" format="color"/><attr name="containerShadowRadius" format="dimension"/><attr name="containerDeltaLength" format="dimension"/><attr name="containerCornerRadius" format="dimension"/><attr name="deltaX" format="dimension"/><attr name="deltaY" format="dimension"/><attr name="enable" format="boolean"/>
</declare-styleable>

自定义阴影View

/**阴影效果*/
public class ShadowContainerAllEdge extends ViewGroup {private final float deltaLength;private final float cornerRadius;private final Paint mShadowPaint;private boolean drawShadow;public ShadowContainerAllEdge(Context context) {this(context, null);}public ShadowContainerAllEdge(Context context, AttributeSet attrs) {this(context, attrs, 0);}public ShadowContainerAllEdge(Context context, AttributeSet attrs, int defStyleAttr) {super(context, attrs, defStyleAttr);TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ShadowContainer);int shadowColor = a.getColor(R.styleable.ShadowContainer_containerShadowColor, Color.RED);
//        int shadowColor = Color.RED;float shadowRadius = a.getDimension(R.styleable.ShadowContainer_containerShadowRadius, 0);deltaLength = a.getDimension(R.styleable.ShadowContainer_containerDeltaLength, 0);cornerRadius = a.getDimension(R.styleable.ShadowContainer_containerCornerRadius, 0);float dx = a.getDimension(R.styleable.ShadowContainer_deltaX, 0);float dy = a.getDimension(R.styleable.ShadowContainer_deltaY, 0);drawShadow = a.getBoolean(R.styleable.ShadowContainer_enable, true);a.recycle();mShadowPaint = new Paint();mShadowPaint.setStyle(Paint.Style.FILL);mShadowPaint.setAntiAlias(true);mShadowPaint.setColor(shadowColor);mShadowPaint.setShadowLayer(shadowRadius, dx, dy, shadowColor);}@Overrideprotected void onFinishInflate() {super.onFinishInflate();}@Overrideprotected void dispatchDraw(Canvas canvas) {if (drawShadow) {if (getLayerType() != LAYER_TYPE_SOFTWARE) {setLayerType(LAYER_TYPE_SOFTWARE, null);}View child = getChildAt(0);int left = child.getLeft();int top = child.getTop();int right = child.getRight();int bottom = child.getBottom();if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {canvas.drawRoundRect(left, top, right, bottom, cornerRadius, cornerRadius, mShadowPaint);} else {Path drawablePath = new Path();drawablePath.moveTo(left + cornerRadius, top);drawablePath.arcTo(new RectF(left, top, left + 2 * cornerRadius, top + 2 * cornerRadius), -90, -90, false);drawablePath.lineTo(left, bottom - cornerRadius);drawablePath.arcTo(new RectF(left, bottom - 2 * cornerRadius, left + 2 * cornerRadius, bottom), 180, -90, false);drawablePath.lineTo(right - cornerRadius, bottom);drawablePath.arcTo(new RectF(right - 2 * cornerRadius, bottom - 2 * cornerRadius, right, bottom), 90, -90, false);drawablePath.lineTo(right, top + cornerRadius);drawablePath.arcTo(new RectF(right - 2 * cornerRadius, top, right, top + 2 * cornerRadius), 0, -90, false);drawablePath.close();canvas.drawPath(drawablePath, mShadowPaint);}}super.dispatchDraw(canvas);}public void setDrawShadow(boolean drawShadow){if (this.drawShadow == drawShadow){return;}this.drawShadow = drawShadow;postInvalidate();}@Overrideprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {super.onMeasure(widthMeasureSpec, heightMeasureSpec);if (getChildCount() != 1) {throw new IllegalStateException("子View只能有一个");}int measuredWidth = getMeasuredWidth();int measuredHeight = getMeasuredHeight();int widthMode = MeasureSpec.getMode(widthMeasureSpec);int heightMode = MeasureSpec.getMode(heightMeasureSpec);View child = getChildAt(0);LayoutParams layoutParams = (LayoutParams) child.getLayoutParams();int childBottomMargin = (int) (Math.max(deltaLength, layoutParams.bottomMargin) + 1);int childLeftMargin = (int) (Math.max(deltaLength, layoutParams.leftMargin) + 1);int childRightMargin = (int) (Math.max(deltaLength, layoutParams.rightMargin) + 1);int childTopMargin = (int) (Math.max(deltaLength, layoutParams.topMargin) + 1);int widthMeasureSpecMode;int widthMeasureSpecSize;int heightMeasureSpecMode;int heightMeasureSpecSize;if (widthMode == MeasureSpec.UNSPECIFIED){widthMeasureSpecMode = MeasureSpec.UNSPECIFIED;widthMeasureSpecSize = MeasureSpec.getSize(widthMeasureSpec);}else {if (layoutParams.width == LayoutParams.MATCH_PARENT) {widthMeasureSpecMode = MeasureSpec.EXACTLY;widthMeasureSpecSize = measuredWidth - childLeftMargin - childRightMargin;} else if (LayoutParams.WRAP_CONTENT == layoutParams.width) {widthMeasureSpecMode = MeasureSpec.AT_MOST;widthMeasureSpecSize = measuredWidth - childLeftMargin - childRightMargin;} else {widthMeasureSpecMode = MeasureSpec.EXACTLY;widthMeasureSpecSize = layoutParams.width;}}if (heightMode == MeasureSpec.UNSPECIFIED){heightMeasureSpecMode = MeasureSpec.UNSPECIFIED;heightMeasureSpecSize = MeasureSpec.getSize(heightMeasureSpec);}else {if (layoutParams.height == LayoutParams.MATCH_PARENT) {heightMeasureSpecMode = MeasureSpec.EXACTLY;heightMeasureSpecSize = measuredHeight - childBottomMargin - childTopMargin;} else if (LayoutParams.WRAP_CONTENT == layoutParams.height) {heightMeasureSpecMode = MeasureSpec.AT_MOST;heightMeasureSpecSize = measuredHeight - childBottomMargin - childTopMargin;} else {heightMeasureSpecMode = MeasureSpec.EXACTLY;heightMeasureSpecSize = layoutParams.height;}}measureChild(child, MeasureSpec.makeMeasureSpec(widthMeasureSpecSize, widthMeasureSpecMode), MeasureSpec.makeMeasureSpec(heightMeasureSpecSize, heightMeasureSpecMode));int parentWidthMeasureSpec = MeasureSpec.getMode(widthMeasureSpec);int parentHeightMeasureSpec = MeasureSpec.getMode(heightMeasureSpec);int height = measuredHeight;int width = measuredWidth;int childHeight = child.getMeasuredHeight();int childWidth = child.getMeasuredWidth();if (parentHeightMeasureSpec == MeasureSpec.AT_MOST){height = childHeight + childTopMargin + childBottomMargin;}if (parentWidthMeasureSpec == MeasureSpec.AT_MOST){width = childWidth + childRightMargin + childLeftMargin;}if (width < childWidth + 2 * deltaLength){width = (int) (childWidth + 2 * deltaLength);}if (height < childHeight + 2 * deltaLength){height = (int) (childHeight + 2 * deltaLength);}if (height != measuredHeight || width != measuredWidth){setMeasuredDimension(width, height);}}static class LayoutParams extends MarginLayoutParams{public LayoutParams(Context c, AttributeSet attrs) {super(c, attrs);}public LayoutParams(int width, int height) {super(width, height);}public LayoutParams(MarginLayoutParams source) {super(source);}public LayoutParams(ViewGroup.LayoutParams source) {super(source);}}@Overrideprotected ViewGroup.LayoutParams generateDefaultLayoutParams() {return new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);}@Overrideprotected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p) {return new LayoutParams(p);}@Overridepublic ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs) {return new LayoutParams(getContext(), attrs);}@Overrideprotected void onLayout(boolean changed, int l, int t, int r, int b) {View child = getChildAt(0);int measuredWidth = getMeasuredWidth();int measuredHeight = getMeasuredHeight();int childMeasureWidth = child.getMeasuredWidth();int childMeasureHeight = child.getMeasuredHeight();child.layout((measuredWidth - childMeasureWidth) / 2, (measuredHeight - childMeasureHeight) / 2, (measuredWidth + childMeasureWidth) / 2, (measuredHeight + childMeasureHeight) / 2);}
}

 调用

app:containerDeltaLength——外围距离

app:containerCornerRadius——内内容半径

app:containerShadowRadius——阴影半径

<com.dlc.observabletest.ShadowContainerAllEdgeandroid:layout_width="200dp"android:layout_height="100dp"app:containerDeltaLength="2dp"app:containerShadowColor="#4D00C8D2"app:containerCornerRadius="7dp"app:containerShadowRadius="2dp"><TextViewandroid:layout_width="match_parent"android:layout_height="match_parent"android:background="@drawable/shape_radius_14_white"android:text="aabb"></TextView></com.dlc.observabletest.ShadowContainerAllEdge>

设置上下圆角

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"><solid android:color="@color/white" /><stroke android:width="1dp" android:color="@color/white"/><corners   android:topLeftRadius="10dp"android:topRightRadius="10dp"android:bottomRightRadius="0dp"android:bottomLeftRadius="0dp" /></shape>

中空框

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"><stroke android:width="@dimen/normal_1dp" android:color="@color/color_EF611E"/><corners android:radius="@dimen/normal_5dp"/></shape>

 渐变色背景框

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"><corners android:radius="2pt" /><paddingandroid:bottom="0dp"android:left="0dp"android:right="0dp"android:top="0dp" /><gradientandroid:angle="180"android:endColor="@color/top_endc"android:startColor="@color/top_startc"android:type="linear"/></shape>

虚线边框

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"><solid android:color="#ffffff" /><corners android:radius="10dp" /><strokeandroid:width="1dp"android:color="@color/color_linexulv"android:dashGap="3pt"android:dashWidth="6pt"/><paddingandroid:bottom="0dp"android:left="0dp"android:right="0dp"android:top="0dp" /></shape>

drawable文件下创建 border_red.xml样式
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"><solid android:color="#ffffff" /><corners android:radius="30dp" /><strokeandroid:width="1dp"android:color="#c416ff" /><paddingandroid:bottom="5dp"android:left="10dp"android:right="10dp"android:top="5dp" /></shape>

选中样式

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"><item android:state_pressed="true"><shape android:shape="rectangle"><solid android:color="#56eccb" /><corners android:radius="@dimen/normal_10dp" /></shape></item><item android:state_pressed="false"><shape android:shape="rectangle"><solid android:color="@color/public_color" /><corners android:radius="@dimen/normal_10dp" /></shape></item>
</selector>

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"><corners android:radius="40dp"/><solid android:color="@color/item_gank_grey"/>
</shape>

引用

<TextViewandroid:id="@+id/item_gank_who"android:layout_width="50dp"android:layout_height="16dp"android:text="推荐"android:textColor="@color/item_gank_white"android:textSize="12sp"android:gravity="center"android:background="@drawable/border_red"/>

无背景

holder.status.setBackgroundDrawable(null);

固定在顶部

android:layout_alignParentTop="true"

边框颜色

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"><strokeandroid:color="@color/company_info_blue"android:width="1dp"/><solid android:color="@color/white"/><corners android:radius="5dp"/>
</shape>

人民币  

获取URL键值

final String epId = TextUtil.URLRequest(link).get("param");

public class TextUtil {public static boolean isEmpty(String str) {return TextUtils.isEmpty(str) || "null".equals(str);}//判断是否有表情public static boolean isEmojiCharacter(char codePoint) {return !(((codePoint == 0x0) || (codePoint == 0x9) || (codePoint == 0xA) || (codePoint == 0xD) || ((codePoint >= 0x20) && codePoint <= 0xD7FF)) || ((codePoint >= 0xE000) && (codePoint <= 0xFFFD)) || ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF)));}// 设置下划线public static TextView setBelowLine(TextView textView) {textView.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG); // 下划线return textView;}// 设置斜体字public static SpannableString setSpanWord(String word) {SpannableString sp = new SpannableString(word);// 设置斜体sp.setSpan(new StyleSpan(android.graphics.Typeface.BOLD_ITALIC), 0,word.length(), Spannable.SPAN_EXCLUSIVE_INCLUSIVE);return sp;}// 设置字体颜色public static SpannableStringBuilder setStringColor(String word,String changePart, String color) {char[] c = changePart.toCharArray();int lastIndex = c.length - 1;int start = word.indexOf(c[0]);int end = start + lastIndex + 1;SpannableStringBuilder style = new SpannableStringBuilder(word);style.setSpan(new ForegroundColorSpan(Color.parseColor(color)), start,end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);return style;}/*** 格式化要显示的字符串,做非空判断* 该方法主要做用在ui显示这一块,用于更好地显示字符,防止null字符出现和空指针** @param str 要验证的字符串* @return 参数若为空或“”或null字符串,则返回空,反之直接返回原有值*/public static String formatString(String str) {if (TextUtils.isEmpty(str))return null;if ("null".equalsIgnoreCase(str))return null;return str;}/*** 去掉url中的路径,留下请求参数部分* @param strURL url地址* @return url请求参数部分*/private static String TruncateUrlPage(String strURL){String strAllParam=null;String[] arrSplit=null;strURL=strURL.trim().toLowerCase();arrSplit=strURL.split("[?]");if(strURL.length()>1){if(arrSplit.length>1){if(arrSplit[1]!=null){strAllParam=arrSplit[1];}}}return strAllParam;}/*** 解析出url参数中的键值对* 如 "index.jsp?Action=del&id=123",解析出Action:del,id:123存入map中* @param URL  url地址* @return  url请求参数部分*/public static Map<String, String> URLRequest(String URL){Map<String, String> mapRequest = new HashMap<String, String>();String[] arrSplit=null;String strUrlParam=TruncateUrlPage(URL);if(strUrlParam==null){return mapRequest;}//每个键值为一组 www.2cto.comarrSplit=strUrlParam.split("[&]");for(String strSplit:arrSplit){String[] arrSplitEqual=null;arrSplitEqual= strSplit.split("[=]");//解析出键值if(arrSplitEqual.length>1){//正确解析mapRequest.put(arrSplitEqual[0], arrSplitEqual[1]);}else{if(arrSplitEqual[0]!=""){//只有参数没有值,不加入mapRequest.put(arrSplitEqual[0], "");}}}return mapRequest;}
}

逐字显示

/*** 作者:created by meixi* 邮箱:15913707499@163.com* 日期:2019/4/23 11*/public class FadeInTextView extends TextView {private Rect textRect = new Rect();private StringBuffer stringBuffer = new StringBuffer();private String[] arr;private int textCount;private int currentIndex = -1;/*** 每个字出现的时间*/private int duration = 300;private ValueAnimator textAnimation;private TextAnimationListener textAnimationListener;public FadeInTextView setTextAnimationListener(TextAnimationListener textAnimationListener) {this.textAnimationListener = textAnimationListener;return this;}public FadeInTextView(Context context) {this(context, null);}public FadeInTextView(Context context, @Nullable AttributeSet attrs) {super(context, attrs);}@Overrideprotected void onDraw(final Canvas canvas) {super.onDraw(canvas);
//        使用setText代替重绘就不用自己去绘制text了
//        if (stringBuffer != null) {
//            drawText(canvas, stringBuffer.toString());
//        }}/*** 绘制文字** @param canvas 画布*/private void drawText(Canvas canvas, String textString) {textRect.left = getPaddingLeft();textRect.top = getPaddingTop();textRect.right = getWidth() - getPaddingRight();textRect.bottom = getHeight() - getPaddingBottom();Paint.FontMetricsInt fontMetrics = getPaint().getFontMetricsInt();int baseline = (textRect.bottom + textRect.top - fontMetrics.bottom - fontMetrics.top) / 2;//文字绘制到整个布局的中心位置canvas.drawText(textString, getPaddingLeft(), baseline, getPaint());}/*** 文字逐个显示动画  通过插值的方式改变数据源*/private void initAnimation() {//从0到textCount - 1  是设置从第一个字到最后一个字的变化因子textAnimation = ValueAnimator.ofInt(0, textCount - 1);//执行总时间就是每个字的时间乘以字数textAnimation.setDuration(textCount * duration);//匀速显示文字textAnimation.setInterpolator(new LinearInterpolator());textAnimation.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {@Overridepublic void onAnimationUpdate(ValueAnimator valueAnimator) {int index = (int) valueAnimator.getAnimatedValue();//过滤去重,保证每个字只重绘一次if (currentIndex != index) {stringBuffer.append(arr[index]);currentIndex = index;//所有文字都显示完成之后进度回调结束动画if (currentIndex == (textCount - 1)) {if (textAnimationListener != null) {textAnimationListener.animationFinish();}}//新思路的做法setText(stringBuffer.toString());/*** 之前的做法刷新重绘text,需要自己控制文字的绘制,* 看到网友的评论开拓了思路,既然是直接集成TextView* 就可以直接使用setText()方法进行设置值了*///invalidate();老思路的做法}}});}/*** 设置逐渐显示的字符串** @param textString* @return*/public FadeInTextView setTextString(String textString) {if (textString != null) {//总字数textCount = textString.length();//存放单个字的数组arr = new String[textCount];for (int i = 0; i < textCount; i++) {arr[i] = textString.substring(i, i + 1);}initAnimation();}return this;}/*** 开启动画** @return*/public FadeInTextView startFadeInAnimation() {if (textAnimation != null) {stringBuffer.setLength(0);currentIndex = -1;textAnimation.start();}return this;}/*** 停止动画** @return*/public FadeInTextView stopFadeInAnimation() {if (textAnimation != null) {textAnimation.end();}return this;}/*** 回调接口*/public interface TextAnimationListener {void animationFinish();}
}

fadeInTextView = (FadeInTextView)findViewById(R.id.fadete);
fadeInTextView.setTextString("自定义view实现字符串逐字显示!");
fadeInTextView.startFadeInAnimation();

view边框控制:https://blog.csdn.net/meixi_android/article/details/77374362

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/415929.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

vscode 遇到的迷之bug nvm is not compatible with the npm config prefix

mac升级系统后&#xff0c;发现每次打开vscode&#xff0c;在命令栏TERMINAL中都会出现不识别npm&#xff0c;把vscode重新安装后&#xff0c;还是不行。 最后&#xff0c;在万能的git上找到了解决方法&#xff0c;之前出错的原因使因为我曾经使用brew install node安装过nod…

bsgs(Baby Steps Giant Steps)算法

BSGS算法&#xff08;Baby Steps Giant Steps算法&#xff0c;大步小步算法&#xff0c;北上广深算法&#xff0c;拔山盖世算法&#xff09; 适用问题 对于式子&#xff1a; $$x^yz(mod_p)$$ 已知x&#xff0c;z&#xff0c;p&#xff0c;p为质数&#xff1b; 求解一个最小非负…

2003服务器远程桌面连不上解决办法

一直都是用XP 连2003服务器&#xff0c;以前从未出现过问题&#xff0c;早二天突然出现提示&#xff1a;什么许可还有多少天到期&#xff0c;也没当回事&#xff0c;想想以前都这样&#xff0c;也没出过什么问题啊&#xff0c;于是就有了今天的一幕&#xff0c;打开远程桌面连接…

vue-cli webpack 打包报错:Unexpected token: punc (()

本来项目完美打包&#xff0c;后来我增加了一个插件vue-ionicons&#xff0c;打包build就是报错&#xff1a; ERROR in static/js/8.017e5cf2d2f1a552890d.js from UglifyJs Unexpected token: punc (() [./node_modules/vue-ionicons/dist/ionicons-mixin.js:7,0][static/js/…

Head First设计模式之备忘录模式

一、定义 不破坏封装性的前提下&#xff0c;捕获一个对象的内部状态&#xff0c;并在该对象之外保存这个状态。这样就可以将该对象恢复到原先保存的状态 二、结构 备忘录模式中主要有三类角色&#xff1a; 发起人角色&#xff1a;记录当前时刻的内部状态&#xff0c;负责创建和…

SVN 405错误

SVN提交时报http 错误号405&#xff1a;http 405资源被禁止 分析&#xff1a;这是因为服务器上已经存在同名的目录了&#xff0c;所以你提交时会报错。 出现 原因&#xff1a;创建目录的时候&#xff0c;多创建了一个&#xff0c;所以在Server端就删掉一个。 解决办法&#…

centos 生产 ssh-key

注意:必须在用户目录下的.ssh文件夹下生成公私密钥 1、进入目录 cd /root/.ssh2、生成ssh-key ssh-keygen -t rsa3、打开查看 vim /root/.ssh/id_rsa.pub

SVN更新时报403错误

最近开发组使用&#xff33;&#xff36;&#xff2e;更新时经常会提示403错误&#xff0c;上网查了好久&#xff0c;说是权限的问题&#xff0c;但我感觉不象&#xff0c;可以提交&#xff0c;可以迁出&#xff0c;但就是更新时报错&#xff0c;如果是权限的问题&#xff0c;那…

【模板】树状数组2

题目 基本介绍模板题目代码实现基本介绍 这篇是树状数组模板2 主要内容有&#xff1a; 1.将某区间每一个数数加上x 2.求出某一个数的和 也就是说支持区间修改 我们可以看一下 Qi.DC 的想法 他说&#xff1a;“ 我们在树状数组中可以用前 i 项的和来表示第 i 个数 那么当对 …

mpvue 从零开始 女友初成长 0

我的女友叫mpvue&#xff0c;为什么不选择原生的&#xff0c;或者wepy呢&#xff0c;因为我只喜欢mpvue。 0、首先你得保证先安装了vue-cli npm install --g vue-cli1、脚手架构建项目&#xff0c;我直接在当前项目中创建&#xff0c;一路Y就可以创建项目了。 vue init mpvu…

Android 隐藏状态栏,沉浸式状态栏,状态栏背景色,状态栏字体色,透明状态工具类

设置状态栏颜色 if (Build.VERSION.SDK_INT>21){getWindow().setStatusBarColor(getResources().getColor(R.color.mainc)); } 方法2 <color name"colorPrimary">#3F51B5</color> //取消标题 requestWindowFeature(Window.FEATURE_NO_TITLE); /…

SVN错误信息汇总

Subversion 错误信息一览表 注意&#xff1a; 不同的客户端&#xff08;命令行&#xff0c;TortoiseSVN, AnkhSVN, Subclipse等&#xff09;的出错信息可能稍有不同。 下面表格中的出错信息以 http://svn.moon.ossxp.com/svn/test 版本库做示例&#xff0c;仅供参考。 编…

二项分布 , 多项分布, 以及与之对应的beta分布和狄利克雷分布

1. 二项分布与beta分布对应   2. 多项分布与狄利克雷分布对应 3. 二项分布是什么&#xff1f;n次bernuli试验服从 二项分布 二项分布是N次重复bernuli试验结果的分布。 bernuli实验是什么&#xff1f;做一次抛硬币实验&#xff0c;该试验结果只有2种情况&#xff0c;x 1, 表示…

mpvue 从零开始 女友的衣装 1 pages

pages文件夹就像一个大橱柜&#xff0c;里面放着各种精美的衣装&#xff0c;你也可以理解为供小程序的页面。 1、制造衣服 我在pages页面下新建了3个页面 market 广告市场task 任务中心my 个人中心 以market为例&#xff0c;写最简单的代码 <template><div class…

android 动态设置View的高度和宽度,ViewTreeObserver使用

private int mMonitorHeight 0; private int mMonitorWidth 0; private boolean bisSetScreen false; 动态设置满屏宽度 ViewTreeObserver vto2 monitor.getViewTreeObserver(); vto2.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){Overridep…

Oracle RDA(Remote Diagnostic Agent) 工具说明

Oracle RDA(Remote Diagnostic Agent) 工具说明 分类&#xff1a; Oracle 性能调优 Oracle 高级知识 一.RDA 说明 RDA(RemoteDiagnostic Agent)是oracle用来收集、分析数据库的工具&#xff0c;运行该工具不会改变系统的任何参数&#xff0c;RDA收集的相关数据非常全面&…