«   2026/10   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
«   2026/10   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

DBILITY

android java ScrollView scroll 본문

android/java

android java ScrollView scroll

DBILITY 2024. 11. 18. 11:22
반응형
binding.scrollViewHistory.post(new Runnable() {
    @Override
    public void run() {
        //binding.scrollViewHistory.setScrollY(textView.getBottom());
        binding.scrollViewHistory.setScrollY(binding.bmiHistory.getBottom());
    }
});
/*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
    binding.scrollViewHistory.scrollToDescendant(textView);
else
    binding.scrollViewHistory.fullScroll(ScrollView.FOCUS_DOWN);*/
    
InputMethodManager inputMethodManager = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);    
inputMethodManager.hideSoftInputFromWindow(v.getWindowToken(), 0);

kotlin에서 할때는 주석처리된 것처럼 해서 잘되었던지 기억이 안난다.

 

반응형
Comments