Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,983 Members 46,200 Now Online
XDA Developers Android and Mobile Development Forum

Using CSS3 media queries in Android app development

Tip us?
 
ali20142014
Old
(Last edited by ali20142014; 10th June 2014 at 10:23 AM.)
#1  
Junior Member - OP
Thanks Meter 1
Posts: 9
Join Date: Apr 2014
Default Using CSS3 media queries in Android app development

Hi,

I am using HTML5 to develop Android apps on Netbeans. As we have different screen sizes on both phones and tablets, designers use media queries in CSS3 to tackle this to display the contents for mobile sites.

I want to know if by using CSS3 media queries, will they work on Android app like they work on mobile sites?

Thank!
 
Archer
Old
#2  
Archer's Avatar
Senior Moderator / Recognized Developer - (Un)Recognized Pole Dancer
Thanks Meter 3933
Posts: 13,619
Join Date: Jul 2008
Location: Northampton
Quote:
Originally Posted by ali20142014 View Post
Hi,

I am using HTML5 to develop Android apps on Netbeans. As we have different screen sizes on both phones and tablets, designers use media queries in CSS3 to tackle this to display the contents for mobile sites.

I want to know if by using CSS3 media queries, will they work on Android app like they work on mobile sites?

Thank!
Yes, it works in the exact same way. Even though it's not apparent, web apps are running in a standard WebView control, so they as compliant with HTML5 and CSS3 as the framework which it's running on.

Check here for more info...

http://developer.android.com/referen...t/WebView.html
.
"I live by my own rules, nobody else's, not even my own."
.
My xda links

New User Guide | XDA Forum Rules | 10 Posts - Why and How? | Admins & Mods | My xda Bookmarks

.

.
 
ali20142014
Old
#3  
Junior Member - OP
Thanks Meter 1
Posts: 9
Join Date: Apr 2014
Can you tell me how I can put an icon to be visible on the homescreen after installing the app? And also, I installed an app which I created, but it asked me permissions to access my camera, gps, contacts etc. However, my app does not work with these things, so how to prevent these permissions to be asked before installing?
 
ervinpm
Old
#4  
Junior Member
Thanks Meter 1
Posts: 11
Join Date: Jan 2011
Default Android Manifest

Just remove the permissions in the Android Manifest (AndroidManifest.xml). Usually it looks something like this:

Code:
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes