Astro Player's skins guide 2010-08-12 1. Introduction 1.1. Descriptor files form appearance (user interface) of the Astro Player. File contains enumeration of interface's elements (control buttons, text fields, track lists, cover, bookmarks), their dimension, coordinates on screen, appearance features (like references to graphic resources). 1.2. Descriptor files have XML structure and must satisfy XML-standart. So these files consist of nested tags. Tags have attributes. 1.3. Tags and attributes use syntax similar to tags and attributes of Android's Layout-files. 1.4. Astro Player home folder is //sdcard//astroplayer (//sdcard//astroplayerbeta for a beta-version). We will refer it as the FOLDER keyword below. Descriptor files must be located in FOLDER/views/. For initialisation of a user interface in AstroPlayer you must select Menu > Select skin > Load skin > FileName.xml. 2. Tags and atributes of descriptor files 2.1. All tags may have atributes: id android:layout_width android:layout_height android:layout_gravity android:weight 2.2. LinearLayout tag May contains all tags, for example ... Attributes: background android:orientation author_name author_url version and attributes from 2.1. Tags's function: Like standart android tag LinearLayout defines order and localisation on screen of elements, whose tags were included in LinearLayout tag. 2.3. ImageButton tag Cannot contain other tags. Attributes: android:background image image_press image_background image_background_press image_repeat_one image_repeat_all image_shuffle_on and attributes from 2.1. Tags's function: Like standart android tag ImageButton defines size and appearance of control button. 2.4. TextView tag Cannot contain other tags. Attributes: android:marqueeRepeatLimit android:SingleLine android:scrollHorizontally android:layout_marginLeft android:ellipsize and attributes from 2.1. Tags's function: Like standart android tag TextView defines size and other parameters of a text field. 2.5. PlaylistView Cannot contain other tags. Attributes: color_text color_text_play_text select_background image_small_progress select_image_small_progress select_background_small_progress text_left_padding and attributes from 2.1. Tags's function: PlaylistView tag defines size, color and other parameters of AstroPlayer's playlist. 2.6. ScrollView tag Cannot contain other tags. Attributes: attributes from 2.1. Tags's function: Defines size, color and other parameters of lyrics's text field. 2.7. CustomSeekBar tag Cannot contain other tags. Attributes: image_left image_right image_center and attributes from 2.1. Tags's function: CustomSeekBar tag defines size, color and other parameters of horizontal progress-bar, which shows current position in track. 3. Attributes. 3.1. Table of attributes ****** Attribute (Attributes' description) ------ Values ****** android:layout_width (Width) ------ "fill_parent", "wrap_content", or format string "Npx", where N - value in pixels, for example "65px" ****** android:layout_height (Height) ------ "fill_parent", "wrap_content", or format string "Npx", where N - value in pixels, for example "65px" ****** android:layout_gravity (Tool for placing an object within a potentially larger container) ------ "top", "bottom", "left", "right", "fill", "center", "center_vertical", "center_horizontal", "fill_vertical", "fill_horizontal", "clip_vertical", "clip_horizontal" ****** android:weight (Indicates how much of the extra space in the LinearLayout will be allocated to the view associated with these LayoutParams) ------ "0", "1", "1.1", "2" ****** android:orientation (Should the layout be a column or a row? Use "horizontal" for a row, "vertical" for a column) ------ "horizontal", "vertical" ****** background (Element's background image) ------ Name of image's file. File must be in FOLDER/views/ directory, for example FOLDER/views/NewDesign/file.png ****** android:background (Element's background color) ------ Format string "#nnnnnn", for example "#FF0000" ****** image (Image for ImageButton) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** image_press (Image for ImageButton, which is shown when the button is pushed) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** image_background (Background image for ImageButton) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** image_background_press (Background image for ImageButton, which is shown when the button is pushed) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** image_repeat_one (Background image for ImageButton with id="id_button_repeat") ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** image_repeat_all (Background image for ImageButton with id="id_button_repeat") ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** image_shuffle_on (Background image for ImageButton with id="id_button_shuffle") ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** android:marqueeRepeatLimit (The number of times to repeat the marquee animation) ------ May be an integer value, such as "100" ****** android:SingleLine (Text will be placed in single line) ------ "true" or "false" ****** android:scrollHorizontally (Whether the text is allowed to be wider than the view (and therefore can be scrolled horizontally)) ------ Must be a boolean value, either "true" or "false" ****** android:layout_marginLeft (Specifies extra space on the left side of this view) ------ Format string "Npx", for example "65px", N - size in pixels ****** android:ellipsize (If set, causes words that are longer than the view is wide to be ellipsized instead of broken in the middle. You will often also want to set scrollHorizontally or singleLine as well so that the text as a whole is also constrained to a single line instead of still allowed to be broken onto multiple lines) ------ Must be one of the following constant values: "none" "start" "middle" "end" "marquee" ****** color_text (Text color of track's name in the playlist) ------ Format string "#nnnnnn", for example "#FF0000" ****** color_text_play_text (Text color of an active track's name in the playlist) ------ Format string "#nnnnnn", for example "#FF0000" ****** select_background (Background image for track in the playlist) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** image_small_progress (Image for small progress bar in the playlist) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** select_image_small_progress (Image for small progress bar for selected track in the playlist) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** select_background_small_progress (Background image for selected track in the playlist) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** image_left (Left part of the progress-bar) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** image_right (Right part of the progress-bar) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** image_center (Image — main part of the progress-bar) ------ Name of image's file. File must be in FOLDER/views/, for example FOLDER/views/NewDesign/file.png ****** text_left_padding (Left indent for track's names in the playlist) ------ Format string "Npx", for example "65px", N - size in pixels ****** author_name (Name of the skin's author) ------ String "Name" ****** author_url (url of the skin's author) ------ String "URL" ****** version (Version number of the skin) ------ String as "0.0" ****** 3.2. Attribute id. Unique value is assigned for id attribute for each tag. Some id values are reserved for user interface special elements: id value : Element "@+id/id_button_lyrics" : Button Lirics "@+id/id_button_up" : Button Previous track "@+id/id_button_open" : Button Open "@+id/id_button_rewind" : Button Rewind "@+id/id_button_playpause" : Button Play / Pause "@+id/id_button_fastforward" : Button Fast Forward "@+id/id_button_bookmark" : Button Bookmark "@+id/id_button_down" : Button Next track "@+id/id_button_library" : Button Library "@+id/id_button_repeat" : Button Repeat "@+id/id_button_shuffle" : Button Shuffle "@+id/id_button_forward1min" : Button Fast Forward 1 minute "@+id/id_button_forward2min" : Button Fast Forward 2 minute "@+id/id_button_forward3min" : Button Fast Forward 3 minute "@+id/id_button_forward15sec" : Button Fast Forward 15 sec "@+id/id_button_rewind1min" : Button Rewind 1 minute "@+id/id_button_rewind2min" : Button Rewind 2 minute "@+id/id_button_rewind3min" : Button Rewind 3 minute "@+id/id_button_rewind15sec" : Button Rewind 15 sec "@+id/id_button_goto" : Button «Call dialog go to» "@+id/id_button_select_skin" : Button «Select Skin dialog» "@+id/id_button_list_bookmarks" : Button List bookmarks "@+id/id_button_stop" : Button Stop "@+id/id_button_goto_playlist_start" : Button Go to playlist start "@+id/id_button_eq" : Button Equaliser "@+id/id_button_cover" : Button Cover of track "@+id/id_top_panel" : Top Layout with current track's data ( Top Panel ) "@+id/id_tracks" : PlaylistView ( см. п. 2.5 ) "@+id/id_mid" : Central Layout for graphic interface "@+id/id_bottom" : Bottom Layout for graphic interface "@+id/id_bar" : CustomSeekBar ( see 2.7 ) "@+id/id_header" : Text field with track's name, which must be in the top Layout ( Top Panel ) "@+id/id_details" : Text field with album/singer's name, which must be in the top Layout ( Top Panel ) "@+id/id_timetextview" : Text field with track's time, which must be in the top Layout ( Top Panel ) "@+id/id_lyrics" : ScrollView ( see 2.6 )