android编码规范 & 常用布局 & 常用控件

Android编码规范 id=5259。。防患未然,提升质量意识,降低故障率和维护成本;标准统一,提升协作效率;追求卓越的工匠精神,打磨精品代码。【强制】必须遵守,违反本约定或将会引起严重的后果;【推荐】尽量遵守,长期遵守有助于系统稳定性和合作效率的提升;【参考】充分理解,技术意识的引导,是个人学习、团队沟通、项目合作的方 向。设置固定的 view 大小的高宽,如倒计时组件等;调用 view 的 layout 方式修改位置,如弹幕组件等; 阅读详情


1,android编码规范

Android官方并没有给出相应编码规范。以下都是我从源码 、示例中总结的所谓规范。若公司有相应规范以公司为准。

首先从布局文件说起,布局文件名称的定义必须为小写字母,否者无法生成R类,尽量不要用缩写。以表达清楚该文件用途为本,通常情况下用下划线连接各语义单词,例如dialog_title_icons.xml 或者list_menu_item_checkbox.xml。

控件ID的定义,ID的定义一律为小写,例如:一用户名 TextView  可以定义为:@+id/username_view 。以“名词_控件名称”这种形式定义。

其次是图片的定义格式,图片的定义也是为解释清楚用途为准,参照这种定义格式“btn_background_ok.png”

       string类的name定义,这里可以按照JAVA中变量的定义方式定义。首字母小写,驼峰命名法。例        如:  <string name="userName_view">用户名:</string>

最后类名与变量的定义 ,定义与用户交互的类,××Activity.java 。自定义变量一律以小写m开头 例如: EditText mUserName=(EditText)findViewById(R.id.username_edit);

2,常用布局

Android提供了一组视图类来充当视图的容器,这些容器类称为布局或者布局管理器,每一个都实现一种具体的策略来管理其子控件的大小和位置。最常用的布局有以下这几种:

LinearLayout,RleativeLayout,TableLayout,FrameLayout 等。有两种方式可以声明布局,一种是编码的方式,另外一中通过XML配置的方式。Android默认是通过xml的方式构建应用程序的。这种方式最大的优点是代码与视图分离,这意味着你可以修改或调整,而无需修改源代码并重新编译。例如 你可以创建不同的屏幕方向,支持不同分辨率的设备。也更直观更容易调试。

    (1)LinearLayout :线性布局 

        最常用的一种布局方式,所有子控件的对齐方式,取决于如何定义 orientation的属性:vertical                     垂直方向 ,如果按照这种方向所有的子控件将按照垂直的方式分布在布局上,每行只允许有             一 个子元素,horizontal水平方向 ,这时子控件将会以水平的方向分布在布局中。以下线性布           局的简单例子。先上图:


 

 

 

