Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The autocomplete and The keyboard #28

Closed
danicaStarR opened this issue May 4, 2022 · 10 comments
Closed

The autocomplete and The keyboard #28

danicaStarR opened this issue May 4, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@danicaStarR
Copy link

danicaStarR commented May 4, 2022

1.The autocomplete box is in the wrong position
2.The keyboard blocks the input box

_20220504_141800.mp4

android version:6.0.1

Codes:

MainActivity.java

`
@OverRide
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

    // Your language keywords
    String[] languageKeywords = {"hello","world"};
// List item custom layout 
     
// TextView id on your custom layout to put suggestion on it
    CodeView codeView = findViewById(R.id.codeView);
    
    codeView.setEnableLineNumber(true);
    codeView.setLineNumberTextColor(Color.GRAY);
    codeView.enablePairComplete(true);
    codeView.enablePairCompleteCenterCursor(true);
    Map<Character, Character> pairCompleteMap = new HashMap<>();
    pairCompleteMap.put('{', '}');
    pairCompleteMap.put('[', ']');
    pairCompleteMap.put('(', ')');
    pairCompleteMap.put('<', '>');
    pairCompleteMap.put('"', '"');
    codeView.setPairCompleteMap(pairCompleteMap);
    codeView.addSyntaxPattern(Pattern.compile("[0-9]+") , Color.RED);
    codeView.setLineNumberTextSize(15);
    
    
    
// Create ArrayAdapter object that contain all information
    ArrayAdapter<String> adapter = new ArrayAdapter<>(this, R.layout.list,R.id.v_m_c, languageKeywords);
// Set the adapter on CodeView object
    codeView.setAdapter(adapter);
    
    Snackbar.make(codeView,"By Ds",Snackbar.LENGTH_SHORT).show();
}

`

activity_main.xml

`

<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

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

</androidx.coordinatorlayout.widget.CoordinatorLayout>

`

@AmrDeveloper
Copy link
Owner

Hello @danicaStarR,

Thanks for your report and information, I will test it on old versions and find the problem,

Thanks
Amr Hesham

@danicaStarR
Copy link
Author

oh,Thank u.😝

@AmrDeveloper AmrDeveloper added the enhancement New feature or request label May 7, 2022
@AmrDeveloper
Copy link
Owner

The problem is from vertical offset calculation, i will modify it and test it first with many devices and versions before release it

Thanks bro
Amr Hesham

@m-anshuman2166
Copy link
Contributor

Well kinda same issue in my case too

AmrDeveloper added a commit that referenced this issue May 11, 2022
@AmrDeveloper
Copy link
Owner

Hello guys @danicaStarR @m-anshuman2166,

I have fixed the problem in Android 6 and below and tested it with different versions, please try to test the example app too on many different devices so we can make sure it is good and fix the problem before we release 1.3.5, I will keep testing 👍🏻

Thanks
Amr Hesham

@danicaStarR
Copy link
Author

OK 😆

@m-anshuman2166
Copy link
Contributor

image
Looks better !

@m-anshuman2166
Copy link
Contributor

@danicaStarR is your issue solved ?

@danicaStarR
Copy link
Author

@m-anshuman2166 I've been busy lately and haven't tried the new version

@AmrDeveloper
Copy link
Owner

This issue is solved in the last version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants