rename
BIN
SweetDreamsLib/res/drawable/pasusenormal.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
8
SweetDreamsLib/res/drawable/pause_button.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/pausepressed" /> <!-- pressed -->
|
||||
<item android:state_focused="true"
|
||||
android:drawable="@drawable/pausehot" /> <!-- focused -->
|
||||
<item android:drawable="@drawable/pausenormalred" /> <!-- default -->
|
||||
</selector>
|
||||
BIN
SweetDreamsLib/res/drawable/pausedisabled.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
SweetDreamsLib/res/drawable/pausehot.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
SweetDreamsLib/res/drawable/pausenormalred.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
SweetDreamsLib/res/drawable/pausepressed.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
8
SweetDreamsLib/res/drawable/play_button.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/playpressed" /> <!-- pressed -->
|
||||
<item android:state_focused="true"
|
||||
android:drawable="@drawable/playhot" /> <!-- focused -->
|
||||
<item android:drawable="@drawable/playnormal" /> <!-- default -->
|
||||
</selector>
|
||||
BIN
SweetDreamsLib/res/drawable/playdisabled.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
SweetDreamsLib/res/drawable/playhot.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
SweetDreamsLib/res/drawable/playnormal.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
SweetDreamsLib/res/drawable/playpressed.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
75
SweetDreamsLib/res/layout/main.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:myapp="com.TwentyCodes.android.SweetSoundsLite"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="#ffffff"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/track_title"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="30dip"
|
||||
android:textColor="#000000"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20dip"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:layout_marginTop="10dip"
|
||||
android:layout_below="@id/track_title"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/play_pause_button"
|
||||
android:background="@drawable/play_button"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time_left"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_below="@id/play_pause_button"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="10dip"
|
||||
android:textColor="#000000"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20dip"
|
||||
/>
|
||||
|
||||
<com.admob.android.ads.AdView
|
||||
android:id="@+id/ad"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
myapp:backgroundColor="#000000"
|
||||
myapp:primaryTextColor="#FFFFFF"
|
||||
myapp:secondaryTextColor="#CCCCCC"/>
|
||||
|
||||
<SeekBar
|
||||
android:max="100"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/ad"
|
||||
android:layout_marginBottom="40dip"
|
||||
android:layout_marginRight="20dip"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:id="@+id/volume"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/volume"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="Volume"
|
||||
android:textColor="#000000"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20dip"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
BIN
SweetDreamsLib/res/raw/ac.mp3
Normal file
BIN
SweetDreamsLib/res/raw/beach.mp3
Normal file
BIN
SweetDreamsLib/res/raw/crickets.mp3
Normal file
BIN
SweetDreamsLib/res/raw/falls.mp3
Normal file
BIN
SweetDreamsLib/res/raw/river.mp3
Normal file
10
SweetDreamsLib/res/values/attrs.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<declare-styleable name="com.admob.android.ads.AdView">
|
||||
<attr name="backgroundColor" format="color" />
|
||||
<attr name="primaryTextColor" format="color" />
|
||||
<attr name="secondaryTextColor" format="color" />
|
||||
<attr name="keywords" format="string" />
|
||||
<attr name="refreshInterval" format="integer" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
10
SweetDreamsLib/res/values/sounds.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="sounds">
|
||||
<item>Rainy River</item>
|
||||
<item>Beach</item>
|
||||
<item>Crickets</item>
|
||||
<item>Water Falls</item>
|
||||
<item>Air Conditioner</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
5
SweetDreamsLib/res/values/strings.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="hello">Hello World, WhiteNoise!</string>
|
||||
<string name="app_name">Sweet Dreams</string>
|
||||
</resources>
|
||||
38
SweetDreamsLib/res/xml/settings.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:title="White Noise Options">
|
||||
|
||||
<ListPreference android:dialogTitle="Pick A Sound"
|
||||
android:entryValues="@array/sounds"
|
||||
android:entries="@array/sounds"
|
||||
android:key="sounds"
|
||||
android:title="Sounds"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="Timer Options">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:title="Enable"
|
||||
android:summary="Enable Timer"
|
||||
android:defaultValue="false"
|
||||
android:key="timer_enabled"
|
||||
/>
|
||||
|
||||
<com.TwentyCodes.android.SweetSoundsLite.TimePickerPreference
|
||||
android:title="Timer"
|
||||
android:dependency="timer_enabled"
|
||||
android:key="timer_length"
|
||||
/>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:title="Exit On Finish"
|
||||
android:summary="Closes Application When Timer Finishes"
|
||||
android:defaultValue="false"
|
||||
android:key="timer_exit_on_finish"
|
||||
android:dependency="timer_enabled"
|
||||
/>
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||