Xml代码   收藏代码
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <!--线性布局,最外面包裹一个水平线性布局-->  
  3. <!--orientation表示线性布局的方向,horizontal:水平方向  vertical:垂直方向 -->  
  4. <!-- @代表R类,如果是自定义的ID 则用@+id/××× 表示,如果是引用R类的资源则@string/×××-->  
  5. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  6.     android:orientation="horizontal"  
  7.     android:background="@drawable/bg"  
  8.     android:layout_width="fill_parent"  
  9.     android:layout_height="fill_parent"  
  10.     >  
  11.     <LinearLayout  
  12.         android:layout_width="wrap_content"  
  13.         android:layout_height="wrap_content"  
  14.         android:orientation="vertical"  
  15.     >  
  16.         <TextView    
  17.             android:layout_width="fill_parent"   
  18.             android:layout_height="wrap_content"   
  19.             android:text="@string/linear"  
  20.             />  
  21.          <Button  
  22.             android:id="@+id/button"  
  23.             android:layout_width="183dp"   
  24.             android:layout_height="wrap_content"   
  25.             android:text="@string/button"  
  26.             />  
  27.          <ImageButton   
  28.             android:id="@+id/imagebutton"  
  29.             android:layout_width="180dp"  
  30.             android:layout_height="48dp"  
  31.             android:src="@drawable/imagebutton"  
  32.             />  
  33.               
  34.      </LinearLayout>  
  35.      <!-- android:layout_gravity与android:gravity区别,拿一个button作为例子  
  36.           前者的意思,是这个按钮的位置,如果设置为right则表示这个按钮整体位置靠右;  
  37.           后者的意思,这个按钮上显示内容的位置。  
  38.       -->  
  39.      <LinearLayout  
  40.         android:gravity="right"  
  41.         android:layout_width="fill_parent"  
  42.         android:layout_height="wrap_content"  
  43.         android:orientation="horizontal"  
  44.         >  
  45.         <ImageView  
  46.             android:id="@+id/imageview"  
  47.             android:layout_marginTop="5dp"  
  48.             android:src="@drawable/imageview"  
  49.             android:layout_width="131dp"  
  50.             android:layout_height="131dp"  
  51.         />  
  52.      </LinearLayout>  
  53.       
  54. </LinearLayout>  

 package net.csdn.blog.androidtoast;

 

Java代码   收藏代码
  1. import android.app.Activity;  
  2. import android.os.Bundle;  
  3. import android.view.View;  
  4. import android.view.View.OnClickListener;  
  5. import android.widget.Toast;  
  6.   
  7. public class MainActivity extends Activity implements OnClickListener {  
  8.     /** Called when the activity is first created. */  
  9.     @Override  
  10.     public void onCreate(Bundle savedInstanceState) {  
  11.         super.onCreate(savedInstanceState);  
  12.         setContentView(R.layout.linearlayout);  
  13.         //实例化以下控件,并设置监听事件,传入实现了OnClickListener接口的对象  
  14.         findViewById(R.id.button).setOnClickListener(this);  
  15.         findViewById(R.id.imagebutton).setOnClickListener(this);  
  16.         findViewById(R.id.imageview).setOnClickListener(this);  
  17.           
  18.     }  
  19.   
  20.     /** 
  21.      * 点击事件判断所点击是哪个控件并toast提示。 
  22.      */  
  23.     @Override  
  24.     public void onClick(View v) {  
  25.         int id=v.getId();//得到所点对象ID  
  26.         if(id==R.id.button){  
  27.             Toast.makeText(getApplicationContext(), R.string.promptButton, 1).show();  
  28.         }else if(id==R.id.imagebutton){  
  29.             Toast.makeText(getApplicationContext(), R.string.promptImageButton, 1).show();  
  30.         }else if(id==R.id.imageview){  
  31.             Toast.makeText(getApplicationContext(), R.string.promptImageView, 1).show();  
  32.         }  
  33.     }  
  34. }  

 (2)RleativeLayout :相对布局

 如果你的程序中出现了多个LinearLayout嵌套,就应该考虑使用相对布局了。相对局部顾名思义一个控件的位置相对于其他控件或者容器的位置。使用很简单 直接上示例:



 

Xml代码   收藏代码
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <!-- 相对布局  一个控件相对于另一个控件或者容器的位置。 -->  
  3. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  4.     android:orientation="vertical"  
  5.     android:background="@drawable/bg"  
  6.     android:layout_width="fill_parent"  
  7.     android:layout_height="fill_parent"  
  8.     >  
  9.     <TextView    
  10.         android:id="@+id/describe_view"   
  11.         android:layout_width="fill_parent"   
  12.         android:layout_height="wrap_content"   
  13.         android:text="@string/hello"  
  14.         android:textColor="#556055"  
  15.         />  
  16.      <!-- 这个TextView相对于上一个TextView 在 它的下方所以设置属性为layout_below-->  
  17.      <TextView  
  18.         android:id="@+id/username_view"  
  19.         android:layout_width="wrap_content"  
  20.         android:layout_height="wrap_content"  
  21.         android:layout_marginTop="12dp"  
  22.         android:text="@string/username"  
  23.         android:textColor="#556055"  
  24.         android:layout_below="@id/describe_view"  
  25.      />  
  26.      <EditText  
  27.         android:id="@+id/username_edit"  
  28.         android:layout_width="90dp"  
  29.         android:layout_height="40dp"  
  30.         android:layout_marginTop="4dp"  
  31.         android:layout_toRightOf="@id/username_view"  
  32.         android:layout_below="@id/describe_view"  
  33.      />  
  34.      <TextView  
  35.         android:id="@+id/sex_view"  
  36.         android:layout_width="wrap_content"  
  37.         android:layout_height="wrap_content"  
  38.         android:layout_marginTop="12dp"  
  39.         android:text="@string/sex"  
  40.         android:textColor="#556055"  
  41.         android:layout_below="@id/describe_view"  
  42.         android:layout_toRightOf="@id/username_edit"  
  43.      />  
  44.      <RadioGroup  
  45.         android:id="@+id/sex_radiogroup"  
  46.         android:orientation="horizontal"  
  47.         android:layout_width="wrap_content"  
  48.         android:layout_height="wrap_content"  
  49.         android:layout_toRightOf="@id/sex_view"  
  50.         android:layout_below="@id/describe_view"  
  51.         >  
  52.         <!--第一个RadioButton -->  
  53.         <RadioButton  
  54.           android:id="@+id/male_radiobutton"  
  55.           android:layout_width="wrap_content"  
  56.           android:layout_height="wrap_content"  
  57.           android:text="男"  
  58.         />  
  59.         <!--第二个RadioButton -->  
  60.         <RadioButton  
  61.           android:id="@+id/woman_radiobutton"  
  62.           android:layout_width="wrap_content"  
  63.           android:layout_height="wrap_content"  
  64.           android:text="女"  
  65.         />  
  66.      </RadioGroup>  
  67.      <TextView  
  68.         android:id="@+id/age_view"  
  69.         android:layout_width="wrap_content"  
  70.         android:layout_height="wrap_content"  
  71.         android:paddingTop="25dp"  
  72.         android:text="@string/age"  
  73.         android:textColor="#556055"  
  74.         android:layout_below="@id/username_view"  
  75.      />  
  76.           
  77.      <EditText  
  78.         android:id="@+id/brithday_edit"  
  79.         android:layout_width="90dp"  
  80.         android:layout_height="40dp"  
  81.         android:layout_marginTop="4dp"  
  82.         android:hint="@string/selectdate"  
  83.         android:textSize="13sp"  
  84.         android:gravity="center"  
  85.         android:editable="false"  
  86.         android:layout_toRightOf="@id/age_view"  
  87.         android:layout_below="@id/username_edit"  
  88.      />  
  89.       <TextView  
  90.         android:id="@+id/education_view"  
  91.         android:layout_width="wrap_content"  
  92.         android:layout_height="wrap_content"  
  93.         android:paddingTop="25dp"  
  94.         android:text="@string/education"  
  95.         android:textColor="#556055"  
  96.         android:layout_below="@id/sex_view"  
  97.         android:layout_toRightOf="@id/brithday_edit"  
  98.      />  
  99.      <!-- 下拉列表控件 -->  
  100.      <Spinner  
  101.         android:id="@+id/edu_spinner"  
  102.         android:layout_width="108dp"  
  103.         android:layout_height="38dp"  
  104.         android:layout_below="@id/sex_radiogroup"  
  105.         android:layout_toRightOf="@id/education_view"  
  106.      />  
  107.      <TextView  
  108.         android:id="@+id/interest_view"  
  109.         android:layout_width="wrap_content"  
  110.         android:layout_height="wrap_content"  
  111.         android:paddingTop="25dp"  
  112.         android:text="@string/interest"  
  113.         android:textColor="#556055"  
  114.         android:layout_below="@id/age_view"  
  115.      />  
  116.      <!-- 复选框控件 -->  
  117.      <CheckBox  
  118.         android:id="@+id/car_check"  
  119.         android:layout_width="wrap_content"  
  120.         android:layout_height="wrap_content"  
  121.         android:text="@string/car"  
  122.         android:textColor="#566156"  
  123.         android:layout_toRightOf="@id/interest_view"  
  124.         android:layout_below="@id/brithday_edit"  
  125.      />  
  126.      <CheckBox  
  127.         android:id="@+id/sing_check"  
  128.         android:layout_width="wrap_content"  
  129.         android:layout_height="wrap_content"  
  130.         android:layout_marginLeft="11dp"  
  131.         android:text="@string/sing"  
  132.         android:textColor="#566156"  
  133.         android:layout_toRightOf="@id/car_check"  
  134.         android:layout_below="@id/brithday_edit"  
  135.      />  
  136.      <CheckBox  
  137.         android:id="@+id/movie_check"  
  138.         android:layout_width="wrap_content"  
  139.         android:layout_height="wrap_content"  
  140.         android:layout_marginLeft="11dp"  
  141.         android:text="@string/movie"  
  142.         android:textColor="#566156"  
  143.         android:layout_toRightOf="@id/sing_check"  
  144.         android:layout_below="@id/brithday_edit"  
  145.      />  
  146.      <Button  
  147.         android:id="@+id/submit_button"  
  148.         android:layout_width="100dp"  
  149.         android:layout_height="40dp"  
  150.         android:text="@string/submit"  
  151.         android:gravity="center"  
  152.         android:layout_below="@id/movie_check"  
  153.         android:layout_marginLeft="210dp"  
  154.         android:layout_marginTop="15dp"  
  155.      />  
  156. </RelativeLayout>  
 

 

 (3)TableLayout:表格布局

 TableLayout布局是LinearLayout的扩展,以行和列的形式组织其子控件。与HTML中得Table相似。每一个TableRow元素代表一行。TableRow中包含几个控件代表几列。尽管使用TableRow来填充TableLayout是最常见的模式,但是该布局中可以放置任何子控件。需要指出的是TableLayout的子控件不能指定android:layout_width="wrap_content",它们被强制设定为fill_parent。但是可以设置高度。还有两个不太好理解的属性的说一下,android:stretchColums 此属性指要被拉伸的列。取值可以单个列的索引也可以是一组列的索引值。例如:如果一行有三列。stretchColums="1" 这表示拉伸第二列填充剩余空间。android:layout_column="1" 这个属性指定子控件放置在哪一列上。例如

<TextView   android:layout_column="1"   android:text="Open..."   android:padding="3dip" /> 指该控放置在第二列。上图:


 

Xml代码   收藏代码
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <!--     
  3. android:stretchColumns="1"是设置 TableLayout所有行的第二列为拉伸列。     
  4. 也就是说如果每行都有三列的话,剩余的空间由第二列补齐     
  5. -->    
  6. <!-- 最外层包裹一个滚动条 -->   
  7. <ScrollView   
  8.     xmlns:android="http://schemas.android.com/apk/res/android"  
  9.     android:layout_width="fill_parent"  
  10.     android:layout_height="wrap_content">  
  11.     <TableLayout   
  12.         android:layout_width="fill_parent"  
  13.         android:layout_height="fill_parent"  
  14.         android:stretchColumns="1">  
  15.         <TableRow>  
  16.             <View  
  17.                 android:layout_height="80dp"  
  18.                 android:layout_width="250dp"  
  19.                 android:background="#D6D6D6"  
  20.             />  
  21.             <TextView   
  22.                 android:layout_height="80dp"  
  23.                 android:text="#D6D6D6"  
  24.                 android:gravity="center"/>  
  25.         </TableRow>  
  26.         <!-- 此处的View控件充当着一个分割条的作用 -->  
  27.         <View  
  28.             android:layout_height="2dip"  
  29.             android:background="#C4C4C4" />  
  30.         <TableRow>  
  31.             <View  
  32.                 android:layout_height="80dp"  
  33.                 android:layout_width="250dp"  
  34.                 android:background="#292929"  
  35.             />  
  36.             <TextView   
  37.                 android:layout_height="80dp"  
  38.                 android:text="#292929"  
  39.                 android:gravity="center"/>  
  40.         </TableRow>  
  41.         <View  
  42.             android:layout_height="2dip"  
  43.             android:background="#C4C4C4" />  
  44.         <TableRow>  
  45.             <View  
  46.                 android:layout_height="80dp"  
  47.                 android:layout_width="250dp"  
  48.                 android:background="#8A500E"  
  49.             />  
  50.             <TextView   
  51.                 android:layout_height="80dp"  
  52.                 android:text="#8A500E"  
  53.                 android:gravity="center"/>  
  54.         </TableRow>  
  55.         <View  
  56.             android:layout_height="2dip"  
  57.             android:background="#C4C4C4" />  
  58.         <TableRow>  
  59.             <View  
  60.                 android:layout_height="80dp"  
  61.                 android:layout_width="250dp"  
  62.                 android:background="#D67C15"  
  63.             />  
  64.             <TextView   
  65.                 android:layout_height="80dp"  
  66.                 android:text="#D67C15"  
  67.                 android:gravity="center"/>  
  68.         </TableRow>  
  69.         <View  
  70.             android:layout_height="2dip"  
  71.             android:background="#C4C4C4" />  
  72.         <TableRow>  
  73.             <View  
  74.                   
  75.                 android:layout_height="80dp"  
  76.                 android:layout_width="250dp"      
  77.                 android:background="#8A270E"  
  78.             />  
  79.             <TextView   
  80.                 android:layout_height="80dp"  
  81.                 android:text="#8A270E"  
  82.                 android:gravity="center"/>  
  83.         </TableRow>  
  84.         <View  
  85.             android:layout_height="2dip"  
  86.             android:background="#C4C4C4" />  
  87.         <TableRow>  
  88.             <View  
  89.                 android:layout_height="80dp"  
  90.                 android:layout_width="250dp"  
  91.                 android:background="#D63C16"  
  92.             />  
  93.             <TextView   
  94.                 android:layout_height="80dp"  
  95.                 android:text="#D63C16"  
  96.                 android:gravity="center"/>  
  97.         </TableRow>  
  98.     </TableLayout>  
  99. </ScrollView>  
 

 

 

