[controller] improve connection log scroll capabilities
This commit is contained in:
parent
3fec55ca56
commit
c1f9152f9f
|
|
@ -9,8 +9,8 @@ android {
|
|||
applicationId "org.iiab.controller"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 34
|
||||
versionCode 21
|
||||
versionName "v0.1.25alpha-debug"
|
||||
versionCode 22
|
||||
versionName "v0.1.26alpha"
|
||||
setProperty("archivesBaseName", "$applicationId-$versionName")
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -11,9 +11,9 @@
|
|||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 8,
|
||||
"versionName": "v0.1.14alpha",
|
||||
"outputFile": "org.iiab.controller-v0.1.14alpha-release.apk"
|
||||
"versionCode": 22,
|
||||
"versionName": "v0.1.26alpha",
|
||||
"outputFile": "org.iiab.controller-v0.1.26alpha-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File",
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import android.content.SharedPreferences;
|
|||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.view.View;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
|
|
@ -140,6 +141,17 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
|
|||
connectionLog.setMovementMethod(new ScrollingMovementMethod());
|
||||
// Enable text selection for copying large logs
|
||||
connectionLog.setTextIsSelectable(true);
|
||||
|
||||
// FIX: Allow internal scrolling by disabling parent intercept
|
||||
connectionLog.setOnTouchListener((v, event) -> {
|
||||
if (v.getId() == R.id.connection_log) {
|
||||
v.getParent().requestDisallowInterceptTouchEvent(true);
|
||||
if ((event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_UP) {
|
||||
v.getParent().requestDisallowInterceptTouchEvent(false);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
configLayout = findViewById(R.id.config_layout);
|
||||
configLabel = findViewById(R.id.config_label);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#888888" />
|
||||
<corners android:radius="5dp" />
|
||||
</shape>
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
android:id="@+id/watchdog_control"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="90dp"
|
||||
android:text="Enable Master Watchdog"
|
||||
android:text="@string/watchdog_enable"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#FFFFFF"
|
||||
|
|
@ -225,6 +225,9 @@
|
|||
android:padding="8dp"
|
||||
android:visibility="gone"
|
||||
android:scrollbars="vertical"
|
||||
android:fadeScrollbars="false"
|
||||
android:scrollbarSize="10dp"
|
||||
android:scrollbarThumbVertical="@drawable/scrollbar_thumb"
|
||||
android:text="System ready...\n"
|
||||
android:textSize="11sp"/>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue