Android Development - Snippets: Unterschied zwischen den Versionen
(→Files) |
|||
| Zeile 56: | Zeile 56: | ||
* [[Android - Thread Priority]] | * [[Android - Thread Priority]] | ||
| − | == Files == | + | == Files, Dateimanagment == |
| + | === Textdatei erzeugen, speichern, lesen === | ||
| + | === Bild erzeugen und speichern === | ||
| + | |||
| + | |||
=== Zugriff auf Ressourcen === | === Zugriff auf Ressourcen === | ||
* http://stackoverflow.com/questions/8340445/how-can-i-specify-the-resource-to-get-from-r-res-drawable-dynamically | * http://stackoverflow.com/questions/8340445/how-can-i-specify-the-resource-to-get-from-r-res-drawable-dynamically | ||
Version vom 10. März 2013, 13:41 Uhr
Activities
Android - Neue Activity anlegen und starten
Layouts
Lock Portrait or Landscape fullscreen - requestwindowfeature
Views
Vertical Seek Bar
Events
Graphic and Animation
Bitmap - ressource und input stream
Sprites
Sound
Unterstützte Formate
Links
- http://stackoverflow.com/questions/4855874/are-there-any-built-in-default-sounds-that-can-be-utilized-in-an-app
- http://alucard1990.hubpages.com/hub/How-to-Make-a-Simple-Media-Player-for-Android
- http://stackoverflow.com/questions/3747139/how-can-i-show-a-mediacontroller-while-playing-audio-in-android/5265629#5265629
Möglichkeiten zur Sound-Ausgabe
SoundPool
MediaPlayer
http://developer.android.com/reference/android/media/MediaPlayer.html
Generate Sound (Midi-Files + PCM Generation mit AudioTrack) Android - rttl Sound File
System Sounds
Fortgeschrittene Techniken
Threads
Files, Dateimanagment
Textdatei erzeugen, speichern, lesen
Bild erzeugen und speichern
Zugriff auf Ressourcen
Beispiel Speicherkarte:
File.DirRootExternal & "/Music", "titelx.mp3"
Ressourcen Pfad herausfinden
Ist das richtig ??? Eigentlich muß die Ressource ID in den Filenamen umgewandelt werden.
Using Resource Name
Syntax:
android.resource://[package]/[res type]/[res name]
Example : If icon.png image file is available in res/drawable folder you can get path like :
String PATH="android.resource://com.my.package/drawable/icon";
Using Resource Id
Syntax :
android.resource://[package]/[resource_id]
Example : If icon.png image file is available in res/drawable folder you can get path:
String PATH="android.resource://com.my.package/" + R.drawable.icon;
This were the examples to get the URI of any image file stored in drawable folder.
Similarly you can get URIs of res/raw folder also.
???