(4)FrameLayout:帧布局

 最简单的一个布局对象。它被定制为你屏幕上的一个空白备用区域,之后你可以在其中填充一个单一对象 — 比如,一张你要发布的图片。所有的子元素将会固定在屏幕的左上角;你不能为FrameLayout中的一个子元素指定一个位置。但是你可以通过子控件自身控制其位置。后一个子元素将会直接在前一个子元素之上进行覆盖填充,把它们部份或全部挡住(除非后一个子元素是透明的)。此布局通常用于游戏或者处理一些画廊程序。如图:

 

 

 

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

Xml代码   收藏代码
  1. <!-- 帧布局,所以子控件均显示在屏幕的左上角,层叠式排列。此布局无法控制子控件的大小与位置,  
  2.       但是子控件自身可以控制其位置大小 -->  
  3. <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  4.     android:orientation="vertical"  
  5.     android:layout_width="fill_parent"  
  6.     android:layout_height="fill_parent"  
  7.     android:background="@drawable/bg"  
  8.     >  
  9.     <!-- 图片显示控件 并且在容器的右侧显示 -->  
  10.     <ImageView   
  11.         android:id="@+id/one_imageview"  
  12.         android:src="@drawable/one"  
  13.         android:layout_width="wrap_content"  
  14.         android:layout_height="wrap_content"  
  15.         android:layout_gravity="right"  
  16.         />  
  17.     <!-- 第二张图片显示在左侧底部 -->  
  18.     <ImageView   
  19.         android:id="@+id/two_imageview"  
  20.         android:src="@drawable/two"  
  21.         android:layout_width="wrap_content"  
  22.         android:layout_height="fill_parent"  
  23.         android:scaleType="fitEnd"  
  24.         />  
  25. </FrameLayout>  

 package net.csdn.blog.androidtoast;

