May 24, 2017 Replies: 43 In most cases AppCompat is no longer needed and will only make things more complicated. B4XPages example with dynamic menu: https://www.b4x.com/android/forum/threads/b4x-menu-badges.133301/ The project attached uses the powerful AppCompat library to replace the built-in ActionBar with a more robust ToolBar. The NavigationItemClick event is raised when the icon is clicked. You can set ToolbarHelper.ShowUpIndicator = True to show an up arrow instead. It will raise the same event. You can change the toolbar color in the manifest editor. Sliding side menu + dynamic menu items: https://www.b4x.com/android/forum/threads/appcompat-with-toolbar-minimal-example.79896/#post-509530 Example based on B4ADrawer: https://www.b4x.com/android/forum/threads/class-b4adrawer-sliding-drawer.97828/#post-616518 Edit: depending on your Android SDK version, you might get this error: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/arch/core/executor/ArchTaskExecutor; The solution is to add this line in the main activity: Code: #AdditionalJar: androidx.arch.core:core-runtime Attachments upload_2017-5-24_12-18-26.png 7.3 KB · Views: 4,761 AppCompatExample.zip AppCompatExample.zip 9.9 KB · Views: 640 Last edited: Jun 23, 2023 Click to expand...
In most cases AppCompat is no longer needed and will only make things more complicated. B4XPages example with dynamic menu: https://www.b4x.com/android/forum/threads/b4x-menu-badges.133301/ The project attached uses the powerful AppCompat library to replace the built-in ActionBar with a more robust ToolBar. The NavigationItemClick event is raised when the icon is clicked. You can set ToolbarHelper.ShowUpIndicator = True to show an up arrow instead. It will raise the same event. You can change the toolbar color in the manifest editor. Sliding side menu + dynamic menu items: https://www.b4x.com/android/forum/threads/appcompat-with-toolbar-minimal-example.79896/#post-509530 Example based on B4ADrawer: https://www.b4x.com/android/forum/threads/class-b4adrawer-sliding-drawer.97828/#post-616518 Edit: depending on your Android SDK version, you might get this error: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/arch/core/executor/ArchTaskExecutor; The solution is to add this line in the main activity: Code: #AdditionalJar: androidx.arch.core:core-runtime
AscySoft Active Member Licensed User Longtime User Jul 1, 2017 #21 Is there a way to show the overflow menu from code? [as simulating a click event] Last edited: Jul 1, 2017
C Cassie Active Member Licensed User Longtime User Jul 2, 2017 #22 DonManfred said: Talking about B4A you are right. But Erel said that the issue is related to the installed Build-Tools. It should be a NEWER one than you are using. Install the newer 25.0.3. DEINSTALL all versions <25 Click to expand... Follow your information and now it is working.. Thanks guys..
DonManfred said: Talking about B4A you are right. But Erel said that the issue is related to the installed Build-Tools. It should be a NEWER one than you are using. Install the newer 25.0.3. DEINSTALL all versions <25 Click to expand... Follow your information and now it is working.. Thanks guys..
Erel B4X founder Staff member Licensed User Longtime User Jul 2, 2017 #23 AscySoft said: Is there a way to show the overflow menu from code? [as simulating a click event] Click to expand... Please start a new thread for this question.
AscySoft said: Is there a way to show the overflow menu from code? [as simulating a click event] Click to expand... Please start a new thread for this question.
AscySoft Active Member Licensed User Longtime User Jul 2, 2017 #24 Done. https://www.b4x.com/android/forum/t...s-simulating-a-click-event.81264/#post-515006 Last edited: Jul 4, 2017
F fishwolf Well-Known Member Licensed User Longtime User Aug 8, 2017 #25 Erel said: A new example that shows how to update or add menu items at runtime. Click to expand... i have try to set Code: <item name="android:colorBackground">#4CFF00</item> or <item name="android:textColorPrimary">#4CFF00</item> but toolbar menu color don't change work fine if change Code: <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">#4CFF00</item>
Erel said: A new example that shows how to update or add menu items at runtime. Click to expand... i have try to set Code: <item name="android:colorBackground">#4CFF00</item> or <item name="android:textColorPrimary">#4CFF00</item> but toolbar menu color don't change work fine if change Code: <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">#4CFF00</item>
so27 Active Member Licensed User Longtime User Sep 22, 2017 #26 Why work created apps with me only from Android 5? As soon as I install the app on Android 4.x, it crashes directly.
Why work created apps with me only from Android 5? As soon as I install the app on Android 4.x, it crashes directly.
Erel B4X founder Staff member Licensed User Longtime User Sep 22, 2017 #27 You should check the logs and post the error message. Make sure to use the latest version of Android SDK: https://www.b4x.com/android/forum/threads/80090/#content
You should check the logs and post the error message. Make sure to use the latest version of Android SDK: https://www.b4x.com/android/forum/threads/80090/#content
so27 Active Member Licensed User Longtime User Sep 23, 2017 #28 Erel said: Make sure to use the latest version of Android SDK: https://www.b4x.com/android/forum/threads/80090/#content Click to expand... Thank you Erel, so it worked. I have used the old AVD Manager.
Erel said: Make sure to use the latest version of Android SDK: https://www.b4x.com/android/forum/threads/80090/#content Click to expand... Thank you Erel, so it worked. I have used the old AVD Manager.
Drago Bratko Active Member Licensed User Longtime User Oct 12, 2017 #29 I have issue with running it. :-( Compile&Run is finished well, and no log entries loged in IDE. Then, apk is transfered well to B4A-Bridge, and is asking me to allow installation. And after that I got following screen which says that "App is not installed, as it's assumed that package is damaged". Any ideas ? I have latest Android SDK build tools and latest jdk version. Attachments Screenshot_20171012-094004.png 23.5 KB · Views: 1,300
I have issue with running it. :-( Compile&Run is finished well, and no log entries loged in IDE. Then, apk is transfered well to B4A-Bridge, and is asking me to allow installation. And after that I got following screen which says that "App is not installed, as it's assumed that package is damaged". Any ideas ? I have latest Android SDK build tools and latest jdk version.
Erel B4X founder Staff member Licensed User Longtime User Oct 13, 2017 #30 Try to change the package name (Ctrl + B).
Drago Bratko Active Member Licensed User Longtime User Oct 13, 2017 #31 Thank you Erel very much for your great support. It works like you suggested. Solved.
T trueboss323 Active Member Licensed User Longtime User Oct 20, 2017 #32 Is there a way to have the .ShowUpIndicator using the native Action Bar ?
Erel B4X founder Staff member Licensed User Longtime User Oct 22, 2017 #33 Please start a new thread for this question.
R Ramon Bustamante Member Licensed User Nov 25, 2017 #34 Hi guys, I tried to execute AppCompat and I obtain the errors: Organizing libraries. Error Maven artifact not found: com.android.support/appcompat-v7 Attachments Error.png 101.5 KB · Views: 1,240
Hi guys, I tried to execute AppCompat and I obtain the errors: Organizing libraries. Error Maven artifact not found: com.android.support/appcompat-v7
Erel B4X founder Staff member Licensed User Longtime User Nov 26, 2017 #35 Use this tool to download the latest version of Android SDK and the recommended resources: https://www.b4x.com/android/forum/threads/80090/#content
Use this tool to download the latest version of Android SDK and the recommended resources: https://www.b4x.com/android/forum/threads/80090/#content
R Ramon Bustamante Member Licensed User Nov 26, 2017 #36 Erel said: Use this tool to download the latest version of Android SDK and the recommended resources: https://www.b4x.com/android/forum/threads/80090/#content Click to expand... Thanks Erel. Now running. It is necesary the Android Support Repository, under Extras section.
Erel said: Use this tool to download the latest version of Android SDK and the recommended resources: https://www.b4x.com/android/forum/threads/80090/#content Click to expand... Thanks Erel. Now running. It is necesary the Android Support Repository, under Extras section.
M.LAZ Active Member Licensed User Longtime User Nov 28, 2017 #37 how to display the slide menu in the right side ? i try to change it by Code: sm.Mode = sm.RIGHT ' LEFT but the hamburger icon still in the left side...
how to display the slide menu in the right side ? i try to change it by Code: sm.Mode = sm.RIGHT ' LEFT but the hamburger icon still in the left side...
Erel B4X founder Staff member Licensed User Longtime User Nov 29, 2017 #38 Please start a new thread for your question.
David Elkington Active Member Licensed User Longtime User Dec 5, 2017 #40 This looks just what I need. I ran the demo fine, but when I tried to plug this onto my main menu on my app, it compiles ok, but it gives the following error, any ideas? java.lang.RuntimeException: java.lang.ClassCastException: b4a.riskassessment.mainmenu cannot be cast to android.support.v7.app.AppCompatActivity
This looks just what I need. I ran the demo fine, but when I tried to plug this onto my main menu on my app, it compiles ok, but it gives the following error, any ideas? java.lang.RuntimeException: java.lang.ClassCastException: b4a.riskassessment.mainmenu cannot be cast to android.support.v7.app.AppCompatActivity