Showing posts with label android resources. Show all posts
Showing posts with label android resources. Show all posts

Friday, 17 January 2014

Android Multiscreen support Layout folders

Being an Android developer one should know the different layout folders.
Layouts play an important role in UI concept of Android. 

Here are the few layouts folders which are used to support different screen sizes like

  1. Small Screen phones
  2. Medium Screen phones
  3. Large Screen Phones
  4. 7" Tablets
  5. 10 " Tablets


·         res/layout/ 

for Phones 



·         res/layout-port

for Phones only portrait screen



·         res/layout-land

for Phones only Landscape screen



·         res/layout-sw600dp/

for 7" Tablets



·         res/layout-sw600dp-port/

for 7" Tablets only portrait



·         res/layout-sw600dp-land/

for 7" Tablets only landscape



·         res/layout-sw720dp/

for 10" Tablets



·         res/layout-sw720dp-port/

for 10" Tablets only portrait



·         res/layout-sw720dp-land/

for 10" Tablets only landscape



·         res/layout-xlarge/

for pre 3.2" Tablets 




·         res/layout-xlarge-port/

for pre 3.2" Tablets to support portrait only




·         res/layout-xlarge-land/

for pre 3.2" Tablets to support landscapre only




·         res/layout-small/

for small screens 




·         res/layout-small-port/

for small screens to support portrait screens only 




·         res/layout-small-land/

for small screens to support landscape screens only 




·         res/layout-large/

for large screens 



·         res/layout-large-port/

for large screens to support portrait screens only 



·         res/layout-large-land/
for large screens to support landscape screens only 

Sunday, 29 December 2013

Android APK (File format)


Android Application Package APK (.apk) is the set of compressed files used to distribute and install application software on well know Android Operating system by Google Inc.

Android apk contains the number of files that all contains program's code, assets, resources, permissions, certification and manifest file.

You can also check the contents of apk file by just following these steps.

  1. Rename .apk extension to .rar. 
  2. Extract these files with help of decompression tools such as Winrar or Winzip. 
Usually apk file contains the following file 

Android apk file format

  • lib
  • res
  • assets
  • classes.dex
  • AndroidManifest.xml
  • META-INF directory
  • resources.arsc

lib

It contains the compiled code that is specific to a software layer of a processor, the directory is split into more directories within it.
  • armeabi: compiled code for all ARM based processors only
  • armeabi-v7a: compiled code for all ARMv7 and above based processors only
  • x86: compiled code for x86 processors only
  • mips: compiled code for MIPS processors only

res

Contains the resources file such as layout, images and few xml files, which are not compiled into resources.arsc


Assets

It contains assets files specific to a particular project, which can be retrieved with use of Assets Manager, these files have been integrated to a project by the user. 



Classes.dex

It contains the compiled classes in the dex format, which is being understandable by Dalvik Virtual Machine


AndroidManifest.xml

 An additional Android manifest file, describing the name, version, access rights, referenced library files for the application. 


META-INF directory

Its java's internal meta directory contains the following files 
  • MANIFEST.MF: the Manifest file
  • CERT.RSA: The certificate of the application.
  • CERT.SF: The list of resources and SHA-1 digest of the corresponding lines in the MANIFEST.MF file

resources.arsc

Contains the pre compiled resources file such as layout, images and few xml files