Java代码   收藏代码
  1. import android.app.Activity;  
  2. import android.os.Bundle;  
  3. import android.view.View;  
  4. import android.widget.ImageView;  
  5.   
  6. public class MainActivity extends Activity {  
  7.       
  8.     ImageView mOneImageView;  
  9.     ImageView mTwoImageView;  
  10.     /** Called when the activity is first created. */  
  11.     @Override  
  12.     public void onCreate(Bundle savedInstanceState) {  
  13.         super.onCreate(savedInstanceState);  
  14.         setContentView(R.layout.main);  
  15.           
  16.          mOneImageView=(ImageView) findViewById(R.id.one_imageview);  
  17.          mTwoImageView=(ImageView) findViewById(R.id.two_imageview);  
  18.           
  19.          //添加点击监听事件  
  20.         mOneImageView.setOnClickListener(new ImageView.OnClickListener(){  
  21.   
  22.             @Override  
  23.             public void onClick(View v) {  
  24.                 //点击one时隐藏自身 显示two  
  25.                 mTwoImageView.setVisibility(View.VISIBLE);  
  26.                 v.setVisibility(View.GONE);  
  27.             }  
  28.               
  29.         });  
  30.           
  31.         mTwoImageView.setOnClickListener(new ImageView.OnClickListener(){  
  32.   
  33.             @Override  
  34.             public void onClick(View v) {  
  35.                   
  36.                 mOneImageView.setVisibility(View.VISIBLE);  
  37.                 v.setVisibility(View.GONE);  
  38.             }  
  39.               
  40.         });  
  41.     }  
  42. }  
富士SC2022,C325,C328打印机扫描到网络详细教程 富士打印机SC2022,C328,C325等型号扫描到电脑教程 阅读详情

相关推荐

Fanuc机器人的坐标变换矩阵的研究2

一、Funuc用户坐标系的介绍 二、用户坐标系与世界坐标系的坐标转换 三、 以用户坐标系1为基础旋转变换后的用户坐标系 四、关于点的WPR的含义 4.1:点在用户坐标系和世界坐标系下的坐标关系 4.2 通过转换矩阵返回去推导WPR

qq_34047402的博客 1524

Android button靠右侧显示

注:要在包含button的父布局中设置

zhangjikuan的专栏 3万+

力软敏捷开发框架源码7.0.6旗舰版 JNPF开发平台3.4.5 企业版 旗舰版

JNPF作为作为一款深受用户喜爱的低代码产品,凭借雄厚的科研技术力量、丰富的软件开发项目经验、严谨的项目开发流程和高质量的售后服务,已成功帮助千家企业完成数字化项目,建立了覆盖不同行业客户和不同发展阶段的软件产品服务体系。

huoooos0的博客 1839

Android界面右上角放ImageButton

首先说一下布局文件的道理,控件是不能置于控件之上的,控件只能置于容器之中。我们所常看见的,某图片上还有图片,这绝不是2个图片控件的叠加,而是底下的图片实际上作为了一个容器的背景图,而上面的图片可以作为控件置于该容器之中,看起来也就是图片之上有图片了。        下面就是一个"分享ImageButton"置于容器中的例子:   <RelativeLayout xmlns:android

berber78的专栏 1万+

RedHat 9 替换yum源镜像

引言:我们个人通常使用的红帽系统yum源是需要注册付费的,所以在使用yum源安装一些软件时无法正常安装(例如:MySQL),这时我们就需要将yum源替换为CentOS对应的源,以实现在红帽系统中正常安装软件。

