1. #1
    Ext JS Premium Member
    Join Date
    Sep 2010
    Location
    Jyderup, Denmark
    Posts
    51
    Vote Rating
    0
    lasseok is on a distinguished road

      0  

    Default The new Apple and Android themes (0.97)

    The new Apple and Android themes (0.97)


    One of the things listed in the release notes for 0.97 is "Added Apple and Android themes". I read this as themes that look much more like the respective platforms (e.g. much more like for example iOS, than the default Sencha Touch theme).

    But, how do I "active"/use these themes?

    Any help would be greatly appreciated!


    Lasse

  2. #2
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default


    Use a link tag and specify the src . Or in the js code check which platform ur on and specify src for link tag.

  3. #3
    Ext JS Premium Member
    Join Date
    Sep 2010
    Location
    Jyderup, Denmark
    Posts
    51
    Vote Rating
    0
    lasseok is on a distinguished road

      0  

    Default


    I just completely overlooked the css folder (I only searched the SASS folder), and thus I feel a little stupid But hey, it happens to everybody from time to time.

    In any case, thank you, blessan!

  4. #4
    Ext User
    Join Date
    Aug 2010
    Posts
    22
    Vote Rating
    0
    jmdesp is on a distinguished road

      0  

    Default


    Quote Originally Posted by lasseok View Post
    One of the things listed in the release notes for 0.97 is "Added Apple and Android themes". I read this as themes that look much more like the respective platforms
    Lasse
    I was very happy to see this also, but specifically what changes do the new themes include ?
    I did a little testing with the default samples and the kitchen sink, and couldn't see a lot of difference.

    So could we get/make a list of what changes they bring ?

  5. #5
    Ext User
    Join Date
    Aug 2010
    Posts
    22
    Vote Rating
    0
    jmdesp is on a distinguished road

      0  

    Default


    So, has anyone some idea about that ?

  6. #6
    Ext JS Premium Member
    Join Date
    Sep 2010
    Location
    Jyderup, Denmark
    Posts
    51
    Vote Rating
    0
    lasseok is on a distinguished road

      0  

    Default


    Hi jmdesp

    Sorry, I haven't had time to reply - Busy at work.

    The Android and Apple themes look a bit more like the respective platform than the default Sencha Touch theme that is meant to be a bit more neutral and thus able to fit in better on several platforms without one having to redo a theme for every device.

    They only bring changes in ways of appearance - Noting else. Obviously, because it's CSS. Just so we're clear. Therefore you shouldn't really see major changes other than fx. the color use and different gradients, when you include the stylesheets. If you can't see any difference, it might be because you've linked up the file wrong. The apple.css or android.css needs to replace the Sencha Touch theme CSS file in your source code or at least be linked to after the Sencha Touch theme in the HTML document.

    Hope it makes sense.

  7. #7
    Sencha User
    Join Date
    Dec 2010
    Posts
    8
    Vote Rating
    0
    caseyd is on a distinguished road

      0  

    Default


    Does anyone have an example of how to detect/switch the css file loaded whether it's apple.css or android.css?

  8. #8
    Ext JS Premium Member
    Join Date
    Sep 2010
    Location
    Jyderup, Denmark
    Posts
    51
    Vote Rating
    0
    lasseok is on a distinguished road

      0  

    Default


    Clientside with Sencha Touch:

    Code:
    <link id="myStylesheet" rel="stylesheet" href="default.css" type="text/css">
    <script type="text/javascript">
    Ext.setup({	
    		onReady:function(){
    			if(Ext.is.Android){
    				 Ext.get("myStylesheet").dom.href = "/path/to/android.css";
    			} else if(Ext.is.iOS){
    				Ext.get("myStylesheet").dom.href = "/path/to/apple.css";
    			}
                         
                    }
    });
    </script>
    See http://dev.sencha.com/deploy/touch/docs/?class=Ext.is

    Serverside (PHP in this case):

    PHP Code:
    $ua strtolower($_SERVER['HTTP_USER_AGENT']);
    if(
    strstr($ua,"android")){
        echo 
    '<link rel="stylesheet" href="/path/tos/android.css" type="text/css">';
    } else if(
    strstr($ua,"iphone")){
        echo 
    '<link rel="stylesheet" href="/path/to/apple.css" type="text/css">';

    Remember that the PHP version is only a simple example. If you want to do the validation serverside, you should use a more competent browser detection mechanism (E.g. get_browser or http://browsers.garykeith.com/downloads.asp
    Last edited by lasseok; 28 Dec 2010 at 12:48 PM. Reason: Fixed a couple of typos in the code

Similar Threads

  1. Will a Sencha Touch app be approved by Apple?
    By solodesignz in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 5 Jul 2010, 1:42 PM
  2. Create a Sencha project in Apple UIWebView
    By Smalldevil in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 24 Jun 2010, 4:02 AM
  3. combo Box an Apple Safari
    By Nawabu in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 9 Nov 2009, 12:52 PM
  4. Apple Mac alike Stickies ?
    By Stju in forum Community Discussion
    Replies: 3
    Last Post: 15 Sep 2009, 5:59 AM
  5. extjs.com demos and themes... do themes work?
    By rmacfadyen in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 27 Feb 2009, 5:17 PM

Thread Participants: 3

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."