Permalink
Browse files

Update readme, screen shots and implement way to set theme of action …

…bar via res ids.
  • Loading branch information...
1 parent b031641 commit d52fb6fd358f3ec16a68c40a69d545eda95c5218 @jamesmontemagno committed Jul 11, 2012
Showing with 52 additions and 1 deletion.
  1. +36 −0 MonoDroid.ActionBar/ActionBar/ActionBar.cs
  2. +16 −1 README.md
  3. BIN Screenshots/BottomAction_Overflow.png
@@ -66,6 +66,11 @@ public Color SeparatorColor
set { m_ActionsView.SetBackgroundColor(value); }
}
+ public int SeparatorColorRaw
+ {
+ set {m_ActionsView.SetBackgroundResource(value);}
+ }
+
/// <summary>
/// Set the drawable of the seperators between Action Items
/// </summary>
@@ -74,6 +79,11 @@ public Drawable SeparatorDrawable
set { m_ActionsView.SetBackgroundDrawable(value); }
}
+ public int SeparatorDrawableRaw
+ {
+ set {m_ActionsView.SetBackgroundResource(value);}
+ }
+
/// <summary>
/// Set the color of the Title in the Action Bar
/// </summary>
@@ -82,6 +92,11 @@ public Color TitleColor
set { m_TitleView.SetTextColor(value); }
}
+ public int TitleColorRaw
+ {
+ set {m_TitleView.SetTextColor(Resources.GetColor(value));}
+ }
+
/// <summary>
/// Set the title in the Action Bar
/// </summary>
@@ -98,6 +113,7 @@ public int TitleRaw
set { m_TitleView.SetText(value); }
}
+
/// <summary>
/// Set the background color of the Action Bar
/// </summary>
@@ -106,6 +122,11 @@ public Color BackgroundColor
set { SetBackgroundColor(value); }
}
+ public int BackgroundColorRaw
+ {
+ set {SetBackgroundColor(Resources.GetColor(value));}
+ }
+
/// <summary>
/// Set the background drawable of the Action Bar
/// </summary>
@@ -114,11 +135,18 @@ public Drawable BackgroundDrawable
set { SetBackgroundDrawable(value); }
}
+ public int BackgroundDrawableRaw
+ {
+ set { SetBackgroundResource(value);}
+ }
+
/// <summary>
/// Set the background drawable of the Action Bar Items
/// </summary>
public Drawable ItemBackgroundDrawable { get; set; }
+ public int ItemBackgroundDrawableRaw { get; set; }
+
/// <summary>
/// Returns the amount of Action Items in the Action Bar
/// </summary>
@@ -227,6 +255,10 @@ public void SetHomeLogo(int resId)
{
m_LogoView.SetBackgroundDrawable(ItemBackgroundDrawable.GetConstantState().NewDrawable());
}
+ else if(ItemBackgroundDrawableRaw > 0)
+ {
+ m_LogoView.SetBackgroundResource(ItemBackgroundDrawableRaw);
+ }
((LayoutParams)m_TitleLayout.LayoutParameters).AddRule(LayoutRules.RightOf, Resource.Id.actionbar_home_logo);
}
@@ -398,6 +430,10 @@ private View InflateAction(ActionBarAction action)
{
view.SetBackgroundDrawable(ItemBackgroundDrawable.GetConstantState().NewDrawable());
}
+ else if (ItemBackgroundDrawableRaw > 0)
+ {
+ view.SetBackgroundResource(ItemBackgroundDrawableRaw);
+ }
var labelView =
view.FindViewById<ImageButton>(Resource.Id.actionbar_item);
View
@@ -1,6 +1,19 @@
ActionBar for Mono for Android
===================
+This project is under rapid development by both Tomasz Cielecki and James Montemagno. Please hang with us while we get documentation ready and fully stablize the code.
+
+Featured:
+*Fully customizeable Action Bar
+*Integrates with current Menus
+*Overflow on API 11+ Devices
+*Dynamic Action Bar Item Count based on screen resolution
+*Bottom Action Bar (beta)
+
+TO see a work in progress of a project that implements the MonoDroid Action Bar please see:
+https://github.com/jamesmontemagno/TasksSimplified
+
+
This is a a port of https://github.com/johannilsson/android-actionbar
For usage check the project this has been ported from README, there is a detailed description on how to use it.
@@ -13,7 +26,9 @@ For usage check the project this has been ported from README, there is a detaile
For more screenshots look in the [Screenshots](https://github.com/Cheesebaron/MonoDroid.ActionBar/tree/master/Screenshots) folder
## TODO
-Break out the ActionBar out in its own Android Library project along with resources.
+Refactor Bottom Action Bar
+Implement Base Themes
+
## License
Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d52fb6f

Please sign in to comment.