Android Question Circular Progress Bar not showing up.

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi,

I am using circular progress bar class v 2.0. in B4A 10.2
The progress bar is not showing up instead a counter is showing.

I think I am missing something.

Can someone point out what is missing.

Thanks
Juzer
 

DonManfred

Expert
Licensed User
Longtime User
Where is the projectupload showing the problem?
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Erel,

After you replied I tried
1. Deleted related controls added again restarted whole project.
2. Took a panel and loaded layout of sample project (just to check) and added in my project.
in both case it didn't show.

3. I designed a new fresh layout with only 2 controls as in example added in my project, It showed.
Encouraged by this I copied all views from my existing layout to the new layout again it disappeared.

For now i have moved on with normal PB.

To debug this i will have to add views from my layout to working layout(in step 3) one by one and see when it disappears.

I will let you know.

Circular PB is way too good to be missed.

Thanks
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Erel,

After you replied I tried
1. Deleted related controls added again restarted whole project.
2. Took a panel and loaded layout of sample project (just to check) and added in my project.
in both case it didn't show.

3. I designed a new fresh layout with only 2 controls as in example added in my project, It showed.
Encouraged by this I copied all views from my existing layout to the new layout again it disappeared.

For now i have moved on with normal PB.

To debug this i will have to add views from my layout to working layout(in step 3) one by one and see when it disappears.

I will let you know.

Circular PB is way too good to be missed.

Thanks

Hi Erel,

I got the Circular Progress Bar working.
The problem was a routine which i was calling in activate to color all controls(including Activity,Panel)
B4X:
Sub PP_Format_Layout(MyActivity As Activity,sTheme As String)
    Dim lbl As Label
    Dim txt As EditText
    Dim btn As Button
    Dim sp As Spinner
    Dim pnl As Panel
    Dim Act As Activity
       
    Dim ilblred,ilblgreen,ilblblue,ilbltitlered,ilbltitlegreen,ilbltitleblue As Int
    Dim ibtnred,ibtngreen,ibtnblue As Int
    Dim itxtred,itxtgreen,itxtblue As Int
    Dim iActivityred,iActivitygreen,iActivityblue As Int
    'pink

    If sTheme="pink_green" Then
       
        iActivityred=232:iActivitygreen=232:iActivityblue=216 'lightest gray
       
        ilbltitlered=255:ilbltitlegreen=20:ilbltitleblue=147 'pink
       
        ilblred=232:ilblgreen=232:ilblblue=216    'lightest gray
        itxtred=216:itxtgreen=216:itxtblue=216    'dark gray
        ibtnred=146:ibtngreen=208:ibtnblue=80    'green
    End If
    If sTheme="brown_blue" Then
        iActivityred=255:iActivitygreen=20:iActivityblue=147
       
        ilbltitlered=255:ilbltitlegreen=20:ilbltitleblue=147
       
        ilblred=255:ilblgreen=20:ilblblue=147
        itxtred=255:itxtgreen=20:itxtblue=147
        ibtnred=255:ibtngreen=20:ibtnblue=147
    End If
    If sTheme="voilet_green" Then
        iActivityred=255:iActivitygreen=20:iActivityblue=147
       
        ilbltitlered=255:ilbltitlegreen=20:ilbltitleblue=147
       
        ilblred=255:ilblgreen=20:ilblblue=147
        itxtred=255:itxtgreen=20:itxtblue=147
        ibtnred=255:ibtngreen=20:ibtnblue=147
    End If
   
    MyActivity.Color=Colors.ARGB(255,iActivityred,iActivitygreen,iActivityblue)
    Dim n As Int
   
    For Each v As View In MyActivity.GetAllViewsRecursive
    n=n+1   
        If v Is Activity Then
            Act=v
            Act.Color=Colors.ARGB(255,iActivityred,iActivitygreen,iActivityblue)
        End If
        If v Is Panel Then
            pnl=v
            pnl.Color=Colors.ARGB(255,iActivityred,iActivitygreen,iActivityblue)
        End If
        If v Is Label Then
            lbl=v
            If StringIsNull(lbl.Tag)=False Then
                If lbl.Tag="title" Then
                    lbl.Color=Colors.ARGB(255,ilbltitlered,ilbltitlegreen,ilbltitleblue)
                    lbl.TextColor=Colors.white
                    lbl.TextSize=18
                Else
                    If lbl.Text="Name" Then
                        n=2
                    End If
                    lbl.Color=Colors.ARGB(255,ilblred,ilblgreen,ilblblue)
                    lbl.TextColor=Colors.Gray
                    lbl.TextSize=15
                End If
            End If
        End If
       
        If v Is Button Then
            btn=v
        If StringIsNull(btn.tag)=False Then           
            Dim tmpTag As String=btn.Tag
           
            If tmpTag.Contains("btn") Then
                btn.Color=Colors.ARGB(255,ibtnred,ibtngreen,ibtnblue)
                btn.TextColor=Colors.White
                btn.TextSize=16
            End If
        End If
        End If
        If v Is EditText Then
            txt=v
            txt.Color=Colors.ARGB(255,itxtred,itxtgreen,itxtblue)
            txt.TextColor=Colors.DarkGray
            txt.TextSize=15
        End If
        If v Is Spinner Then
            sp=v
            sp.Color=Colors.ARGB(255,itxtred,itxtgreen,itxtblue)
            sp.DropdownBackgroundColor=Colors.argb(255,itxtred,itxtgreen,itxtblue)
            sp.TextColor=Colors.DarkGray
            sp.TextSize=15
        End If
       
    Next
   
End Sub

If a don't call this routine Circular Progress Bar shows properly.
Note that within this routine i tried to remove coloring activity and panel but still it was not showing.
I had to remove calling the whole routine altogether.

I am trying to modify this routine for CPB.

Juzer
 
Last edited:
Upvote 0
Top