Android Question error while loadind tabstrip

Makumbi

Well-Known Member
Licensed User
This is my manifest editor
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:usesCleartextTraffic, "true")
SetApplicationAttribute(android:allowBackup, "false")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
CreateResourceFromFile(Macro, Core.NetworkClearText)
AddPermission(com.majeur.launcher.permission.UPDATE_BADGE)
AddPermission(com.sec.android.provider.badge.permission.READ)
AddPermission(com.sec.android.provider.badge.permission.WRITE)
AddPermission(com.htc.launcher.permission.READ_SETTINGS)
AddPermission(com.htc.launcher.permission.UPDATE_SHORTCUT)
AddPermission(com.anddoes.launcher.permission.UPDATE_COUNT)
AddPermission(com.majeur.launcher.permission.UPDATE_BADGE)
AddPermission(com.huawei.launcher3.permission.READ_SETTINGS)
AddPermission(com.huawei.launcher3.permission.WRITE_SETTINGS)
AddPermission(com.huawei.launcher2.permission.READ_SETTINGS)
AddPermission(com.huawei.launcher2.permission.READ_SETTINGS)
AddPermission(com.huawei.android.launcher.permission.WRITE_SETTINGS)
AddPermission(com.huawei.android.launcher.permission.READ_SETTINGS)
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
CreateResource(values, colors.xml,
<resources>
    <color name="actionbar">#ff039be5</color>
    <color name="statusbar">#ff006db3</color>
    <color name="textColorPrimary">#ffffffff</color>
    <color name="navigationBar">#ff006db3</color>
</resources>
)
CreateResource(values-v20, theme.xml,
<resources>
    <style name="LightTheme" parent="@android:style/Theme.Material.Light">
         <item name="android:colorPrimary">@color/actionbar</item>
         <item name="android:colorPrimaryDark">@color/statusbar</item>
         <item name="android:textColorPrimary">@color/textColorPrimary</item>
         <item name="android:navigationBarColor">@color/navigationBar</item>
    </style>
</resources>
)

'********* TabStrip ***********************
CreateResource(drawable, background_tab.xml,
<selector xmlns:android="http://schemas.android.com/apk/res/android"
    android:exitFadeDuration="@android:integer/config_shortAnimTime">
    <item android:state_pressed="true" android:drawable="@color/background_tab_pressed" />
    <item android:state_focused="true" android:drawable="@color/background_tab_pressed"/>
    <item android:drawable="@android:color/transparent"/>
</selector>)
CreateResource(values, colors.xml,
<resources>
    <color name="background_tab_pressed">#6633B5E5</color>
</resources>)


'******************************************


'End of default text.





'End of default text.




this is the error i get

