My name is Tomasz or you may know me better as Cheesebaron. I work mostly within the .NET mobile ecosystem. You can find lots of my contributions here.
I help maintain all sorts of .NET mobile projects such as:
A port and extention of https://github.com/johannilsson/android-actionbar
My name is Tomasz or you may know me better as Cheesebaron. I work mostly within the .NET mobile ecosystem. You can find lots of my contributions here.
I help maintain all sorts of .NET mobile projects such as:
Hi,
I added your class library project to my solution and I get this error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Tool exited with code: 1. Output: /Users/josephanderson/Projects/GitHub/glass/Source/Core/Glass.Core.Android/obj/Debug/library_projects/LegacyBar.Library/library_project_imports/res/values/attrs.xml:14: error: Attribute "title" has already been defined
/Users/josephanderson/Projects/GitHub/glass/Source/Core/Glass.Core.Android/obj/Debug/library_projects/LegacyBar.Library/library_project_imports/res/values/attrs.xml:14: error: Attribute "title_color" has already been defined
/Users/josephanderson/Projects/GitHub/glass/Source/Core/Glass.Core.Android/obj/Debug/library_projects/LegacyBar.Library/library_project_imports/res/values/attrs.xml:14: error: Attribute "separator" has already been defined
/Users/josephanderson/Projects/GitHub/glass/Source/Core/Glass.Core.Android/obj/Debug/library_projects/LegacyBar.Library/library_project_imports/res/values/attrs.xml:14: error: Attribute "background" has already been defined
/Users/josephanderson/Projects/GitHub/glass/Source/Core/Glass.Core.Android/obj/Debug/library_projects/LegacyBar.Library/library_project_imports/res/values/attrs.xml:14: error: Attribute "background_item" has already been defined
/Users/josephanderson/Projects/GitHub/glass/Source/Core/Glass.Core.Android/obj/Debug/library_projects/LegacyBar.Library/library_project_imports/res/values/attrs.xml:14: error: Attribute "theme" has already been defined
/Users/josephanderson/Projects/GitHub/glass/Source/Core/Glass.Core.Android/obj/Debug/library_projects/LegacyBar.Library/library_project_imports/res/values/attrs.xml:14: error: Attribute "is_bottom" has already been defined
/Users/josephanderson/Projects/GitHub/glass/Source/Core/Glass.Core.Android/obj/Debug/library_projects/LegacyBar.Library/library_project_imports/res/values/attrs.xml:14: error: Attribute "light_icons" has already been defined
(Glass.Core.Android)
What am I doing wrong?
MenuItemLegacyBarAction has both Context and Activity as arguments, is it really necessary?
There are resources that should not be there, and should be in sample (mostly icons)
AddHomeAction in the Base Activities overrides the Drawable set with the SetHomeLogo method and sets it to the default Android Icon. Consider grabbing the current shown and use that.
we are missing some of the "base" activities and they need to be added
Instead of having to explicitly specify the Bar in the Layout, somehow inject it into the Layout when using the Base Activities.
@jamesmontemagno what do you think of this?
Options for text on left or right of icon, and option to do landscape only.
A bunch of code and new things have been added in. Needs an update me thinks!
It would be nice with a set of base themes to choose from.
I.e.:
HoloDark
HoloLight
Green
Blue
Red
Yellow
Orange
Hi,
Please post my app as using your solution:
https://play.google.com/store/apps/details?id=MenuFinderAN.MenuFinderAN&hl=en
On tablets and other devices with a large screen, Navigation Tabs in the Action Bar could be a nice addition.
Click will do a popup depending on version number.
Hello,
How to use MVVMCross with LegacyBar?
Any simple small example would be great.
Thanks,
Andrew
As stated in:
#42
I have also run across this issue, similar to issue 42.
My resolution was to simply remove the line (MenuItemLegacyBarAction):
_menuItem = new LegacyBarMenuItem(menuId, Handle);
And implement the callback using an Action.
Under my testing, LegacyBarMenuItem fails to be ctor'd (the binding fails to attach to Android's MenuItem). I am unable to pinpoint exactly what's causing this. Therefore, I simply removed it.
One question is should we rename this? When you have to do a findview you have to do this:
LegacyBar = FindViewById<LegacyBar.Library.Bar.LegacyBar>(Resource.Id.actionbar);
Should we rename to "CurrentLegacyBar"? Or something else?
Would be really nice if we added action provider for easy sharing: http://developer.android.com/guide/topics/ui/actionbar.html#ActionProvider
I can't get overflow actions from the sample for Galaxy S (2.2.1). So I hack
m_HasMenuButton = false;//currentapiVersion <= 10;
and see overflow actions menu but it was default popup with radio buttons list (screenshot). What I need to do to get custom styled drop-down list like this one in project README.md?
Give the ability to the user to be able to set the Home icon through AXML. This should simply require a new attribute along with a home button creation in the Ctor of LegacyBar.
Spent some time finding out why I got a null pointer exception in LegacyBar, and found out it was because of I was trying to add an Action to the LegacyBar which was null. Had we had a better exception in hand here, it would have been a bit easier to understand why the exception was thrown.
Maybe add an ArgumentException in the methods for adding Actions to the Bar.
There are some try/catch statements around in the code where the catch part is empty and just catching everything. Not nice and we should do something about it.
I can't get overflow actions from the sample for Galaxy S (2.2.1). So I hack
m_HasMenuButton = false;//currentapiVersion <= 10;
and see overflow actions menu but it was default popup with radio buttons list (screenshot). What I need to do to get custom styled drop-down list like this one in project README.md?
Hi,
I am trying to add buttons and menu items. Can you send me documentation, please?
I tried this code, but am I missing an assembly? I got the error in the subject.
LegacyBar = FindViewById<LegacyBar.Library.Bar.LegacyBar>(Resource.Id.actionbar);
LegacyBar.SetHomeLogo(Resource.Drawable.Icon);
MenuId = Resource.Menu.mainmenu;
var searchMenuItemAction = new MenuItemLegacyBarAction(
this, Resource.Id.menu_search, LegacyBar.LightIcons ? Resource.Drawable.ic_action_share : Resource.Drawable.ic_action_share_dark,
Resource.String.menu_string_search)
{
ActionType = ActionType.IfRoom
};
LegacyBar.AddAction(searchMenuItemAction);
Hi, how do I add the action bar to an activity where I have no layout file? If I have a class inheriting from list activity how do I use your solution?
This should allow using LegacyBar.TitleClick += (s, e) => {};
to allow actions when touching the Title in the bar.
With the Android action bar, it's possible to add a menu option and set it to show the text label.
Is this possible with LegacyBar? I can't see how to do it
As a workaround I've been nesting views in the XML which looks messy and partly defeats the objective of using the LegacyBar but perhaps I've missed something?
please let me know if this is possible and how. I could not find an example on how to do so.
Thanks alot
The bar height is ok, but the icon is not resized then rotating.
Need to be removed
Simply specify your menu with standard menu mark up and we should be able to automatically generate a base action bar from it.
If the device doesn't have physical menu button, OnPrepareOptionsMenu
won't get called when I click on the overflow menu button.
But in the official Google ActionBar implementation, it gets called.
I looked at ActionBarSherlock, it seems to be a problem as well.
I tried let OnCreateOptionsMenu
return true
to get OnPrepareOptionsMenu
called but no luck. See here.
Just like the default implementation, support for Action Views would be really awesome.
Allow the user to do something else than just launching a new Activity.
I see overflowed actions search and refresh at Galaxy Nexus (4.0.2) but cann't see it at Galaxy S (2.2.1). As I see in debug stepping in first case ActionBarUtils.ActionFits() called from ActionBar.AddAction() return false and in second case return true.
UPDATE: As I see in sources this behaviout don't contradict the logic of the project (so, it's expected behaviour), so I close this issue.
Menu button was broken when we converted the project to a library, the pre-compiler conditions are always going to assume API level 17 as that is what we are targeting the library for.
Use Build.Version.Sdk_Int
to detect current API level instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.