mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-19 14:40:06 +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.View
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.ScrollView
|
||||
import android.widget.Toast
|
||||
import androidx.activity.result.component1
|
||||
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
|
||||
}
|
||||
else -> false
|
||||
|
||||
@ -59,6 +59,7 @@ object SendLog {
|
||||
|
||||
// Get log bytes from neko.log
|
||||
fun getNekoLog(max: Long): ByteArray {
|
||||
return try {
|
||||
val file = File(
|
||||
SagerNet.application.cacheDir,
|
||||
"neko.log"
|
||||
@ -68,6 +69,9 @@ object SendLog {
|
||||
if (max in 1 until len) {
|
||||
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