Android Question #Extends and B4A 10.70

Status
Not open for further replies.

MarcoRome

Expert
Licensed User
Longtime User
Hi @Erel, All
i have a project that has
B4X:
#Extends: android.support.v7.app.AppCompatActivity
and in the Manifest i i have.

B4X:
SetApplicationAttribute(android:theme, "@style/MyAppTheme")

CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">#222222</item>
        <item name="colorPrimaryDark">#222222</item>
        <item name="colorAccent">#009246</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
    </style>
</resources>
)

Up to version 10.60 it compiled and ran correctly.
With 10.70 it is compiled but the set theme ( Theme.AppCompat.Light.NoActionBar ) is not executed

Why ?
Thank you
Marco
 

MarcoRome

Expert
Licensed User
Longtime User
I tried this
and No, dont work. The message is:

 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
I deleted all previous AppCompat libraries and reinstalled 4.
The example Work.
However, i cannot understand, despite having the following code,

B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

'Se utilizzi http
CreateResourceFromFile(Macro, Core.NetworkClearText)
AddApplicationText(
<uses-library
      android:name="org.apache.http.legacy"
      android:required="false" />
)

'Set activity in landscape
SetActivityAttribute(act_stampante_virtuale, android:screenOrientation, "landscape")
SetActivityAttribute(act_statistiche_tablet, android:screenOrientation, "landscape")


SetApplicationAttribute(android:theme, "@style/MyAppTheme")

CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">#222222</item>
        <item name="colorPrimaryDark">#222222</item>
        <item name="colorAccent">#009246</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
    </style>
</resources>
)


' This is modify for SumUp-API
' First you have to ad these intent-filter
AddActivityText(paymentresult,  <intent-filter>
           <action android:name=".paymentresult"></action>
           <category android:name="android.intent.category.DEFAULT"></category>
           <category android:name="android.intent.category.BROWSABLE"></category>
      </intent-filter>)
' After that you have to replace the short-name .paymentresult with the package-namen and short-name.
AddReplacement (.paymentresult, com.xxxx.yyyy.gestione.paymentresult)
' You can use another name for the result-activity, but you have to change it in your starting
' Sub and here in the manifest-editor
SetActivityAttribute(act_lista_ordini, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(act_lista_ordini_nostampa, android:windowSoftInputMode, adjustResize|stateHidden)


why for example the msgboxes i receive them in Dark mode if i compile with 10.70 ??



so the activity, etc.

If i compile the same code with version 10.60 the result is the following:



correct.
 
Upvote 0

Spavlyuk

Active Member
Licensed User
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
Upvote 0
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…