Gracias angel ya vi ese hilo y tengo todo tal cual, ademas descargue ejemplos y tampoco funcionan
Sigue sin funcionar he intentado con las android-20 a la android-26 y nada no funciona
no muestra ningún error ni alertas en el b4a,
compila normal pero al momento de iniciar la app en el dispositivo se cierra
#jorgelcr la linea esta agregada
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
#Extends: android.support.v7.app.AppCompatActivity
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
Private menu As ACPopupMenu
Private Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
menu.Initialize("menu", Button1)
menu.AddMenuItem(1, "Item 1", Null)
menu.AddMenuItem(2, "Item 2", Null)
menu.AddMenuItem(3, "Item 3", Null)
End Sub
tomado de un ejemplo aquí en el foro
B4X:#Region Project Attributes #ApplicationLabel: B4A Example #VersionCode: 1 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False #End Region #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region #Extends: android.support.v7.app.AppCompatActivity Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. End Sub Sub Globals Private menu As ACPopupMenu Private Button1 As Button End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("1") menu.Initialize("menu", Button1) menu.AddMenuItem(1, "Item 1", Null) menu.AddMenuItem(2, "Item 2", Null) menu.AddMenuItem(3, "Item 3", Null) End Sub
tomado de un ejemplo aquí en el foro
B4X:#Region Project Attributes #ApplicationLabel: B4A Example #VersionCode: 1 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False #End Region #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region #Extends: android.support.v7.app.AppCompatActivity Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. End Sub Sub Globals Private menu As ACPopupMenu Private Button1 As Button End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("1") menu.Initialize("menu", Button1) menu.AddMenuItem(1, "Item 1", Null) menu.AddMenuItem(2, "Item 2", Null) menu.AddMenuItem(3, "Item 3", Null) End Sub
#Extends: android.support.v7.app.AppCompatActivity
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#Extends: android.support.v7.app.AppCompatActivity
#End Region
'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="5" android:targetSdkVersion="19"/>
<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.
SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#0098FF</item>
<item name="colorPrimaryDark">#007CF5</item>
<item name="colorAccent">#AAAA00</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="textAppearanceLargePopupMenu">@style/myPopupMenuTextAppearanceLarge</item>
<item name="android:textAppearanceLargePopupMenu">@style/myPopupMenuTextAppearanceLarge</item>
<item name="textAppearanceSmallPopupMenu">@style/myPopupMenuTextAppearanceSmall</item>
<item name="android:textAppearanceSmallPopupMenu">@style/myPopupMenuTextAppearanceSmall</item>
<item name="popupMenuStyle">@style/myPopupMenuStyle</item>
<item name="android:popupMenuStyle">@style/myPopupMenuStyle</item>
</style>
<style name="myPopupMenuStyle" parent="@style/Widget.AppCompat.Light.PopupMenu">
<item name="android:popupBackground">#FF0AECD3</item>
</style>
<style name="myPopupMenuTextAppearanceSmall" parent="@style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Small">
<item name="android:textColor">#FF0000</item>
</style>
<style name="myPopupMenuTextAppearanceLarge" parent="@style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Large">
<item name="android:textColor">#FF0000</item>
</style>
</resources>
)
linea en su lugar y sigue sin funcionar
manifest
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="5" android:targetSdkVersion="19"/> <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. SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden) SetApplicationAttribute(android:theme, "@style/MyAppTheme") CreateResource(values, theme.xml, <resources> <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">#0098FF</item> <item name="colorPrimaryDark">#007CF5</item> <item name="colorAccent">#AAAA00</item> <item name="windowNoTitle">true</item> <item name="windowActionBar">false</item> <item name="textAppearanceLargePopupMenu">@style/myPopupMenuTextAppearanceLarge</item> <item name="android:textAppearanceLargePopupMenu">@style/myPopupMenuTextAppearanceLarge</item> <item name="textAppearanceSmallPopupMenu">@style/myPopupMenuTextAppearanceSmall</item> <item name="android:textAppearanceSmallPopupMenu">@style/myPopupMenuTextAppearanceSmall</item> <item name="popupMenuStyle">@style/myPopupMenuStyle</item> <item name="android:popupMenuStyle">@style/myPopupMenuStyle</item> </style> <style name="myPopupMenuStyle" parent="@style/Widget.AppCompat.Light.PopupMenu"> <item name="android:popupBackground">#FF0AECD3</item> </style> <style name="myPopupMenuTextAppearanceSmall" parent="@style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Small"> <item name="android:textColor">#FF0000</item> </style> <style name="myPopupMenuTextAppearanceLarge" parent="@style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Large"> <item name="android:textColor">#FF0000</item> </style> </resources> )
probado con la AppCompat 3.51 y 3.52
'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="15" android:targetSdkVersion="22"/>
<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.
'Tema Aplicación
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#AFB42B</item>
<item name="colorPrimaryDark">#9E9D24</item>
<item name="colorAccent">#C0CA33</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
</resources>
)
No hay caso sigue sin funcionar incluso los ejemplos que he descargado de los foros ninguno funciona
lo que es posible que tenga algo mal en mi instalación o sistema operativo.
me rindo con esa librería
Gracias por el interés de ayudar SALUDOS...