diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-12-10 20:01:50 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2015-12-10 20:01:50 +0100 |
commit | a7454223008c78dcf5e0ff727bca64241f99daa1 (patch) | |
tree | f9ab1f2834743fc1cf9970636c0862d209c51c5e /src/main/java/de/thedevstack/conversationsplus/ui/LogCatOutputActivity.java | |
parent | eb5a7a5392ec93976d91d5576a3496ceac473d03 (diff) |
Moved logcat to a module, increased error robustness for loading last messages
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/LogCatOutputActivity.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/ui/LogCatOutputActivity.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/LogCatOutputActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/LogCatOutputActivity.java new file mode 100644 index 00000000..e75c1f63 --- /dev/null +++ b/src/main/java/de/thedevstack/conversationsplus/ui/LogCatOutputActivity.java @@ -0,0 +1,28 @@ +package de.thedevstack.conversationsplus.ui; + +import android.app.Activity; +import android.os.Bundle; +import android.widget.Button; +import android.widget.ListView; + +import de.thedevstack.android.logcat.adapters.LogCatArrayAdapter; +import de.thedevstack.android.logcat.tasks.ReadLogCatAsyncTask; +import de.thedevstack.android.logcat.ui.LogCatOutputCopyOnClickListener; +import de.thedevstack.conversationsplus.R; + +/** + * Created by tzur on 07.10.2015. + */ +public class LogCatOutputActivity extends Activity { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_logcatoutput); + ListView lv = (ListView)findViewById(R.id.actLogInfoOutput); + LogCatArrayAdapter logCatOutputAdapter = new LogCatArrayAdapter(this, R.layout.list_item_logcatoutput); + lv.setAdapter(logCatOutputAdapter); + new ReadLogCatAsyncTask(logCatOutputAdapter).execute(); + Button copyButton = (Button) findViewById(R.id.actLogOutputCopyButton); + copyButton.setOnClickListener(new LogCatOutputCopyOnClickListener(this, logCatOutputAdapter, R.string.cplus_copied_to_clipboard)); + } +} |