scrollView 안에 버튼이 있습니다. 버튼을 클릭하면 버튼을 클릭하자마자 팝업창이 나타나기 전 PopupWindow가 필요합니다.Android : PopupWindow 키보드 위의 빈 공간을 채우십시오.
final Button b = (Button) findViewById(R.id.button);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
LayoutInflater layoutInflater = (LayoutInflater) getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.popup, null);
final PopupWindow popupWindow = new PopupWindow(popupView,WindowManager.LayoutParams.MATCH_PARENT,WindowManager.LayoutParams.MATCH_PARENT,true);
popupWindow.showAtLocation(v.getRootView(), Gravity.FILL, 0, 0);
//Bring soft keyboard up : NOT WORKING
final InputMethodManager mInputMethodManager = (InputMethodManager) getBaseContext().getSystemService(Context.INPUT_METHOD_SERVICE);
EditText editText = (EditText) popupView.findViewById(R.id.editText);
mInputMethodManager.showSoftInput(editText, 0);
}
});
내 레이아웃 XML은 다음과 같습니다 :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<EditText
android:id="@+id/yourViewsEditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="Your Views"
>
</EditText>
</RelativeLayout>
내가 대신 wrap_content의 fill_parent를 시도, 그것은 전체 화면을 작성하여 시작합니다이 내 코드가 오늘날의 모습입니다. 이 같은 키보드의 높이를 얻을 수
현재 어떻게 보이나요? – waqaslam