Android Question B4XDrawer and customlistview

Discussion in 'Android Questions' started by kisoft, Aug 20, 2019.

  1. kisoft

    kisoft Active Member Licensed User

  2. Erel

    Erel Administrator Staff Member Licensed User

    It doesn't matter which views you put in the drawer. Just put the CLV in the "left" layout file.
     
  3. kisoft

    kisoft Active Member Licensed User

    I don't know if I asked correctly? I would like to run CLV in activity. I don't know what I'm doing wrong, I still have this error.
    Code:
    java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.appcompat.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
        at de.amberhome.objects.appcompat.ACActionBar.setShowUpIndicator(ACActionBar.java:116)
        at b4a22.example.main._activity_create(main.java:
    443)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.shell.Shell.runMethod(
    Shell.java:732)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:351)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:255)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    144)
        at b4a22.example.main.afterFirstLayout(main.java:
    104)
        at b4a22.example.main.access$
    000(main.java:17)
        at b4a22.example.main$WaitForLayout.run(main.java:
    82)
        at android.os.Handler.handleCallback(Handler.java:
    789)
        at android.os.Handler.dispatchMessage(Handler.java:
    98)
        at android.os.Looper.loop(Looper.java:
    164)
        at android.app.ActivityThread.main(ActivityThread.java:
    6710)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:
    240)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    770)
    ** 
    Activity (main) Resume **
     
  4. Brandsum

    Brandsum Active Member Licensed User

    post your code
     
  5. kisoft

    kisoft Active Member Licensed User

    I prepared a small project that shows the problem. The data are loaded from the database in the original.
     

    Attached Files:

  6. Brandsum

    Brandsum Active Member Licensed User

    I'm getting another error. Which CLV library you used in your project?
     
  7. kisoft

    kisoft Active Member Licensed User

    I used both libraries. CustomListView (1.76) and xCustomListView (1.70).
     
  8. Brandsum

    Brandsum Active Member Licensed User

    Why both?
     
    Alexander Stolte likes this.
  9. kisoft

    kisoft Active Member Licensed User

    Of course not simultaneously. In both cases, he gets the same error.
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    1. Only use xCustomListView
    2. The error has nothing to do with the drawer content.

    The ACToolBar is not configured properly.

    Start with the B4XDrawer as-is.
     
  11. kisoft

    kisoft Active Member Licensed User

    Of course, the President's eye is alert and always helpful. Everything works correctly.
    @Erel thank you very much for your help.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice