Android Open Source - memBitmapTest Test Log






From Project

Back to project page memBitmapTest.

License

The source code is released under:

GNU General Public License

If you think the Android project memBitmapTest listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.membmptest;
//from ww w  . ja va 2  s.co  m
import android.util.Log;

public class TestLog {
  /**
   * Shows current calling function and class name.. Usually used in activity
   * and fragment life cycles..
   * */
  public static void recLifeCycle(Object classInstance) {

    try {
      if (classInstance == null)
        return;
      String className = classInstance.getClass().getSimpleName();
      StackTraceElement[] s = Thread.currentThread().getStackTrace();
      String methodName = s[3].getMethodName();

      Log.i("LIFE_CYCLE_TAG", className + "." + methodName);

    } catch (Exception ex) {
    }
  }

  /**
   * Writes an exception's stack trace log to Logcat using
   * Exception.printStackTrace() method.
   * 
   * */
  public static void exceptionLog(Exception e) {

    e.printStackTrace();

  }
  
  /**
   * Writes an exception's stack trace log to Logcat using
   * Exception.printStackTrace() method.
   * 
   * */
  public static void infoLog(String message) {

    Log.i(TestLog.class.getSimpleName(), message);

  }

}




Java Source Code List

com.example.membmptest.BaseMemoryActivity.java
com.example.membmptest.MainActivityFork.java
com.example.membmptest.MainActivity.java
com.example.membmptest.MainApplication.java
com.example.membmptest.StartActivity.java
com.example.membmptest.TestLog.java