Android Question When I use the action menu class, my app crashes when I click on any button on my module

Callan

Member
Licensed User
Longtime User
Hey guys,
I just wrote some code for an assignment I'm doing now. However, I added an action menu class to the project and when I click on any buttons in the module it crashes.Why is that?
Here is a copy of the activity load code and the error I'm getting


Code for Activity
"Activity.LoadLayout("menu")
If FirstTime Then
reqManager.Initialize(Me, "http://10.1.4.39:17178")
End If
MyMenu.Initialize(Activity, Me, "ComiX", "SM", "L", 50dip, 300dip, Colors.Black , Null)
Dim item As String
MyMenu.AddItem(LoadBitmap(File.DirAssets, "account.png"), "Hi," & Main.name , Colors.White, Colors.Transparent, 1)
MyMenu.AddItem(LoadBitmap(File.DirAssets, "mybooks.png"), "Purchases", Colors.White, Colors.Transparent, 2)
MyMenu.AddItem(LoadBitmap(File.DirAssets, "store.png"), "Store", Colors.White, Colors.Transparent, 3)
MyMenu.AddItem(LoadBitmap(File.DirAssets, "Star.png"), "On Sale", Colors.White, Colors.Transparent, 4)
MyMenu.AddItem(LoadBitmap(File.DirAssets, "logout.png"), "Log Out", Colors.White, Colors.Transparent, 5)
DateTime.DateFormat = "dd MM yyyy hh:mm a"
Label1.Text = ("Today is the" & DateTime.Date(DateTime.now))
ListView1.Color = Colors.Black
ListView1.TwoLinesLayout.Label.TextColor = Colors.Red
ListView1.TwoLinesLayout.SecondLabel.TextColor = Colors.Gray
SelectCSoon"

Error codes
"java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Callan.ComiX/com.Callan.ComiX.library}: android.view.InflateException: Binary XML file line #39: Error inflating class com.android.internal.widget.ActionBarView"
AND
"Caused by: android.view.InflateException: Binary XML file line #39: Error inflating class com.android.internal.widget.ActionBarView"

If someone could help me with this it will be very much appreciated.
Cheers.
:)
 
Last edited:

Callan

Member
Licensed User
Longtime User
Maybe it is too large (>500kb).

Which library are you using? You don't need need any library in order to add menu items to the action bar. Just call Activity.AddMenuItem3

Yep, just realised that it was too large..Just zipped it again, taking out any background images from the folder. I have uploaded the folder with this
 

Attachments

  • App.zip
    27.1 KB · Views: 291
Upvote 0

Callan

Member
Licensed User
Longtime User
Hey Erel,
the link you gave me was a link which led to github...And if you read some of my codes I'm nowhere near to that type of coding....
Just wanted abit of advice, which library/class for the sliding menu, would be suitable for someone of my level....
Cheers
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Hey Erel,
the link you gave me was a link which led to github...And if you read some of my codes I'm nowhere near to that type of coding....
Just wanted abit of advice, which library/class for the sliding menu, would be suitable for someone of my level....
Cheers

There is a link to github (the source of this librarywrapper), yes. But you dont need that source... The lib is included in the post erel shows here...
 
Upvote 0
Top