Styles

CharlesIPTI

Active Member
Licensed User
Longtime User
So I'm cruising the Android Dev site cause I can't believe I need to set text properties on everything I create.... and of course there is a way to apply styles.

So I peek at the manifest xml in Basic4Android... its just a method with xml in it.

It doesn't even call out my activity by name.. ODD ?? :sign0104:

Can I call out my activity and start applying my styles to a specific view...?

Note, of course this will be a panel and I want all views in the panel to inherit the style I apply to the 'parent' panel. I just didn't see the activity called out in the manifest like in an Eclipse version or the samples here

Styles and Themes | Android Developers

so I had to ask .. in case my mods to the file messes up something for B4A...
 

CharlesIPTI

Active Member
Licensed User
Longtime User
Direct link

Do you have a direct link.? Please

I cant find it in the B4A documentation.

The android site and the various tutorials I've located mention specifying the activity by name in the manifest by name and it doesn't look like that fits the B4A structure,

additionally there's a consistent indirection introduced in the tutorials between a theme file and a style file that I thought I had grasped but apparently I have not.
 
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
Continued error

This style concern is really frustrating me
I'm just trying to get the basics down
 

Attachments

  • StyleFail.zip
    6.2 KB · Views: 155
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
Theme or Styles

On this "form" there are several sections,
that I'm grouping into a poor mans custom
user controls for lack of a better description.

They all will exist on an activity at the same time
and many will require special text settings...

It looks like I will have to make those settings manually
as I build programmatically each view and add them to their placeholders
"panels"

I was hoping to be able to use some form of the style xml or theme xml but I couldn't find that in the documentation. just many examples like this Understanding Android Themes and Styles « Brain Flush.
 

Attachments

  • MainForm..JPG
    MainForm..JPG
    95.6 KB · Views: 271
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
Clueless

Not sure if you mean layouts as in the Eclipse way of laying out the views and adding the formatting to that xml

I would like to see the B4A way of doing it but I didn't see it in the link you provided previously

what section of the documentation is this in please.

Thank you again
 
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
update

I would like to see the B4A way of doing it but I didn't see it in the link you provided previously

what section of the documentation is this in please.
 
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
New

Thank you again for your replies,

but at this point I just want to see what the B4A documentation says about styles/Themes.. can you please point me to that specific documentation?

:sign0163:


I was interested in using the processes outlined in the link I attached previously, but,,,,, as my form -- image attached in earlier post.... shows,,,

I will have several areas that existed in the original app as custom user controls and each has their own specific styling. Text size color etc,,

I am attempting to replicate this windows based UI in Android..

Apparently this cannot be done with the processes described in my earlier attached link.

These processes can be applied to individual views by type,
all labels or all textedits or all buttons....

or to an entire activity by name, (this "applied to activity by name process" although I have not seen exemplified correctly, I am interested in understanding it) So each activity could have specific styling..

Since I use a "panel" as a container to "house" if you will,,, what I refer to as a user control" (which is really just a collection of views)

if I could apply a style to a panel and of course all of its ""Children"" this would address my needs..
:BangHead::BangHead:
the labels that exist as children to panelOrderBins could all have blue 25pt text, while all the labels for panelHeader could have 20pt white text with the exception of the odd one that I designate in code to be a larger Font...

That last condition, for the odd exception isn't even possible using styles.. that I'm aware of
So instead of being as customizable as a web based CSS file it seems more pointless than helpful for my immediate needs. With CSS I could name the panel that houses my views and apply a style. I could then name the odd man out in that panel that breaks the normal standard and by name in the CSS specify his exceptions Big Red Text whatever... Its like someone said already.. 85-90 percent of my development in B4A ends up as ugly UI contortions

I figured out the hierarchy for styles and themes --- you call out a theme and override its subcategories with specific styles in another xml file just like the theme xml file -- I thought this extra indirection was pointless and difficult to understand myself as it took me longer than necessary to grasp it, because of this added yet unrequited indirection. It works with just a style file and not theme prefixing it...

:sign0163:
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
85-90 percent of my development in B4A ends up as ugly UI contortions
I'm sorry but I completely disagree with you. Nothing prevents you from creating nice and flexible user interfaces.

I think that this attitude is not really helpful and definitely doesn't encourage other members to try to help.
 
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
Wow

I'm sorry but I completely disagree with you. Nothing prevents you from creating nice and flexible user interfaces.
I think that this attitude is not really helpful and definitely doesn't encourage other members to try to help.

I assuredly meant the contortions were ugly since my UI construction is predefined but thanks again ... and Uhh Sorry ??? as appropriate ??



Re Submittal---
"
I just want to see what the B4A documentation says about styles/Themes.. can you please point me to that specific documentation?
"
 
Upvote 0

o0spyder0o

Member
Licensed User
Longtime User
Hi Erel
I think the confusion here was when you first replied:
"Not sure that I understand your questions. However you can create your own Theme as described in this link."
and CharlesIPTI was asking where that link was as it wasn't included.
I could sense his frustration that you said go here but there was nowhere to go to!
Cheers
 
Upvote 0
Top