AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
09/07/12 10:23 AM (7 years ago)

CSS Android

I am trying to use CSS in my current app (BT 2.0 self hosted) and I would like the BT codebase to work for both Android and IOS. I have been using CSS for my local text/html pages and the CSS file is in the BT_Docs folder - it is recognised fine on my iPhone but not on my Android device. Any suggestions please? I would like to avoid embedding the CSS in-line to each page if possible.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
09/07/12 11:04 AM (7 years ago)
I keep my .css files for local Android HTML files in the BT_Docs folder and they work.

IIRC there are a lot of issues with the Android HTML/URL docs that need to be fixed before the HTML docs work poroperly at all.


Check this thread:

http://www.buzztouch.com/forum/thread.php?tid=285C4308D91655E208045F8&command=isSearching&currentPage=1&topicTitle=bug&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory=
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
09/07/12 12:49 PM (7 years ago)
Thanks @ATRAIN53, that link shows there pitfalls that I need to consider in my Andorid project that I haven't found yet lol. Nothing on CSS though...

Does BT_DOCS work for you in BT2.0 or 1.5?

My pages work fine if I link to an external CSS file, which is a solution if all else fails, I just want to keep the external links to a minimum and find out where the css file should sit.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
09/07/12 01:13 PM (7 years ago)
the HTMLdoc fix is the key in that thread. thanks to ross for finding the menu bug and that led me int he right parth for html docs that were getting 1/2 chopped.

but CSS is working great in BT 2.0 for Androind. (I don't use 1.5, I do everything 2.0 Self Hosted)

The fact you say they work remotely makes me think you might not have the right path specified.


if you have them in the same folder, you link to the stylesheet like this:

<link href="mycssfile.css" rel="stylesheet" type="text/css">


no http:// or other paths in there (unless you put them in a subfolder)

most people do use a js and a css folder to store them, i do that in iOS but it was flaky in Android so I keep them in the SAME folder for now...

File names could be a problem too....
Android is VERY picky. try a simple/shortname all lowercase like "mycss.css"
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
09/07/12 01:25 PM (7 years ago)
Thanks @ATRAIN53. I use the syntax just as you suggest - i.e. I set no path at all, I put imy CSS file in the BT_DOCS directory. In IOS it works, in Android it doesn't. I will experiment with path and uppercase, lower case and see where it takes me!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.