Bug? AppCombat Compiling issue

Scantech

Well-Known Member
Licensed User
Longtime User
When compiled to Library i get error as below. Running it compiles ok.

Using AppCombat Version 3.52 with B4A 7.01

B4A version: 7.01
Parsing code. (0.03s)
Compiling code. (0.03s)
Organizing libraries. (1.21s)
Compiling generated Java code. Error
B4A line: 115
End Sub
javac 1.8.0_101
src\cargauge\customlistview4\customlistview4.java:401: error: package de.amberhome.objects.appcompat does not exist
de.amberhome.objects.appcompat.AppCompatBase _ac = null;
^
1 error
 

DonManfred

Expert
Licensed User
Longtime User
When compiled to Library i get error as below. Running it compiles ok.
What did you compile to a library?

You need to add appcompat lib in the library tab
 

Scantech

Well-Known Member
Licensed User
Longtime User
What did you compile to a library?

You need to add appcompat lib in the library tab

My custom listview using AC.SetClickEffect. I have not compiled this library for a year and it used to compile ok.

I have the appcombat library included.

B4X:
Public Sub InsertAt(Index As Int, Pnl As Panel, ItemHeight As Int, ItemHeight2 As Int, Value As Object, blnMenu As Boolean, blnSelection As Boolean, SelectionColor As String)
   
    'add click pressed for selection type
    If blnSelection = True Then
        Dim sd As StateListDrawable
        sd.Initialize
       
        'User color
        If SelectionColor = "" Then
            sd.AddState(sd.State_Pressed, pressedDrawable)
        Else
            Dim cdColor As ColorDrawable
            cdColor.Initialize(SelectionColor, 0)
            sd.AddState(sd.State_Pressed, cdColor)               
        End If
               
        sd.AddCatchAllState(Pnl.Background)           
    End If
       
    'create another panel to handle the click event
    Dim p As Panel

    Dim cd As ColorDrawable
    'highlight type
    If blnSelection = True Then       
        p.Initialize("panel")    'click sound and event
        p.Background = sd
        cd.Initialize(Colors.Transparent, 0)
    'no highlight
    Else
        p.Initialize("")        'no click sound
        If blnMenu = True Then
            cd.Initialize(DefaultTextBackgroundMenuColor, 0)
        Else
            cd.Initialize(DefaultTextBackgroundColor, 0)
        End If
    End If

    Pnl.Background = cd       
   
    'ripple effect
    If blnSelection = True Then
        Dim AC As AppCompat
        AC.SetClickEffect(Pnl, False)   
    End If
   
    p.AddView(Pnl, 0, 0, sv.Width, ItemHeight + ItemHeight2)
    p.Tag = Index
       
    If blnMenu = True Then
        If blnDividerColorMargin = True Then
            p.Elevation = 0
        Else
            p.Elevation = 25
        End If
    End If
   
    'LAST PANEL
    If Index = items.Size Then
        items.Add(Value)
        panels.Add(p)
        Dim Top As Int
       
        If Index = 0 Then
            Top = DefaultDividerHeight
        Else
            Top = sv.Panel.Height
        End If
       
        sv.Panel.AddView(p, 0, Top, sv.Width, ItemHeight + ItemHeight2)
    'ANY PANELS BEFORE LAST
    Else
        Dim Top As Int
        If Index = 0 Then
            Top = DefaultDividerHeight
        Else
            Dim previousPanel As Panel
            previousPanel = panels.Get(Index - 1)
            Top = previousPanel.Top + previousPanel.Height + DefaultDividerHeight
        End If

        Dim p2 As Panel
        For i = Index To panels.Size - 1
            p2 = panels.Get(i)
            p2.Top = p2.Top + ItemHeight + ItemHeight2 + DefaultDividerHeight
            p2.Tag = i + 1
        Next
        items.InsertAt(Index, Value)
        panels.InsertAt(Index, p)
        sv.Panel.AddView(p, 0, Top, sv.Width, ItemHeight + ItemHeight2)
    End If
   
    sv.Panel.Height = sv.Panel.Height + ItemHeight + ItemHeight2 + DefaultDividerHeight
    If items.Size = 1 Then sv.Panel.Height = sv.Panel.Height + DefaultDividerHeight
   
    If sv.Panel.Height < sv.Height Then
        InsertMaskPanel(items.Size, "*Mask*")
    End If
       
End Sub
 
Top