Git Product home page Git Product logo

Comments (15)

rajatpathak avatar rajatpathak commented on June 13, 2024 14

android:focusable="true"
android:focusableInTouchMode="true"
add this

from pinview.

nixfuerdiecharts avatar nixfuerdiecharts commented on June 13, 2024 3

For me, these two solutions are working

pinView.requestFocus();
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(pinView, InputMethodManager.SHOW_IMPLICIT);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);

or

pinView.dispatchTouchEvent(MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN , 0, 0, 0));
pinView.dispatchTouchEvent(MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), MotionEvent.ACTION_UP , 0, 0, 0));
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);

from pinview.

ram992 avatar ram992 commented on June 13, 2024 2

Any update ?, Same thing is happening with me

from pinview.

erinfolami avatar erinfolami commented on June 13, 2024 1

android:focusable="true"
android:focusableInTouchMode="true"
add this

this worked for me

from pinview.

Braimah-Abiola avatar Braimah-Abiola commented on June 13, 2024 1

android:focusable="true"
android:focusableInTouchMode="true"
add this

this worked for me

Yeah works for me too

from pinview.

rushabh13 avatar rushabh13 commented on June 13, 2024

@rajatpathak, Given solution is not working.

from pinview.

ilhammhdd avatar ilhammhdd commented on June 13, 2024

same issue here

from pinview.

ChaosLeung avatar ChaosLeung commented on June 13, 2024

Can anyone provide the reproduction steps? I tried to reproduce it on Android emulator 4.4 / 5.0 / 5.1 / 8.0 / 9.0, but it works perfect.

from pinview.

ilhammhdd avatar ilhammhdd commented on June 13, 2024

in my case i forgot to follow step 2 in the wiki

from pinview.

akorb avatar akorb commented on June 13, 2024

I have the same problem. I want to open the keyboard automatically when the Activity starts.

MainActivity.cs

public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        PinView pinView = findViewById(R.id.pinView);
        pinView.requestFocus();

        InputMethodManager inputManager = (InputMethodManager) pinView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
        inputManager.showSoftInput(pinView, InputMethodManager.SHOW_IMPLICIT);
    }
}

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <com.chaos.view.PinView
        android:id="@+id/pinView"
        style="@style/PinWidget.PinView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <requestFocus />
    </com.chaos.view.PinView>
</LinearLayout>

build.gradle

implementation 'com.chaos.view:pinview:1.4.4'

The PinView is in focus (the cursor is visible) but the keyboard does not show up.

This example reproduces the bug for my phone (Android 10) and on my emulator "Pixel 2 API 16".

I hope this helps.

from pinview.

zakrodionov avatar zakrodionov commented on June 13, 2024

Same problem

from pinview.

aryant-nigam avatar aryant-nigam commented on June 13, 2024

but how to get This done if i have custom dilog box where i have placed this pinview

from pinview.

vikranz avatar vikranz commented on June 13, 2024

Same problem on 1.4.4 and try all solution of the all comment above still not working (Android 10 & pixel 5)

from pinview.

Musnadil avatar Musnadil commented on June 13, 2024

android:focusable="true"
android:focusableInTouchMode="true"
add this

this worked for me

Yeah works for me too

works for me too

from pinview.

thisizankushk avatar thisizankushk commented on June 13, 2024

android:focusable="true"
android:focusableInTouchMode="true"
add this

this worked for me

Yeah works for me too

works for me too

me too

from pinview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.