Skip to content

Commit

Permalink
add scroll fix
Browse files Browse the repository at this point in the history
  • Loading branch information
usg-ishimura committed Apr 16, 2023
1 parent 1cce213 commit 3bd86dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/main/java/com/usgishimura/ssh/views/AliasActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.os.Bundle
import android.os.Environment
import android.util.Log
import android.view.ContextThemeWrapper
import android.view.View
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.ScrollView
Expand Down Expand Up @@ -59,6 +60,10 @@ class AliasActivity : AppCompatActivity() {
plus.setOnClickListener {

addJustOneElemProgrammatically(lunghezzaLista)
var aliasScrollView: ScrollView = findViewById(R.id.aliasscrollview)
aliasScrollView.post {
aliasScrollView.fullScroll(View.FOCUS_DOWN)
}
lunghezzaLista += 2
}
}
Expand Down Expand Up @@ -146,9 +151,6 @@ class AliasActivity : AppCompatActivity() {
ll.addView(tilVoicealias)
ll.addView(imgv)
ll.addView(tilShellcommand)
var aliasScrollView: ScrollView = findViewById(R.id.aliasscrollview)
aliasScrollView.post(java.lang.Runnable { aliasScrollView.fullScroll(ScrollView.FOCUS_DOWN) })

}
fun setMultipleElemsText(lunghezzaLista: Int, fromJSON: ArrayList<String>){
for (i in 1 until lunghezzaLista + 1) {
Expand Down

0 comments on commit 3bd86dc

Please sign in to comment.