Back to project page timber.
The source code is released under:
Apache License
If you think the Android project timber listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.timber.ui; /*from ww w . ja va2s . c o m*/ import android.app.Activity; import android.os.Bundle; import android.widget.Button; import android.widget.Toast; import butterknife.OnClick; import butterknife.Views; import com.example.timber.R; import timber.log.Timber; import static android.widget.Toast.LENGTH_SHORT; public class DemoActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.demo_activity); Views.inject(this); Timber.tag("LifeCycles"); Timber.d("Activity Created"); } @OnClick({ R.id.hello, R.id.hey, R.id.hi }) public void greetingClicked(Button button) { Timber.i("A button with ID %s was clicked to say '%s'.", button.getId(), button.getText()); Toast.makeText(this, "Check logcat for a greeting!", LENGTH_SHORT).show(); } }