CodeView icon indicating copy to clipboard operation
CodeView copied to clipboard

Isn't working properly!

Open SunPodder opened this issue 2 years ago • 7 comments

I have added the following code in layout from the docs

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >

    <com.amrdeveloper.codeview.CodeView
        android:id="@+id/codeView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/darkGrey"
        android:dropDownHorizontalOffset="0dp"
        android:dropDownSelector="@color/darkGrey"
        android:dropDownWidth="150dp"
	android:gravity="top|start" />

</LinearLayout>

The app looks like this Screenshot_20220325-153948_Code Editor

Keyboard doesn't appear, no response from the app. Why is that?

SunPodder avatar Mar 25 '22 09:03 SunPodder

Hello @SunPodder,

Can you please share some more information so we can find the problem easily for example

Android Version: ?? CodeView Version: ??

Change the default color to white so it will be clear on the black background

 android:textColor="@color/white"

Try to run the example app from this repository and it will be great if you shared your config code

AmrDeveloper avatar Mar 25 '22 11:03 AmrDeveloper

If text is empty, you must click at center of codeview to show cursor

perhaps it would be better if you pre- specify code using setTextHighlighted() function and pass code as text

m-anshuman2166 avatar Mar 26 '22 06:03 m-anshuman2166

Was your issue fixed ?

m-anshuman2166 avatar May 03 '22 04:05 m-anshuman2166

Uhh yeah

SunPodder avatar May 04 '22 03:05 SunPodder

I know this is not a bug of the library but i need assistance. Back then I only tried the demo app and didn't fix my problem. Now I am again working on this project.

This time everything else is fine but the keyboard is not showing up.

I have tried focusable="true" in CodeView widget and also tried to open the keyboard manually. Nothing worked.

I am using codes from the demo app. Though I have not applied all the code from it

SunPodder avatar Jun 21 '22 11:06 SunPodder

Fixed that after using AppCompatActivity instead of android.app.Activity resulting in 3MB increased apk size. Total 8MB for just writing Hello World in a app. Can't it be decreased? Also when just using this library it was 5MB. Most of the phones are now run on API 21 and higher. So can you switch from AppCompatMultiAutoCompleteTextView to MultiAutoCompleteTextView?

SunPodder avatar Jun 21 '22 12:06 SunPodder

Hello @SunPodder,

Can you please check this comment I think it is the same problem?

https://github.com/AmrDeveloper/CodeView/issues/5

I think we can't move to API 21 or higher only because we still got feature requests and bug for old versions like API 15, so try this solution and we can check for more solutions

Thanks Amr Hesham

AmrDeveloper avatar Jun 21 '22 19:06 AmrDeveloper