YUJIAOZHU666的博客 3738

ESP32脑机接口开发板:EEG信号采集与应用开发指南

脑机接口(BCI)技术通过采集脑电图(EEG)信号实现人机交互,其核心在于高精度生物电信号采集与实时处理。基于ESP32微控制器的开发平台结合专业级ADS1299 ADC芯片,可构建8通道EEG信号采集系统,支持250SPS采样率与可编程增益。这种嵌入式解决方案在科研教育领域具有显著优势,既能满足信号质量要求,又大幅降低开发门槛。典型应用包括实时脑电波可视化、注意力检测等BCI场景,通过Python生态工具链(如BrainFlow、LSL)可快速实现数据处理。开发时需注意电极阻抗控制(<10kΩ)和50/6

weixin_42518874的博客 344

Android图标靠界面的右边的实现

android:layout_width="wrap_content"     android:layout_height="wrap_content" >             android:id="@+id/tvName"         android:layout_width="wrap_content"         android:layout_height=

阿达King哥的博客 8743

手把手教你用FPGA+AD9822搭建300DPI的CIS高速图像采集系统(附时序调试心得)

本文详细介绍了如何利用FPGA作为核心控制器,结合AD9822三通道采样保持放大器/ADC,构建一套完整的300DPI CIS高速图像采集系统。内容涵盖从CIS传感器驱动时序、AD9822寄存器配置与协同调试,到采用千兆以太网替代USB实现稳定高速数据传输的完整实战指南,并分享了关键的时序调试心得与系统集成经验。

weixin_29306261的博客 133

android LinearLayout中,三个按钮靠左,一个按钮靠右

【代码】android LinearLayout中,三个按钮靠左,一个按钮靠右。

weixin_46536618的博客 1369

AI订单流异常检测:精准识别与闭环处置

本文系统阐述了订单流AI驱动的可视化与异常解释系统的构建策略。核心包括:1)多维度融合的异常检测技术,结合数据指纹、行为图谱和时序分析实现精准识别;2)分级分类与自动化处置机制,通过规则矩阵和风险熵值量化进行智能决策;3)基于SHAP/LIME的可解释性技术,提升决策透明度;4)千万级数据训练要求,确保模型达到87%以上的F1值。系统采用Flink+PAI实时计算架构,支持从异常检测到根因分析的完整闭环,为电商、金融等领域的订单风险管理提供智能化解决方案。

2401_83000568的博客 1360

[计算机头歌]爬虫进阶

【代码】爬虫进阶。

M_inherit的博客 921

主题:三,android编码规范 & 常用布局 & 常用控件

1,android编码规范 Android官方并没有给出相应编码规范。以下都是我从源码 、示例中总结的所谓规范。若公司有相应规范以公司为准。 首先从布局文件说起,布局文件名称的定义必须为小写字母,否者无法生成R类,尽量不要用缩写。以表达清楚该文件用途为本,通常情况下用下划线连接各语义单词,例如dialog_title_icons.xml 或者list_menu_item_checkbox.

meshless的专栏 1002

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

三,android编码规范 & 常用布局 & 常用控件

1,android编码规范 Android官方并没有给出相应编码规范。以下都是我从源码 、示例中总结的所谓规范。若公司有相应规范以公司为准。 首先从布局文件说起,布局文件名称的定义必须为小写字母,否者无法生成R类,尽量不要用缩写。以表达清楚该文件用途为本,通常

Android_Toast 507

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

(3)Android入门——android编码规范 & 常用布局 & 常用控件

1,android编码规范 Android官方并没有给出相应编码规范。以下都是我从源码 、示例中总结的所谓规范。若公司有相应规范以公司为准。   首先从布局文件说起,布局文件名称的定义必须为小写字母,否者无法生成R类,尽量不要用缩写。以表达清楚该文件用途为本,通常情况下用下划线连接各语义单词,例如dialog_title_icons.xml 或者list_menu_item_ch

