zoukankan      html  css  js  c++  java
  • 常用工具类

     1 import android.util.Log;
     2 
     3 /**
     4  * @author orca
     5  * Log工具类,方便打印log
     6  * 封装了info,debug,error,方法
     7  * 添加了分隔线
     8  */
     9 public class LogUtil {
    10     private static String TAG = "ace";
    11 
    12     public static void getInfoLog(String msg) {
    13         Log.i(TAG, msg);
    14     }
    15 
    16     public static void getDebugLog(String msg) {
    17         Log.d(TAG, msg);
    18     }
    19 
    20     public static void getErrorLog(String msg) {
    21         Log.i(TAG, msg);
    22     }
    23 
    24     public static void getDivider() {
    25         Log.d(TAG, "************************************");
    26     }
    27 
    28 }
     1 import android.content.Context;
     2 import android.widget.Toast;
     3 
     4 /**
     5  * @author orca
     6  * Toast工具类
     7  * 
     8  */
     9 public class ToastUtil {
    10 
    11     public static void shortShow(Context context, String msg) {
    12         Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
    13     }
    14 
    15     public static void longShow(Context context, String msg) {
    16         Toast.makeText(context, msg, Toast.LENGTH_LONG).show();
    17     }
    18 
    19 }
  • 相关阅读:
    编译环境
    好看的函数图
    R语言学习
    python画图
    C++技巧
    DLL
    进程共享数据
    八数码问题
    document.getElementsByTagName()返回的是数组document.getElementsById()是dom内容
    使用Math.max,Math.min获取数组中的最值
  • 原文地址:https://www.cnblogs.com/jinglecode/p/4358318.html
Copyright © 2011-2022 走看看