B4A Library StdActionBar - Another ActionBar library

bluedude

Well-Known Member
Licensed User
Longtime User

Attachments

  • stdactionbar.png
    47.3 KB · Views: 274

migrec

Member
Licensed User
Longtime User
Activity.TitleColor won't change the title color, is there an other way?
 

Bryan

Member
Licensed User
Longtime User
I have set up a menu using Activity.AddMenuItem3. In the application I hide (make invisible) my Main activity panel and call up another one. During this time I would like to disable my menu items on the actionbar so they cannot be clicked on. Is there a way to accomplish this?

Thanks Bryan.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Bryan,

Using that tool but as explained in my thread it won't always work in the correct way. See my post.

It seems nobody has the solution?
 

Bryan

Member
Licensed User
Longtime User
Bryan,

Using that tool but as explained in my thread it won't always work in the correct way. See my post.

It seems nobody has the solution?

It took me several days to figure this all out. I'm no expert in Java and still learning B4A. I do program in a lot of other languages and that does help me out a lot.

I guess one of the biggest things that I had trouble with is what I had to put in the manifest.
This works for me.
B4X:
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light")
SetApplicationAttribute(android:theme, "@style/Theme.Tclstyle1")

There are two things done you need the correct Theme (Holo.Light) and then your modified Style for the actionbar. Mine is called Tclstyle1. It was created from the website that was mentioned previously. The actionbar style generator will create a zip file with all the resource files needed. Those are to be put in the res folder of your application. You probably know that already. You may be using the wrong theme. I think using the Dark theme will give you dark menus. There are I believe 3 Holo themes Dark, Light, and Dark/Light combination. There are .xml files that are created with the actionbar generator. I don't think I had to modify any of those. I believe it is the Themes.xml that would be modified if you want to change text color and look other things. Like I said I'm no professional at this, I am always asking for help also.
There was a post on here somewhere where a tutorial was given on how to change styles or themes I think.

In my Theme.xml file I have this to set text color to white.
B4X:
<resources>
<style name="Theme.Tclstyle1" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:textColor">#FFFFFF</item>
Bryan
 
Last edited:

palmzac

Active Member
Licensed User
Longtime User
Hi Erel,

I have no idea. Would you help me & give me a source example ? Thank you very much !

Question
-------------
1. Add [Search] Icon on title ( like youtube )
2. Place the input field on title when clicked the [Search] Icon ( like youtube )
3. Add ItemMenu on title ( like youtube )
 

FireDroid

Member
Licensed User
Longtime User

bluedude

Well-Known Member
Licensed User
Longtime User
Bryan,

That for sure won't work because it changes all text colors and I don't want that. As explained before I have a problem where the drop down list in the actionbar displays a black color for the items. In the style generator you cannot change that.

As said, I have used the correct tools and used the Dark actionbar (I need it). However, that also shows dark text color for the tab list which is wrong in my opinion.

Any other suggestions, Erel?
 

achtrade

Active Member
Licensed User
Longtime User
Hello,

Why is a space in the right edge ?, how can I remove it ?

Thanks.

B4X:
Sub Activity_Create(FirstTime As Boolean)

    bar.Initialize("bar") 
    bar.NavigationMode = bar.NAVIGATION_MODE_LIST 'change to tab to see the other mode
    bar.SetListItems(Array As String("Menu", "Setting", "About"))
    bar.Subtitle = ""
end sub
 

Attachments

  • Screenshot_2014-09-05-11-16-14.png
    25.3 KB · Views: 279

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
Hello, is it possibile to change the typeface of StdActionBar?
 

seardnA

Member
Licensed User
Longtime User
My appologies for such a newbie question, but where can I download this library? I moved from post to post to page and could find it.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…