Make text in logs view selectable

disable updating when text is selected

Closes #105
This commit is contained in:
Jannis Mattheis
2020-03-29 09:13:30 +02:00
parent 0215517806
commit 96ad18a573
2 changed files with 4 additions and 1 deletions

View File

@@ -74,7 +74,9 @@ public class LogsActivity extends AppCompatActivity {
@Override @Override
protected void onPostExecute(String s) { protected void onPostExecute(String s) {
TextView content = findViewById(R.id.log_content); TextView content = findViewById(R.id.log_content);
if (content.getSelectionStart() == content.getSelectionEnd()) {
content.setText(s); content.setText(s);
}
super.onPostExecute(s); super.onPostExecute(s);
} }
} }

View File

@@ -26,6 +26,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:text="" android:text=""
android:textIsSelectable="true"
android:textSize="10sp" android:textSize="10sp"
app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"