Comments (15)
android:focusable="true"
android:focusableInTouchMode="true"
add this
from pinview.
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.
Any update ?, Same thing is happening with me
from pinview.
android:focusable="true"
android:focusableInTouchMode="true"
add this
this worked for me
from pinview.
android:focusable="true"
android:focusableInTouchMode="true"
add thisthis worked for me
Yeah works for me too
from pinview.
@rajatpathak, Given solution is not working.
from pinview.
same issue here
from pinview.
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.
in my case i forgot to follow step 2 in the wiki
from pinview.
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.
Same problem
from pinview.
but how to get This done if i have custom dilog box where i have placed this pinview
from pinview.
Same problem on 1.4.4 and try all solution of the all comment above still not working (Android 10 & pixel 5)
from pinview.
android:focusable="true"
android:focusableInTouchMode="true"
add thisthis worked for me
Yeah works for me too
works for me too
from pinview.
android:focusable="true"
android:focusableInTouchMode="true"
add thisthis worked for me
Yeah works for me too
works for me too
me too
from pinview.
Related Issues (20)
- How to change echo character for password? HOT 2
- Feature request
- JCenter is shutting down, are there plans to migrate? HOT 3
- crash when using line viewType HOT 6
- How to set value with Java? HOT 8
- Text is invisible on some devices HOT 2
- Error inflating class com.chaos.view.PinView HOT 2
- How to set background invisible when text was inputed?
- Getting IndexOutOfBoundsException HOT 7
- PinView cursor shape not changing
- keyboard HOT 3
- The keyboard does not show up automatically HOT 1
- is there a way to add elevation and translationZ to single item ? HOT 2
- XIAOMI device cursor visibility does not get hidden
- How to get value using databinding in viewmodel
- How to get text from the pinView for verification ?
- Illegal char <:> in auto-generated values.xml HOT 2
- text color in dark mode
- PinView.java line 339 HOT 1
- How to set viewType in code, or specify viewType when creating a PinView in code.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinview.