[CLOSED] Detect tablet or mobile phone

  1. #1

    [CLOSED] Detect tablet or mobile phone

    Hi,

    How to detect if my code is running on Tablet or other mobile device ?
    How can I change my theme if tabled or mobile device was detected ?

    Thank you
    Last edited by Daniil; Jan 16, 2015 at 10:26 AM. Reason: [CLOSED]
  2. #2
    Hi,

    How to detect if my code is running on Tablet or other mobile device?
    You can detect platform using this class.
    http://docs.sencha.com/extjs/5.0.1/#!/api/Ext.os
  3. #3
    Hello,

    There is also the RequestManager server class that you can use. For example,
    RequestManager.IsAndroid
    To apply a theme, please use a ResourceManager's Theme property.
  4. #4
    Thank you Danill,

    That works for me. I could not find Theme property in ResourceManager but found it here:

    Ext.Net.GlobalConfig.Settings.Theme
    Please close.
  5. #5
    I could not find Theme property in ResourceManager
    I guess you looked at the static properties of the ResourceManager class, but it is a property of instance.
    X.ResourceManager.Theme = Ext.Net.Theme.Crisp;
  6. #6
    Thank you... actually I had one more question... how to recognize theme in JavaScript...

    I can see that Ext.theme is always "Default"
    Last edited by matt; Jan 16, 2015 at 11:14 AM.
  7. #7
    Please use:
    Ext.net.ResourceMgr.theme

Similar Threads

  1. [CLOSED] What is the Tablet support?
    By HansWapenaar in forum 3.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 03, 2016, 8:23 PM
  2. Tablet and mobile devices friendly UI?
    By Dimitris in forum Open Discussions
    Replies: 2
    Last Post: Dec 24, 2014, 5:54 AM
  3. Numeric keyboard on Tablet
    By ADV in forum 3.x Help
    Replies: 3
    Last Post: Dec 16, 2014, 9:09 PM
  4. [CLOSED] Mask to cell phone
    By luiz in forum 2.x Legacy Premium Help
    Replies: 13
    Last Post: Feb 03, 2014, 12:08 PM
  5. [CLOSED] How to handle doublerowsclick on tablet iPad or Phone?
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 12, 2013, 9:41 AM

Tags for this Thread

Posting Permissions