Академический Документы
Профессиональный Документы
Культура Документы
RECURSOS
1. R. Por defecto: 2. R. Alternativos: Mediante sufijos 1. Orientacin de Pantalla: port / land 2. Tamao de Pantalla: small ( 2, 3) / normal (4) / large (7) / xlarge (10) 3. Idioma: en / fr / es / 4. Regin: rUS / rUK / 5. Densidad de Pixeles (dpi): ldpi (100-130) / mdpi (120-190) / hdpi (180-270) / xhdpi (260-340) / nodpi 6. Nivel del API: v3 / v4 / v5 / 7. Modo Nocturno: night / no night
android:layout_width=fill_parent android:layout_height=wrap_content android:textColor=#00FF00 android:typeFace=monospace android:text=@string/> Al definir nuestro style podemos reunir las propiedades del TextView <resources> <style name = MiEstilo parent = @android:style/TextAppearance.Medium> <tem name=android:layout_width> fill_parent </item> <tem name=android:layout_height> wrap_content </item> <tem name=android:textColor>#00FF00 </item> <tem name=android:typeface> monospace </item> </style> </resources> Para finalmente utilizar nuestro estilo <TextView style=@style/MiEstilo android:text=@string/> 2. Podemos heredar un estilo para luego ampliarlo, ejemplo heredamos MiEstilo y lo ampliamos en el estilo llamado grande: <style name=MiEstilo.grande> <tem name=android:textSize> 18pt </item> </style> A su vez podemos heredar el estilo llamado grande y ampliarlo, ejemplo: <style name=MiEstilo.grande.negrita> <tem name=android:textSyle>bold </item> </style> 3. Podemos aplicar un estilo a una vista. 4. Se aplica un theme y no un style a una actividad y una aplicacin, ejemplo:
<resources> <style name = MiTema parent = @android:style/Theme.Dialog> <tem name=android:layout_width> fill_parent </item> <tem name=android:layout_height> wrap_content </item> <tem name=android:textColor>#00FF00 </item> <tem name=android:typeface> monospace </item> </style> </resources>
Preferencias
Intents
Menu contextuales
Alternative drawables
36x36 for low-density 48x48 for medium-density 72x72 for high-density 96x96 for extra high-density 3:4:6:8 scaling ratio
Screen Configuration
Low density (120), ldpi Medium density (160), mdpi High density (240), hdpi Extra high density (320), xhdpi
480x640
640x960
Large screen
WVGA800* (480x800) WVGA854* (480x854) 600x1024 WXGA (1280x800) 1024x768 1280x768 1536x1152 1920x1152 1920x1200 2048x1536 2560x1536 2560x1600
1024x600
* To emulate this configuration, specify a custom density of 160 when creating an AVD that uses a WVGA800 or WVGA854 skin.
Aplicacin Asteroide
Tips
1. Press ctrl + shift + o to import missing classes in Eclipse; 2. CAB Contextual Action Bar; 3. Alt+Enter Maximizes the emulator. Nice for demos. 4. Ctrl+F11 changes the orientation of the emulator. 5. F8 Turns network on / off. 6. The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a "medium" density screen. 7. The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels.