I looking for help with strange issue in Android UI. I have a NativeActivity, subclassed in Java, like this:
public class MainActivity extends NativeActivity {
...
in AndroidManifest.xml:
<activity android:name="textactivity" android:screenOrientation="unspecified" android:configChanges="orientation|keyboardHidden|screenSize" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
So it's EditText shown from C++ code via JNI. C++ code uses OpenGL ES for drawing.
EditText called by:
...
Intent ebintent=new Intent(this,EditBoxActivity.class);
ebintent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivityForResult(ebintent,ebrescode);
In EditText activity there is nothing special, like:
public class EditBoxActivity extends Activity {
...
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.editbox);
LinearLayout linearlayout=(LinearLayout)findViewById(R.id.linearLayoutEditBox);
linearlayout.setPadding(xpos,ypos,0,0);
edttext=(EditText)findViewById(R.id.editText);
edttext.getLayoutParams().width=width;
edttext.getLayoutParams().height=height;
And layout xml:
<LinearLayout
android:id="@+id/linearLayoutEditBox"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00000000">
<EditText
android:id="@+id/editText"
android:layout_width="0dp"
android:layout_height="0dp"
android:lines="1"
android:singleLine="true" />
Now my question. It works perfectly fine, on all devices, well not, actually there are some reports from Galaxy S8/S9 users, which updated to Android 9.0 Pie, that "I cannot paste, I tap but it doesn't work". I checked it by myself, on 8.0 it worked perfectly fine on my Galaxy S9, now I updated to 9.0 and: long press on EditText, popup shown, it says "Paste", but I tap paste, but tap doesn't work, at all... I tried other apps. There are not many apps like mine. Most of them use Java only. They work and have no issues. For me it looks like bug in Android framework modified by Samsung. How do You think, have I any hope to get some workaround. I want paste text in my simple textbox, nothing special.
I tried create PopupWindow with EditBox in it, but paste popup is not displayed for unknown reason.
I tried to use AppCompatActivity with AppCompatEditText, it looks the same as other apps, but paste popup still does nothing.
from Android EditText over NativeActivity: long press popup tap doesn't work on some device
No comments:
Post a Comment