mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-19 22:50:05 +08:00
fix gui
This commit is contained in:
parent
3a41a6dd25
commit
a0a51bbf30
@ -10,6 +10,7 @@ import android.view.Menu
|
|||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
|
import android.widget.ScrollView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.activity.result.component1
|
import androidx.activity.result.component1
|
||||||
import androidx.activity.result.component2
|
import androidx.activity.result.component2
|
||||||
@ -355,7 +356,10 @@ abstract class ProfileSettingsActivity<T : AbstractBean>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MaterialAlertDialogBuilder(activity).setView(view).show()
|
val scrollView = ScrollView(context).apply {
|
||||||
|
addView(view)
|
||||||
|
}
|
||||||
|
MaterialAlertDialogBuilder(activity).setView(scrollView).show()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
else -> false
|
else -> false
|
||||||
|
|||||||
@ -59,6 +59,7 @@ object SendLog {
|
|||||||
|
|
||||||
// Get log bytes from neko.log
|
// Get log bytes from neko.log
|
||||||
fun getNekoLog(max: Long): ByteArray {
|
fun getNekoLog(max: Long): ByteArray {
|
||||||
|
return try {
|
||||||
val file = File(
|
val file = File(
|
||||||
SagerNet.application.cacheDir,
|
SagerNet.application.cacheDir,
|
||||||
"neko.log"
|
"neko.log"
|
||||||
@ -68,6 +69,9 @@ object SendLog {
|
|||||||
if (max in 1 until len) {
|
if (max in 1 until len) {
|
||||||
stream.skip(len - max) // TODO string?
|
stream.skip(len - max) // TODO string?
|
||||||
}
|
}
|
||||||
return stream.use { it.readBytes() }
|
stream.use { it.readBytes() }
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.stackTraceToString().toByteArray()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user