0

for をEditText使用するとandroid:imeOptions が機能しないのはなぜですか? この問題に直面した人は助けてください。setOnClickListnerEditText

私のxmlコード

    <EditText
                android:id="@+id/txt_current_password"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="6dp"
                android:layout_marginLeft="7dp"
                android:layout_marginTop="6dp"
                android:background="@drawable/backwithborder"
                android:hint="@string/hint_current_password"
                android:imeOptions="actionNext"
                android:inputType="textPassword"
                android:singleLine="true"
                android:textColor="#b8b8b8"
                android:textSize="17sp"
                android:typeface="sans" >
            </EditText>

    <EditText
                android:id="@+id/txt_new_password"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/txt_current_password"
                android:layout_marginBottom="6dp"
                android:layout_marginLeft="7dp"
                android:layout_marginTop="6dp"
                android:background="@drawable/backwithborder"
                android:hint="@string/hint_new_password"
                android:imeOptions="actionNext"
                android:inputType="textPassword"
                android:singleLine="true"
                android:textColor="#b8b8b8"
                android:textSize="17sp"
                android:typeface="sans" >
        </EditText>


        <EditText
                android:id="@+id/txt_confirm_password"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/txt_new_password"
                android:layout_marginBottom="6dp"
                android:layout_marginLeft="7dp"
                android:layout_marginTop="6dp"
                android:background="@drawable/backwithborder"
                android:hint="@string/hint_confirm_password"
                android:imeOptions="actionDone"
                android:inputType="textPassword"
                android:singleLine="true"
                android:textColor="#b8b8b8"
                android:textSize="17sp"
            android:typeface="sans" >
        </EditText>

私のJavaコード

EditText txtOldPassword = (EditText) findViewById(R.id.txt_current_password);
txtOldPassword.setOnClickListener(new View.OnClickListener() 
    {
            @Override
            public void onClick(View v) 
            {
                txtOldPassword.setFocusable(true);
                txtOldPassword.setFocusableInTouchMode(true);
            }

        });
EditText txtNewPassword = (EditText) findViewById(R.id.txt_new_password);
txtNewPassword.setOnClickListener(new View.OnClickListener() 
    {
            @Override
            public void onClick(View v) 
            {
                txtNewPassword.setFocusable(true);
                txtNewPassword.setFocusableInTouchMode(true);
            }

        });  
EditText txtConfirmPassword = (EditText) findViewById(R.id.txt_confirm_password);
txtConfirmPassword.setOnClickListener(new View.OnClickListener() 
    {
            @Override
            public void onClick(View v) 
            {
                txtConfirmPassword.setFocusable(true);
                txtConfirmPassword.setFocusableInTouchMode(true);
            }

        });     
4

2 に答える 2