ligengk的专栏 592

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an &ldquo;advanced algorithms&rdquo; book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

Android开发编码规范之常用控件布局(三)

Android开发编码规范之常用控件布局(五)一、TextView布局要求:需要设置大约10个属性。 UI标注和交互注意事项: 1.文字大小  2.文字的颜色   3.文字的内外边距   4.是否单行显示 编码重点注意事项      :  1.文字大小  2.文字的颜色   3.文字的内外边距   4.是否单行显示1.1、TextView一般需要设置10个属性1.长度和宽度设置 1.设

u010857572的博客 426

android编码规范&常用布局

1、android编码规范 Android官方并没有给出相应的编码规范,一下是我个人从这段时间的学习中总结的一些编码规范。 首先说类名与变量的定义,定义与用户交互的类**Activity.java。自定义变量一律以小写字母m开头,例如:Button mshowText = (Button)findViewById(R.id.showText)。 控件ID的定义,ID一律用小写表示,例如一...

iteye_12261的博客 157

Android入门进阶教程(5)-android 常用组件

1,android编码规范 Android官方并没有给出相应编码规范。以下都是我从源码 、示例中总结的所谓规范。若公司有相应规范以公司为准。   首先从布局文件说起,布局文件名称的定义必须为小写字母,否者无法生成R类,尽量不要用缩写。以表达清楚该文件用途为本,通常情况下用下划线连接各语义单词,例如dialog_title_icons.xml 或者list_menu_item_checkbox

love android 1853

Android的编码规范

一、Android编码规范   1、学会使用string.xml文件   在我看来,当一个文本信息出现的次数大于一次的时候就必须要使用string.xml   比如一个保存按钮 , 不规范写法:       <Button android:id="@+id/editinfo_btn_save" android:layout_width="wrap

qq1272850043的博客 434

Android编码规范(转载)

工作中经常会查看源码,在对安卓的编码规范进行了较好的了解以后,能够帮助大家更好的阅读代码,比如一看到m开头的变量,就知道这是一个成员变量。 1,常见类名命名规则 2,控件变量 建议使用控件缩写+逻辑名称,例如btnLogin或者btn_login. 常见控件变量缩写如下 3方法命名 4,布局文件 以对应的类别名在前面,逻辑在后面,用下划线连接 5,drawable中的文件命...

sinat_38430122的博客 282

Android 编码规范

Android开发规范

Jony_Lulu的博客 2980

android布局相关网站

Android User Interface Design: Frame Layouts Android 开发之旅:view的几种布局方式及实践 - 吴秦 - 博客园 Android User Interface Design: Building a ListView Application 新浪微博布局学习——活用RelativeLayout - Android - mobile

ku1989的专栏 465

【转】Android编码规范

Android编码规范  一、Android编码规范 1.java代码中不出现中文,最多注释中可以出现中文 2.局部变量命名、静态成员变量命名: 只能包含字母,单词首字母出第一个外,都为大写,其他字母都为小写,以m开头; 3.常量命名:只能包含字母和_,字母全部大写,单词之间用_隔开 4.layout中的id命名 命名模式为:模块名字(包名)_(布局名字)_layout.xml

移动开发砖家-扫地僧 298

android 编码规范

Android编码规范 Author Gjson   一、命名规范   1. 包命名   2. 类和接口命名   3. 方法的命名   4. 变量的命名   5. 常量的命名   6. 异常的命名   7. 布局的命名   8. ID的命名   9. 图片的命名  10. 其他资源命名   二、注释规范   1. 文件注释   2. 类注释   3. 方法注释

zhuangyalei的专栏 806
上一篇: Android开发中完全退出程序的三种方法
下一篇: Oracle:如何插入特殊字符:& 和 ' (多种解决方案)
hoyan_li
博客等级 码龄14年 5粉丝 43原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值