B4X:
B4A Version: 9.80
Java Version: 8
Parsing code.    (0.97s)
Building folders structure.    (0.75s)
Compiling code.    (3.13s)
Compiling layouts code.    (0.24s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Generating R file.    Error
Failed to generate resource table for split ''
res\values-v20\theme.xml:6: error: Error: No resource found that matches the given name (at 'android:textColorPrimary' with value '@color/textColorPrimary').
 

Makumbi

Well-Known Member
Licensed User

Attachments

  • samplepage.png
    samplepage.png
    130.3 KB · Views: 166
Upvote 0

Makumbi

Well-Known Member
Licensed User
Where does this manifest code come from? Why have you added it?
It has nothing to do with TabStrip: https://www.b4x.com/android/forum/threads/tabstripviewpager-better-viewpager.63975/#content

i was implement every thing as it it on that link you has showed but on that link's example the tabstrip comes with these feature
i mean those four dots that you click on and
Screenshot_1585908032.png

which produces this

Screenshot_1585906750.png


but after transferring it to my main project this option does not come here is my transferred this is as it appear in my main project

Screenshot_1585904526.png


below is my other code which creates it

B4X:
#Region  Project Attributes
    #ApplicationLabel: SmisKabojja
    #VersionCode: 30
    #VersionName: SmisKabojja
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
    #BridgeLogger: True
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region
#AdditionalJar: com.android.support:support-v4
'Activity module
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    'Dim SQL1 As SQL
    Dim cursor1 As Cursor
    Private smiley As Bitmap
    'Dim scvPersons As ScrollView
    Type RowCol (Row As Int, Col As Int)
    Private xui As XUI
   

End Sub

Sub Globals
    Private TabStrip1 As TabStrip
    Private Page3ListView1 As ListView
    Private Parentprof As ListView
    Private Parentaccount As ListView
    Private Classteachers As ListView
    Private Newstudent As ListView
    Private Homeworklist As ListView
    Private Helpabout As ListView
    Private mustread As ListView
    Private combook As ListView
    Private B4XPageIndicator1 As B4XPageIndicator
'    Private Drawer As B4XDrawer
    Private returnValue As Boolean
    Dim cs As CSBuilder
    Private CustomListView1 As CustomListView
    Private pnlTop As B4XView
    Private lblHeader As B4XView
    Private CLVHeader1 As CLVHeader
    Private ImageView1 As B4XView
    'Dim Froms As EditText
    Private badger1 As Badger
    'Dim bkact As String
    'Dim sm As SlideMenu
    'Dim LVDb As ListView
   
    'Private BBScrollingLabel1 As BBScrollingLabel
    'Private TextEngine As BCTextEngine
    Private B4XTable1 As B4XTable

    'Private xui As XUI
    Dim DATAs As List
    Dim CCode As EditText
    Dim Phone As EditText
    Dim Emails As MaskedEditText
   
    Dim Dialog As JavaObject
    Private xui As XUI

'    Dim Table1 As Table
  '  Dim label2 As EditText
   
    'Private btnAdd, btnEdit, btnFilter, btnSetFilter As Button
    Private lblSelectedItem As Label
    Private label1 As Label
    Private label2 As Label
   
    'Dim imageview1 As ImageView
    Private male As RadioButton
    Private female As RadioButton
    Private Sponsor As RadioButton
    Private Other As RadioButton
    ' used in ExecuteHTML

End Sub



Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    Activity.Title="KABOJJA JUNIOR APP"
    If FirstTime Then
        smiley = LoadBitmapResize(File.DirAssets, "smiley.png", 24dip, 24dip, False)
    End If
   
   
    cursor1 = Starter.SQL1.ExecQuery("SELECT ID FROM Register")
    If cursor1.RowCount > 0 Then
        For i = 0 To cursor1.RowCount - 1
            cursor1.Position = i
       
            'StartActivity(Main)
       
            Dim intCount As Int
            intCount = Starter.SQL1.ExecQuerySingleResult("SELECT count(Id) as Id FROM Eventsinfo WHERE Tcode NOT LIKE '%READ%';")
           
            If intCount > 0 Then
                Dim ms As Int = intCount
            Else
                Dim ms As Int = 0.5
            End If
            Log(ms)
            If ms = 0.5 Then
                'badger1.SetBadge(btnAdd, ms)
            Else
                'badger1.SetBadge(btnAdd, ms)
            End If
           
   
        Next
       
    Else
        'Activity.LoadLayout("Registerdata")
        StartActivity(Registerdata)
    End If
   
   
    'Sleep(0)
    male.Initialize("male")
    female.Initialize("female")
    Sponsor.Initialize("sponsor")
    Other.Initialize("Other")
    lblSelectedItem.Initialize("lblSelectedItem")
    Emails.Initialize("Emails")
    CCode.Initialize("CCode")
    Phone.Initialize("Phone")
   
   
    'ProgressDialogShow2("Processing Please Wait...",False)
    Sleep(0)
    Dim hold As String
    Dim rst As ResumableSub = checkuser(hold)
    Wait For(rst) Complete (Result As String)
    Log("result: " & Result)
    Log(hold)
    hold=Result
    Log("after sum")
    If hold=Null Then
        'MsgboxAsync("Poor Internet Connectivity Please  Connect Again" ,"SMIS")
        'Sleep(50)
        'Activity.Finish
        Return
    End If
                If hold="Expired" Then
                    Return
                    Else
        If hold="Inactive" Then
            Return
            End If
                End If
   
    If hold="Active" Then
        'StartActivity(Failedlogin)
        ProgressDialogShow2("Validating User Please Wait...",False)
        Sleep(30)
        Activity.LoadLayout("1")
        Activity.Title="SCHOOL APP"
        Activity.Title="Menu"
       
        'TextEngine.Initialize(Activity) 'change to Form.RootPane in B4J or Page.RootPanel in B4i
        'BBScrollingLabel1.TextEngine = TextEngine
                'KJSNew.Text = $"[b][u]BBScrollingLabel[/u][/b]:More information: ghghghghgghghghghgh..............."$
        'BBScrollingLabel1.Text= $"[b][u]BBScrollingLabel[/u][/b]:Wait While : Loading Kabojja Junior App"$
        Dim holdnt As String
        Dim rstnt As ResumableSub = ValidateReg(holdnt)
        Wait For(rstnt) Complete (Result As String)
               
        Dim holdn As String
        Dim rstn As ResumableSub = Notify(holdn)
        Wait For(rstn) Complete (Result As String)
               
        '    Processevents
       
        ' Load Emails
        Dim holdnbemail As String
        Dim rstnbemail As ResumableSub = Loademail(holdnbemail)
        Wait For(rstnbemail) Complete (Result As String)

        Dim w As String
        Dim rstn As ResumableSub = Processevents(w)
        Wait For(rstn) Complete (Result As String)
               
   
        Dim holdna As String
        Dim rstna As ResumableSub = accountprocess(holdna)
        Wait For(rstna) Complete (Result As String)
       
        Dim holdnb As String
        Dim rstnb As ResumableSub = Loadterms(holdnb)
        Wait For(rstnb) Complete (Result As String)
       
   
       
        Dim holdnba As String
        Dim rstnba As ResumableSub = Loadanouncements(holdnba)
        Wait For(rstnba) Complete (Result As String)
       
        ProgressDialogHide
        ProgressDialogShow2("Processing the Finance data Please Wait...",False)
        Sleep(10)
        'Sleep(100)
       
        'Processacademics
               
        Dim holdnact As String
        Dim rstnact As ResumableSub = LoadStudents(holdnact)
        Wait For(rstnact) Complete (Result As String)
        ProgressDialogHide
        ProgressDialogShow2("Processing the Academics Please Wait...",False)
       
        Dim holdnac As String
        Dim rstnac As ResumableSub = Processacademics(holdnac)
        Wait For(rstnac) Complete (Result As String)
   
   
        TabStrip1.LoadLayout("Page1", "Parent Profile"& Chr(0xF2BC))
        'TabStrip1.LoadLayout("Page1", cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF007)).PopAll.Append("Parent Profile").PopAll)
        TabStrip1.LoadLayout("Page2", "Accounts"& Chr(0xF19C))
        TabStrip1.LoadLayout("Page3", "Academics"& Chr(0xF19D))
        TabStrip1.LoadLayout("Page4", "Communication Book"& Chr(0xF1D7))
        TabStrip1.LoadLayout("Page5", "New Admissions"& Chr(0xF0C0))
        TabStrip1.LoadLayout("Page6", "Home work"& Chr(0xF019))
        TabStrip1.LoadLayout("Page7", "Get Class Teacher Details"& Chr(0xF007))
        TabStrip1.LoadLayout("Page8", "Must Read"& Chr(0xF071))
        TabStrip1.LoadLayout("Page9", "Help About App"& Chr(0xF095))
        'For i = 1 To 3
        'Page3ListView1.AddSingleLine($"Item ${i}"$)
       
        Page3ListView1.AddSingleLine($"Current Performance"$)
        Page3ListView1.AddSingleLine($"Past Performance"$)
        Page3ListView1.AddSingleLine($"Performance Curves"$)
   
        Parentprof.AddSingleLine($"Profile"$)
        Parentprof.AddSingleLine($"Change Number"$)
   
        combook.AddSingleLine($"Send Message To School"$)
   
        Parentaccount.AddSingleLine($"Check Balance"$)
        Parentaccount.AddSingleLine($"Account Statement"$)
        Helpabout.AddSingleLine($"Help About App"$)
        mustread.AddSingleLine($"Must Read"$)
        'Parentprof.AddSingleLine($"Change Number"$)
        'Next
   
        'For k = 1 To 2
        'ListView1.AddSingleLine($"Item ${k}"$)
        Newstudent.AddSingleLine($"New Student Applications"$)
        Classteachers.AddSingleLine($"Get Class teacher Contacts"$)
        'ListView1.AddSingleLine($"Send Homework To Your Email Address"$)
       
        Homeworklist.AddSingleLine($"Download Homework"$)
        Homeworklist.AddSingleLine($"Send work To Your Email"$)
        'Next
   
   
        For Each lbl As Label In GetAllTabLabels(TabStrip1)
            lbl.Typeface = Typeface.FONTAWESOME
        Next
        'Sleep(100)
        'ProgressDialogHide
       
        Sleep(10)
        '    ShowTable
        Activity.AddMenuItem("Parent Profile", "mnu1")
        Activity.AddMenuItem("Accounts", "mnu2")
        Activity.AddMenuItem("Academics", "mnu3")
        Activity.AddMenuItem("Communication Book", "mnu4")
        Activity.AddMenuItem("New Admissions", "mnu5")
        Activity.AddMenuItem("Home work Download", "mnu6")
        Activity.AddMenuItem("Get Class Teacher Details", "mnu7")
        Activity.AddMenuItem("Must Read", "mnu8")
        Activity.AddMenuItem("Help", "mnu9")
        ProgressDialogHide
        Return
       
           
    End If
End Sub
 
Last edited:
Upvote 0
Top