나를 위해 나는 키보드 높이가 특정 측정이라고 가정하고 싶지 않았습니다. 이 작업을 수행 한 후 onTouchListener을하고 대한 관심을 볼 무엇 이건 :
setOnTouchListener(new OnTouchListener() {
Runnable shifter=new Runnable(){
public void run(){
try {
int[] loc = new int[2];
//get the location of someview which gets stored in loc array
findViewById(R.id.someview).getLocationInWindow(loc);
//shift so user can see someview
myscrollView.scrollTo(loc[0], loc[1]);
}
catch (Exception e) {
e.printStackTrace();
}
}}
};
Rect scrollBounds = new Rect();
View divider=findViewById(R.id.someview);
myscollView.getHitRect(scrollBounds);
if (!divider.getLocalVisibleRect(scrollBounds)) {
// the divider view is NOT within the visible scroll window thus we need to scroll a bit.
myscollView.postDelayed(shifter, 500);
}
});
//은 본질적으로 우리가 실행 가능한을을 당신이 화면에 표시 WANT 일부보기의 새 위치로 스크롤됩니다. scrollviews 범위 내에 있지 않으면 (화면에없는 경우에만) 해당 실행 파일을 실행합니다. 이 방법은 scrollview를 참조 된 뷰 (내 경우에는 라인 디바이더 인 'someview')로 이동합니다.
그 링크는 나를 더 잘 도와줍니다. ' 대신 3을 설정하십시오 감사합니다. –
Shaiful
멋진 gud 행운을 앞두고. –