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