Inital Commit of the framented migration

Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
2012-05-10 13:07:38 -04:00
parent 50f050dd33
commit 69597150ea
64 changed files with 4363 additions and 2178 deletions

View File

@@ -1,129 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="internalOnly"
package="com.TwentyCodes.android.LocationRinger"
android:versionCode="20"
android:versionName="1.0" >
package="com.TwentyCodes.android.LocationRinger"
android:installLocation="internalOnly" android:versionName="1.0" android:versionCode="21">
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"></uses-permission>
<uses-permission android:name="android.permission.WRITE_SETTINGS"></uses-permission>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"></uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
<uses-permission android:name="android.permission.BLUETOOTH"></uses-permission>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" >
</uses-permission>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" >
</uses-permission>
<uses-permission android:name="android.permission.WRITE_SETTINGS" >
</uses-permission>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" >
</uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK" >
</uses-permission>
<uses-permission android:name="android.permission.BLUETOOTH" >
</uses-permission>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" >
</uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" >
</uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
</uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE" >
</uses-permission>
<application
android:icon="@drawable/icon"
android:label="@string/app_name" >
<activity
android:name="LocationRinger"
android:configChanges="keyboard|orientation"
android:label="@string/app_name" >
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:label="@string/app_name" android:configChanges="keyboard|orientation" android:name="LocationRinger">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps" />
<activity
android:name=".ui.WhatActivity"
android:configChanges="keyboard|orientation" >
</activity>
<receiver
android:name=".receivers.SystemReceiver"
android:enabled="true"
android:exported="true"
android:process=":SysyemEventReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" >
</action>
<action android:name="android.intent.action.BATTERY_LOW" >
</action>
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" >
</action>
</intent-filter>
</receiver>
<receiver
android:name=".receivers.LocationReceiver"
android:enabled="true"
android:exported="true"
android:process=":LocationReceiver" >
<intent-filter>
<action android:name="com.TwentyCodes.android.LocationRinger.action.LocationUpdate" >
</action>
</intent-filter>
</receiver>
<service
android:name=".services.LocationService"
android:enabled="true"
android:exported="true"
android:process=":LocationService" >
</service>
<service
android:name=".services.RingerProcessingService"
android:enabled="true"
android:exported="true"
android:process=":RingerProcessingService" >
</service>
<activity
android:name=".ui.SettingsActivity"
android:enabled="true" >
</activity>
<receiver
android:name=".receivers.GetLocationWidget"
android:label="@string/app_name" >
<uses-library android:name="com.google.android.maps"/>
<activity android:name=".ui.RingerInformationActivity" android:configChanges="keyboard|orientation"></activity>
<receiver android:name=".receivers.SystemReceiver" android:enabled="true" android:exported="true" android:process=":SysyemEventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
<action android:name="android.intent.action.BATTERY_LOW"></action>
<action android:name="android.intent.action.ACTION_POWER_CONNECTED"></action>
</intent-filter>
</receiver>
<receiver android:name=".receivers.LocationReceiver" android:process=":LocationReceiver" android:enabled="true" android:exported="true">
<intent-filter>
<action android:name="com.TwentyCodes.android.LocationRinger.action.LocationUpdate"></action>
</intent-filter>
</receiver>
<service android:process=":LocationService" android:exported="true" android:enabled="true" android:name=".services.LocationService"></service>
<service android:process=":RingerProcessingService" android:exported="true" android:enabled="true" android:name=".services.RingerProcessingService"></service>
<activity android:name=".ui.SettingsActivity" android:enabled="true"></activity>
<receiver android:label="@string/app_name" android:name=".receivers.GetLocationWidget">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/updatelocationwidgetinfo" />
<meta-data android:name="android.appwidget.provider" android:resource="@xml/updatelocationwidgetinfo"/>
</receiver>
<activity
android:name="com.TwentyCodes.android.exception.ExceptionReportActivity"
android:configChanges="keyboard|orientation" >
</activity>
<activity
android:name="com.TwentyCodes.android.SkyHook.Splash"
android:configChanges="keyboard|orientation"
android:screenOrientation="portrait" >
</activity>
<activity android:name=".ui.HowActivity" >
</activity>
<service android:name="com.TwentyCodes.android.exception.ReportPostingService" >
</service>
<activity android:name="com.TwentyCodes.android.exception.ExceptionReportActivity" android:configChanges="keyboard|orientation"></activity>
<activity android:name="com.TwentyCodes.android.SkyHook.Splash" android:screenOrientation="portrait" android:configChanges="keyboard|orientation"></activity>
</application>
</manifest>

View File

@@ -13,8 +13,8 @@
# get is the path to your json retrieval script
# app is the redmine project name
# tracker is the redmine tracker
server = http://rickbarrette.dyndns.org:8080/redmine/exceptionhandler
app = test
server = http://rickbarrette.dyndns.org/redmine/exceptionhandler
app = Location Ringer
tracker = Development Bug
# uncomment the following if you want your application to use email to file reports.

View File

@@ -18,6 +18,197 @@ public final class R {
public static final int runtimes=0x7f060005;
}
public static final class attr {
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int centered=0x7f010002;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int circlePageIndicatorStyle=0x7f010000;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int clipPadding=0x7f010007;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int fillColor=0x7f010003;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int footerColor=0x7f010008;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int footerIndicatorHeight=0x7f01000b;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int footerIndicatorPadding=0x7f01000c;
/** <p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>triangle</code></td><td>1</td><td></td></tr>
<tr><td><code>underline</code></td><td>2</td><td></td></tr>
</table>
*/
public static final int footerIndicatorStyle=0x7f01000a;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int footerIndicatorUnderlinePadding=0x7f01000d;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int footerLineHeight=0x7f010009;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int radius=0x7f010004;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int selectedBold=0x7f01000f;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int selectedColor=0x7f01000e;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int snap=0x7f010005;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int strokeColor=0x7f010006;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int textColor=0x7f010010;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int textSize=0x7f010011;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int titlePadding=0x7f010012;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int titlePageIndicatorStyle=0x7f010001;
}
public static final class bool {
public static final int default_circle_indicator_centered=0x7f080000;
public static final int default_circle_indicator_snap=0x7f080001;
public static final int default_title_indicator_selected_bold=0x7f080002;
}
public static final class color {
public static final int default_circle_indicator_fill_color=0x7f090000;
public static final int default_circle_indicator_stroke_color=0x7f090001;
public static final int default_title_indicator_footer_color=0x7f090002;
public static final int default_title_indicator_selected_color=0x7f090003;
public static final int default_title_indicator_text_color=0x7f090004;
}
public static final class dimen {
public static final int default_circle_indicator_radius=0x7f0a0000;
public static final int default_title_indicator_clip_padding=0x7f0a0001;
public static final int default_title_indicator_footer_indicator_height=0x7f0a0003;
public static final int default_title_indicator_footer_indicator_padding=0x7f0a0004;
public static final int default_title_indicator_footer_indicator_underline_padding=0x7f0a0005;
public static final int default_title_indicator_footer_line_height=0x7f0a0002;
public static final int default_title_indicator_text_size=0x7f0a0006;
public static final int default_title_indicator_title_padding=0x7f0a0007;
}
public static final class drawable {
public static final int compass=0x7f020000;
@@ -47,179 +238,559 @@ public final class R {
public static final int user_arrow_animation_3=0x7f020018;
}
public static final class id {
public static final int TextView01=0x7f070013;
public static final int TextView02=0x7f070014;
public static final int add_a_feature_label=0x7f07003b;
public static final int TextView01=0x7f070014;
public static final int TextView02=0x7f070015;
public static final int add_feature_button=0x7f070020;
public static final int add_ringer_button=0x7f070027;
public static final int add_ringer_button_hint=0x7f070029;
public static final int address=0x7f070002;
public static final int address_list=0x7f070003;
public static final int alarm_volume=0x7f070004;
public static final int alarm_volume_info=0x7f070036;
public static final int bluetooth_toggle=0x7f070039;
public static final int buttons=0x7f07000f;
public static final int data_label=0x7f070037;
public static final int description=0x7f070008;
public static final int exception_text=0x7f07000a;
public static final int exception_title=0x7f070009;
public static final int info=0x7f070032;
public static final int mapProgressBar=0x7f070006;
public static final int map_controls=0x7f070015;
public static final int map_edit_toggle=0x7f070016;
public static final int map_info=0x7f070011;
public static final int add_ringer_button=0x7f070028;
public static final int add_ringer_button_hint=0x7f07002a;
public static final int address=0x7f070005;
public static final int address_list=0x7f070006;
public static final int buttons=0x7f070019;
public static final int description=0x7f07000a;
public static final int exception_text=0x7f07000c;
public static final int exception_title=0x7f07000b;
public static final int fragment_container=0x7f070010;
public static final int fragment_list_contianer=0x7f070011;
public static final int indicator=0x7f070026;
public static final int label=0x7f07002b;
public static final int mapProgressBar=0x7f070008;
public static final int map_controls=0x7f070016;
public static final int map_edit_toggle=0x7f070017;
public static final int map_mode=0x7f070024;
public static final int mapview=0x7f070005;
public static final int mapview=0x7f070007;
public static final int mark_my_location=0x7f070022;
public static final int msg=0x7f07000c;
public static final int msg_scrollview=0x7f07000b;
public static final int music_volume=0x7f070018;
public static final int music_volume_info=0x7f070035;
public static final int msg=0x7f07000e;
public static final int msg_scrollview=0x7f07000d;
public static final int my_location=0x7f070023;
public static final int notification_ringtone=0x7f07001b;
public static final int notification_ringtone_button=0x7f07001a;
public static final int notification_ringtone_info=0x7f070034;
public static final int notification_ringtone_volume=0x7f07001c;
public static final int notification_silent_toggle=0x7f070019;
public static final int ok=0x7f070001;
public static final int ok_button=0x7f07000d;
public static final int radius=0x7f070017;
public static final int ringer_enabled_checkbox=0x7f070012;
public static final int ringer_list=0x7f070028;
public static final int ringer_name=0x7f070031;
public static final int ringer_options=0x7f07002f;
public static final int ringer_toggle=0x7f070030;
public static final int ringerinfpager=0x7f070026;
public static final int ringtone=0x7f07002c;
public static final int ringtone_button=0x7f07002b;
public static final int ringtone_info=0x7f070033;
public static final int ringtone_silent_toggle=0x7f07002a;
public static final int ringtone_volume=0x7f07002d;
public static final int none=0x7f070000;
public static final int ok=0x7f070004;
public static final int ok_button=0x7f07000f;
public static final int pager=0x7f070027;
public static final int radius=0x7f070018;
public static final int ringer_description=0x7f07001f;
public static final int ringer_enabled=0x7f07001d;
public static final int ringer_enabled_checkbox=0x7f070013;
public static final int ringer_list=0x7f070029;
public static final int ringer_name=0x7f07001e;
public static final int ringtone=0x7f07002e;
public static final int ringtone_button=0x7f07002d;
public static final int ringtone_silent_toggle=0x7f07002c;
public static final int ringtone_volume=0x7f07002f;
public static final int save_ringer_button=0x7f070021;
public static final int scrollview=0x7f070010;
public static final int search=0x7f070025;
public static final int search_progress=0x7f070000;
public static final int send=0x7f070007;
public static final int skyhook_img=0x7f07001d;
public static final int tc_img=0x7f07001f;
public static final int text=0x7f07001e;
public static final int update_interval=0x7f07002e;
public static final int update_interval_info=0x7f07003a;
public static final int widget_get_location_button=0x7f07000e;
public static final int wifi_toggle=0x7f070038;
public static final int search_progress=0x7f070003;
public static final int send=0x7f070009;
public static final int skyhook_img=0x7f07001a;
public static final int tc_img=0x7f07001c;
public static final int text=0x7f07001b;
public static final int toggle=0x7f070030;
public static final int triangle=0x7f070001;
public static final int underline=0x7f070002;
public static final int update_interval=0x7f070031;
public static final int volume=0x7f070033;
public static final int volume_label=0x7f070032;
public static final int widget_get_location_button=0x7f070012;
}
public static final class integer {
public static final int default_title_indicator_footer_indicator_style=0x7f0b0000;
}
public static final class layout {
public static final int address_dialog=0x7f030000;
public static final int alarm_volume=0x7f030001;
public static final int base_map_fragment=0x7f030002;
public static final int exception_activity=0x7f030003;
public static final int exception_list_item=0x7f030004;
public static final int first_boot_dialog=0x7f030005;
public static final int get_location_widget=0x7f030006;
public static final int how=0x7f030007;
public static final int base_map_fragment=0x7f030001;
public static final int exception_activity=0x7f030002;
public static final int exception_list_item=0x7f030003;
public static final int first_boot_dialog=0x7f030004;
public static final int fragment_container=0x7f030005;
public static final int fragment_list_contianer=0x7f030006;
public static final int get_location_widget=0x7f030007;
public static final int list=0x7f030008;
public static final int list_item=0x7f030009;
public static final int list_row=0x7f03000a;
public static final int listview=0x7f03000b;
public static final int map_info=0x7f03000c;
public static final int music_volume=0x7f03000d;
public static final int notification_ringtone=0x7f03000e;
public static final int powered_by_skyhook=0x7f03000f;
public static final int ringer_info_button_bar=0x7f030010;
public static final int ringer_information=0x7f030011;
public static final int ringer_list=0x7f030012;
public static final int ringtone=0x7f030013;
public static final int update_interval=0x7f030014;
public static final int what=0x7f030015;
public static final int map_info_fragment=0x7f03000c;
public static final int powered_by_skyhook=0x7f03000d;
public static final int ringer_about_fragment=0x7f03000e;
public static final int ringer_info_button_bar=0x7f03000f;
public static final int ringer_information_activity=0x7f030010;
public static final int ringer_list=0x7f030011;
public static final int ringtone_fragment=0x7f030012;
public static final int toggle_button_fragment=0x7f030013;
public static final int update_interval_fragment=0x7f030014;
public static final int volume_fragment=0x7f030015;
}
public static final class string {
public static final int about=0x7f050022;
public static final int accuracy=0x7f050023;
public static final int accuracy_about=0x7f050036;
public static final int add_a_feature=0x7f05004d;
public static final int add_a_ringer=0x7f05004e;
public static final int add_feature=0x7f050046;
public static final int address=0x7f050028;
public static final int alarm_volume=0x7f050032;
public static final int about=0x7f050024;
public static final int about_default_ringer=0x7f05005f;
public static final int accuracy=0x7f050025;
public static final int accuracy_about=0x7f050037;
public static final int add_a_feature=0x7f05004e;
public static final int add_a_ringer=0x7f05004f;
public static final int add_feature=0x7f050047;
public static final int address=0x7f05002a;
public static final int alarm_volume=0x7f050033;
public static final int app_name=0x7f050000;
public static final int applying=0x7f050021;
public static final int backup=0x7f05002b;
public static final int backup_about=0x7f050050;
public static final int backup_and_restore=0x7f05004f;
public static final int bluetooth=0x7f05004a;
public static final int applying=0x7f050023;
public static final int backup=0x7f05002c;
public static final int backup_about=0x7f050051;
public static final int backup_and_restore=0x7f050050;
public static final int bluetooth=0x7f05004b;
public static final int bt_disabled=0x7f05001a;
public static final int bt_enabled=0x7f050019;
public static final int cant_delete_default=0x7f050030;
public static final int contact_us=0x7f05003a;
public static final int call_volume=0x7f050058;
public static final int cant_delete_default=0x7f050031;
public static final int contact_us=0x7f05003b;
public static final int crash=0x7f050003;
public static final int data=0x7f050016;
public static final int default_hint=0x7f050053;
public static final int default_ringer=0x7f050020;
public static final int default_save_hint=0x7f050052;
public static final int deleteing=0x7f050041;
public static final int default_hint=0x7f050054;
public static final int default_ringer=0x7f050022;
public static final int default_save_hint=0x7f050053;
public static final int delete=0x7f050060;
public static final int deleteing=0x7f050042;
public static final int description=0x7f050007;
public static final int disable=0x7f050012;
public static final int edit_location=0x7f05000e;
public static final int editing=0x7f050024;
public static final int editing_location=0x7f05000f;
public static final int email=0x7f050038;
public static final int email_about=0x7f050039;
public static final int dtmf_volume=0x7f05005b;
public static final int edit_location=0x7f05001d;
public static final int editing=0x7f050026;
public static final int editing_location=0x7f05001c;
public static final int email=0x7f050039;
public static final int email_about=0x7f05003a;
public static final int enable=0x7f050011;
public static final int gathering=0x7f050042;
public static final int gathering=0x7f050043;
public static final int gps_fix=0x7f050001;
public static final int hello=0x7f05000b;
public static final int ignore_location=0x7f050026;
public static final int ignore_location_about=0x7f050027;
public static final int loading=0x7f05003f;
public static final int hello=0x7f05000d;
public static final int how=0x7f050055;
public static final int ignore_location=0x7f050028;
public static final int ignore_location_about=0x7f050029;
public static final int loading=0x7f050040;
public static final int location=0x7f05005e;
public static final int location_and_radius=0x7f05001b;
public static final int map_editiing_disabled=0x7f05001f;
public static final int map_editing_enabled=0x7f05001e;
public static final int music_volume=0x7f050031;
public static final int new_ringer=0x7f050025;
public static final int map_editiing_disabled=0x7f050021;
public static final int map_editing_enabled=0x7f050020;
public static final int music_volume=0x7f050032;
public static final int new_ringer=0x7f050027;
public static final int no_reports=0x7f050009;
public static final int notification_ringtone=0x7f050048;
public static final int notification_ringtone=0x7f050049;
public static final int notification_ringtone_options=0x7f050015;
public static final int other_volume_levels=0x7f050033;
public static final int radius=0x7f05004b;
public static final int registered=0x7f050044;
public static final int restore=0x7f05002c;
public static final int restore_about=0x7f050051;
public static final int ringer_name=0x7f05002a;
public static final int notification_volume=0x7f050057;
public static final int other_volume_levels=0x7f050034;
public static final int radius=0x7f05004c;
public static final int registered=0x7f050045;
public static final int reporting_error=0x7f05000b;
public static final int reporting_error_msg=0x7f05000c;
public static final int restore=0x7f05002d;
public static final int restore_about=0x7f050052;
public static final int ringer_description=0x7f05005c;
public static final int ringer_name=0x7f050061;
public static final int ringer_options=0x7f050010;
public static final int ringtone=0x7f050047;
public static final int ringtone=0x7f050048;
public static final int ringtone_options=0x7f050013;
public static final int save_ringer=0x7f05001d;
public static final int saving=0x7f05003e;
public static final int search=0x7f050029;
public static final int select_tone=0x7f05004c;
public static final int ringtone_volume=0x7f05005a;
public static final int save_ringer=0x7f05001f;
public static final int saving=0x7f05003f;
public static final int search=0x7f05002b;
public static final int select_tone=0x7f05004d;
public static final int send=0x7f050006;
public static final int sending=0x7f050005;
public static final int sending_report=0x7f05000a;
public static final int settings=0x7f05002f;
public static final int silent_disabled=0x7f05000d;
public static final int silent_enabled=0x7f05000c;
public static final int skyhook_error_registration=0x7f050045;
public static final int settings=0x7f050030;
public static final int silent=0x7f05005d;
public static final int silent_disabled=0x7f05000f;
public static final int silent_enabled=0x7f05000e;
public static final int skyhook_error_registration=0x7f050046;
public static final int sorry=0x7f050004;
public static final int sorry_theres_trouble=0x7f050002;
public static final int start_on_boot=0x7f05003c;
public static final int start_on_boot_about=0x7f05003d;
public static final int start_service=0x7f05002d;
public static final int stop_service=0x7f05002e;
public static final int toasty=0x7f050034;
public static final int toasty_about=0x7f050035;
public static final int update_interval=0x7f05001c;
public static final int update_interval_about=0x7f050037;
public static final int upgrading=0x7f050040;
public static final int start_on_boot=0x7f05003d;
public static final int start_on_boot_about=0x7f05003e;
public static final int start_service=0x7f05002e;
public static final int stop_service=0x7f05002f;
public static final int system_volume=0x7f050059;
public static final int toasty=0x7f050035;
public static final int toasty_about=0x7f050036;
public static final int update_interval=0x7f05001e;
public static final int update_interval_about=0x7f050038;
public static final int upgrading=0x7f050041;
public static final int version=0x7f050008;
public static final int version_info=0x7f05003b;
public static final int version_info=0x7f05003c;
public static final int volume=0x7f050014;
public static final int welcome=0x7f050043;
public static final int wifi=0x7f050049;
public static final int welcome=0x7f050044;
public static final int what=0x7f050056;
public static final int wifi=0x7f05004a;
public static final int wifi_disabled=0x7f050018;
public static final int wifi_enabled=0x7f050017;
}
public static final class style {
public static final int CustomCirclePageIndicator=0x7f0c0002;
public static final int CustomTitlePageIndicator=0x7f0c0001;
public static final int StyledIndicators=0x7f0c0000;
/**
Copyright (C) 2011 Jake Wharton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
public static final int Theme_PageIndicatorDefaults=0x7f0c0003;
public static final int Widget_CirclePageIndicator=0x7f0c0004;
public static final int Widget_TitlePageIndicator=0x7f0c0005;
}
public static final class xml {
public static final int setings=0x7f040000;
public static final int updatelocationwidgetinfo=0x7f040001;
}
public static final class styleable {
/** Attributes that can be used with a CirclePageIndicator.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #CirclePageIndicator_centered com.TwentyCodes.android.LocationRinger:centered}</code></td><td></td></tr>
<tr><td><code>{@link #CirclePageIndicator_fillColor com.TwentyCodes.android.LocationRinger:fillColor}</code></td><td></td></tr>
<tr><td><code>{@link #CirclePageIndicator_radius com.TwentyCodes.android.LocationRinger:radius}</code></td><td></td></tr>
<tr><td><code>{@link #CirclePageIndicator_snap com.TwentyCodes.android.LocationRinger:snap}</code></td><td></td></tr>
<tr><td><code>{@link #CirclePageIndicator_strokeColor com.TwentyCodes.android.LocationRinger:strokeColor}</code></td><td></td></tr>
</table>
@see #CirclePageIndicator_centered
@see #CirclePageIndicator_fillColor
@see #CirclePageIndicator_radius
@see #CirclePageIndicator_snap
@see #CirclePageIndicator_strokeColor
*/
public static final int[] CirclePageIndicator = {
0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005,
0x7f010006
};
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#centered}
attribute's value can be found in the {@link #CirclePageIndicator} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:centered
*/
public static final int CirclePageIndicator_centered = 0;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#fillColor}
attribute's value can be found in the {@link #CirclePageIndicator} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:fillColor
*/
public static final int CirclePageIndicator_fillColor = 1;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#radius}
attribute's value can be found in the {@link #CirclePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:radius
*/
public static final int CirclePageIndicator_radius = 2;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#snap}
attribute's value can be found in the {@link #CirclePageIndicator} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:snap
*/
public static final int CirclePageIndicator_snap = 3;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#strokeColor}
attribute's value can be found in the {@link #CirclePageIndicator} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:strokeColor
*/
public static final int CirclePageIndicator_strokeColor = 4;
/** Attributes that can be used with a TitlePageIndicator.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #TitlePageIndicator_clipPadding com.TwentyCodes.android.LocationRinger:clipPadding}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerColor com.TwentyCodes.android.LocationRinger:footerColor}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerIndicatorHeight com.TwentyCodes.android.LocationRinger:footerIndicatorHeight}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerIndicatorPadding com.TwentyCodes.android.LocationRinger:footerIndicatorPadding}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerIndicatorStyle com.TwentyCodes.android.LocationRinger:footerIndicatorStyle}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerIndicatorUnderlinePadding com.TwentyCodes.android.LocationRinger:footerIndicatorUnderlinePadding}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerLineHeight com.TwentyCodes.android.LocationRinger:footerLineHeight}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_selectedBold com.TwentyCodes.android.LocationRinger:selectedBold}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_selectedColor com.TwentyCodes.android.LocationRinger:selectedColor}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_textColor com.TwentyCodes.android.LocationRinger:textColor}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_textSize com.TwentyCodes.android.LocationRinger:textSize}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_titlePadding com.TwentyCodes.android.LocationRinger:titlePadding}</code></td><td></td></tr>
</table>
@see #TitlePageIndicator_clipPadding
@see #TitlePageIndicator_footerColor
@see #TitlePageIndicator_footerIndicatorHeight
@see #TitlePageIndicator_footerIndicatorPadding
@see #TitlePageIndicator_footerIndicatorStyle
@see #TitlePageIndicator_footerIndicatorUnderlinePadding
@see #TitlePageIndicator_footerLineHeight
@see #TitlePageIndicator_selectedBold
@see #TitlePageIndicator_selectedColor
@see #TitlePageIndicator_textColor
@see #TitlePageIndicator_textSize
@see #TitlePageIndicator_titlePadding
*/
public static final int[] TitlePageIndicator = {
0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a,
0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e,
0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012
};
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#clipPadding}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:clipPadding
*/
public static final int TitlePageIndicator_clipPadding = 0;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerColor}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:footerColor
*/
public static final int TitlePageIndicator_footerColor = 1;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerIndicatorHeight}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:footerIndicatorHeight
*/
public static final int TitlePageIndicator_footerIndicatorHeight = 4;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerIndicatorPadding}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:footerIndicatorPadding
*/
public static final int TitlePageIndicator_footerIndicatorPadding = 5;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerIndicatorStyle}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>triangle</code></td><td>1</td><td></td></tr>
<tr><td><code>underline</code></td><td>2</td><td></td></tr>
</table>
@attr name android:footerIndicatorStyle
*/
public static final int TitlePageIndicator_footerIndicatorStyle = 3;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerIndicatorUnderlinePadding}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:footerIndicatorUnderlinePadding
*/
public static final int TitlePageIndicator_footerIndicatorUnderlinePadding = 6;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerLineHeight}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:footerLineHeight
*/
public static final int TitlePageIndicator_footerLineHeight = 2;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#selectedBold}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:selectedBold
*/
public static final int TitlePageIndicator_selectedBold = 8;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#selectedColor}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:selectedColor
*/
public static final int TitlePageIndicator_selectedColor = 7;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#textColor}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:textColor
*/
public static final int TitlePageIndicator_textColor = 9;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#textSize}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:textSize
*/
public static final int TitlePageIndicator_textSize = 10;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#titlePadding}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:titlePadding
*/
public static final int TitlePageIndicator_titlePadding = 11;
/** Attributes that can be used with a ViewPagerIndicator.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ViewPagerIndicator_circlePageIndicatorStyle com.TwentyCodes.android.LocationRinger:circlePageIndicatorStyle}</code></td><td></td></tr>
<tr><td><code>{@link #ViewPagerIndicator_titlePageIndicatorStyle com.TwentyCodes.android.LocationRinger:titlePageIndicatorStyle}</code></td><td></td></tr>
</table>
@see #ViewPagerIndicator_circlePageIndicatorStyle
@see #ViewPagerIndicator_titlePageIndicatorStyle
*/
public static final int[] ViewPagerIndicator = {
0x7f010000, 0x7f010001
};
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#circlePageIndicatorStyle}
attribute's value can be found in the {@link #ViewPagerIndicator} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name android:circlePageIndicatorStyle
*/
public static final int ViewPagerIndicator_circlePageIndicatorStyle = 0;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#titlePageIndicatorStyle}
attribute's value can be found in the {@link #ViewPagerIndicator} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name android:titlePageIndicatorStyle
*/
public static final int ViewPagerIndicator_titlePageIndicatorStyle = 1;
};
}

View File

@@ -18,6 +18,197 @@ public final class R {
public static final int runtimes=0x7f060005;
}
public static final class attr {
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int centered=0x7f010002;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int circlePageIndicatorStyle=0x7f010000;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int clipPadding=0x7f010007;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int fillColor=0x7f010003;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int footerColor=0x7f010008;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int footerIndicatorHeight=0x7f01000b;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int footerIndicatorPadding=0x7f01000c;
/** <p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>triangle</code></td><td>1</td><td></td></tr>
<tr><td><code>underline</code></td><td>2</td><td></td></tr>
</table>
*/
public static final int footerIndicatorStyle=0x7f01000a;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int footerIndicatorUnderlinePadding=0x7f01000d;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int footerLineHeight=0x7f010009;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int radius=0x7f010004;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int selectedBold=0x7f01000f;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int selectedColor=0x7f01000e;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int snap=0x7f010005;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int strokeColor=0x7f010006;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int textColor=0x7f010010;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int textSize=0x7f010011;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int titlePadding=0x7f010012;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int titlePageIndicatorStyle=0x7f010001;
}
public static final class bool {
public static final int default_circle_indicator_centered=0x7f080000;
public static final int default_circle_indicator_snap=0x7f080001;
public static final int default_title_indicator_selected_bold=0x7f080002;
}
public static final class color {
public static final int default_circle_indicator_fill_color=0x7f090000;
public static final int default_circle_indicator_stroke_color=0x7f090001;
public static final int default_title_indicator_footer_color=0x7f090002;
public static final int default_title_indicator_selected_color=0x7f090003;
public static final int default_title_indicator_text_color=0x7f090004;
}
public static final class dimen {
public static final int default_circle_indicator_radius=0x7f0a0000;
public static final int default_title_indicator_clip_padding=0x7f0a0001;
public static final int default_title_indicator_footer_indicator_height=0x7f0a0003;
public static final int default_title_indicator_footer_indicator_padding=0x7f0a0004;
public static final int default_title_indicator_footer_indicator_underline_padding=0x7f0a0005;
public static final int default_title_indicator_footer_line_height=0x7f0a0002;
public static final int default_title_indicator_text_size=0x7f0a0006;
public static final int default_title_indicator_title_padding=0x7f0a0007;
}
public static final class drawable {
public static final int compass=0x7f020000;
@@ -47,179 +238,559 @@ public final class R {
public static final int user_arrow_animation_3=0x7f020018;
}
public static final class id {
public static final int TextView01=0x7f070013;
public static final int TextView02=0x7f070014;
public static final int add_a_feature_label=0x7f07003b;
public static final int TextView01=0x7f070014;
public static final int TextView02=0x7f070015;
public static final int add_feature_button=0x7f070020;
public static final int add_ringer_button=0x7f070027;
public static final int add_ringer_button_hint=0x7f070029;
public static final int address=0x7f070002;
public static final int address_list=0x7f070003;
public static final int alarm_volume=0x7f070004;
public static final int alarm_volume_info=0x7f070036;
public static final int bluetooth_toggle=0x7f070039;
public static final int buttons=0x7f07000f;
public static final int data_label=0x7f070037;
public static final int description=0x7f070008;
public static final int exception_text=0x7f07000a;
public static final int exception_title=0x7f070009;
public static final int info=0x7f070032;
public static final int mapProgressBar=0x7f070006;
public static final int map_controls=0x7f070015;
public static final int map_edit_toggle=0x7f070016;
public static final int map_info=0x7f070011;
public static final int add_ringer_button=0x7f070028;
public static final int add_ringer_button_hint=0x7f07002a;
public static final int address=0x7f070005;
public static final int address_list=0x7f070006;
public static final int buttons=0x7f070019;
public static final int description=0x7f07000a;
public static final int exception_text=0x7f07000c;
public static final int exception_title=0x7f07000b;
public static final int fragment_container=0x7f070010;
public static final int fragment_list_contianer=0x7f070011;
public static final int indicator=0x7f070026;
public static final int label=0x7f07002b;
public static final int mapProgressBar=0x7f070008;
public static final int map_controls=0x7f070016;
public static final int map_edit_toggle=0x7f070017;
public static final int map_mode=0x7f070024;
public static final int mapview=0x7f070005;
public static final int mapview=0x7f070007;
public static final int mark_my_location=0x7f070022;
public static final int msg=0x7f07000c;
public static final int msg_scrollview=0x7f07000b;
public static final int music_volume=0x7f070018;
public static final int music_volume_info=0x7f070035;
public static final int msg=0x7f07000e;
public static final int msg_scrollview=0x7f07000d;
public static final int my_location=0x7f070023;
public static final int notification_ringtone=0x7f07001b;
public static final int notification_ringtone_button=0x7f07001a;
public static final int notification_ringtone_info=0x7f070034;
public static final int notification_ringtone_volume=0x7f07001c;
public static final int notification_silent_toggle=0x7f070019;
public static final int ok=0x7f070001;
public static final int ok_button=0x7f07000d;
public static final int radius=0x7f070017;
public static final int ringer_enabled_checkbox=0x7f070012;
public static final int ringer_list=0x7f070028;
public static final int ringer_name=0x7f070031;
public static final int ringer_options=0x7f07002f;
public static final int ringer_toggle=0x7f070030;
public static final int ringerinfpager=0x7f070026;
public static final int ringtone=0x7f07002c;
public static final int ringtone_button=0x7f07002b;
public static final int ringtone_info=0x7f070033;
public static final int ringtone_silent_toggle=0x7f07002a;
public static final int ringtone_volume=0x7f07002d;
public static final int none=0x7f070000;
public static final int ok=0x7f070004;
public static final int ok_button=0x7f07000f;
public static final int pager=0x7f070027;
public static final int radius=0x7f070018;
public static final int ringer_description=0x7f07001f;
public static final int ringer_enabled=0x7f07001d;
public static final int ringer_enabled_checkbox=0x7f070013;
public static final int ringer_list=0x7f070029;
public static final int ringer_name=0x7f07001e;
public static final int ringtone=0x7f07002e;
public static final int ringtone_button=0x7f07002d;
public static final int ringtone_silent_toggle=0x7f07002c;
public static final int ringtone_volume=0x7f07002f;
public static final int save_ringer_button=0x7f070021;
public static final int scrollview=0x7f070010;
public static final int search=0x7f070025;
public static final int search_progress=0x7f070000;
public static final int send=0x7f070007;
public static final int skyhook_img=0x7f07001d;
public static final int tc_img=0x7f07001f;
public static final int text=0x7f07001e;
public static final int update_interval=0x7f07002e;
public static final int update_interval_info=0x7f07003a;
public static final int widget_get_location_button=0x7f07000e;
public static final int wifi_toggle=0x7f070038;
public static final int search_progress=0x7f070003;
public static final int send=0x7f070009;
public static final int skyhook_img=0x7f07001a;
public static final int tc_img=0x7f07001c;
public static final int text=0x7f07001b;
public static final int toggle=0x7f070030;
public static final int triangle=0x7f070001;
public static final int underline=0x7f070002;
public static final int update_interval=0x7f070031;
public static final int volume=0x7f070033;
public static final int volume_label=0x7f070032;
public static final int widget_get_location_button=0x7f070012;
}
public static final class integer {
public static final int default_title_indicator_footer_indicator_style=0x7f0b0000;
}
public static final class layout {
public static final int address_dialog=0x7f030000;
public static final int alarm_volume=0x7f030001;
public static final int base_map_fragment=0x7f030002;
public static final int exception_activity=0x7f030003;
public static final int exception_list_item=0x7f030004;
public static final int first_boot_dialog=0x7f030005;
public static final int get_location_widget=0x7f030006;
public static final int how=0x7f030007;
public static final int base_map_fragment=0x7f030001;
public static final int exception_activity=0x7f030002;
public static final int exception_list_item=0x7f030003;
public static final int first_boot_dialog=0x7f030004;
public static final int fragment_container=0x7f030005;
public static final int fragment_list_contianer=0x7f030006;
public static final int get_location_widget=0x7f030007;
public static final int list=0x7f030008;
public static final int list_item=0x7f030009;
public static final int list_row=0x7f03000a;
public static final int listview=0x7f03000b;
public static final int map_info=0x7f03000c;
public static final int music_volume=0x7f03000d;
public static final int notification_ringtone=0x7f03000e;
public static final int powered_by_skyhook=0x7f03000f;
public static final int ringer_info_button_bar=0x7f030010;
public static final int ringer_information=0x7f030011;
public static final int ringer_list=0x7f030012;
public static final int ringtone=0x7f030013;
public static final int update_interval=0x7f030014;
public static final int what=0x7f030015;
public static final int map_info_fragment=0x7f03000c;
public static final int powered_by_skyhook=0x7f03000d;
public static final int ringer_about_fragment=0x7f03000e;
public static final int ringer_info_button_bar=0x7f03000f;
public static final int ringer_information_activity=0x7f030010;
public static final int ringer_list=0x7f030011;
public static final int ringtone_fragment=0x7f030012;
public static final int toggle_button_fragment=0x7f030013;
public static final int update_interval_fragment=0x7f030014;
public static final int volume_fragment=0x7f030015;
}
public static final class string {
public static final int about=0x7f050022;
public static final int accuracy=0x7f050023;
public static final int accuracy_about=0x7f050036;
public static final int add_a_feature=0x7f05004d;
public static final int add_a_ringer=0x7f05004e;
public static final int add_feature=0x7f050046;
public static final int address=0x7f050028;
public static final int alarm_volume=0x7f050032;
public static final int about=0x7f050024;
public static final int about_default_ringer=0x7f05005f;
public static final int accuracy=0x7f050025;
public static final int accuracy_about=0x7f050037;
public static final int add_a_feature=0x7f05004e;
public static final int add_a_ringer=0x7f05004f;
public static final int add_feature=0x7f050047;
public static final int address=0x7f05002a;
public static final int alarm_volume=0x7f050033;
public static final int app_name=0x7f050000;
public static final int applying=0x7f050021;
public static final int backup=0x7f05002b;
public static final int backup_about=0x7f050050;
public static final int backup_and_restore=0x7f05004f;
public static final int bluetooth=0x7f05004a;
public static final int applying=0x7f050023;
public static final int backup=0x7f05002c;
public static final int backup_about=0x7f050051;
public static final int backup_and_restore=0x7f050050;
public static final int bluetooth=0x7f05004b;
public static final int bt_disabled=0x7f05001a;
public static final int bt_enabled=0x7f050019;
public static final int cant_delete_default=0x7f050030;
public static final int contact_us=0x7f05003a;
public static final int call_volume=0x7f050058;
public static final int cant_delete_default=0x7f050031;
public static final int contact_us=0x7f05003b;
public static final int crash=0x7f050003;
public static final int data=0x7f050016;
public static final int default_hint=0x7f050053;
public static final int default_ringer=0x7f050020;
public static final int default_save_hint=0x7f050052;
public static final int deleteing=0x7f050041;
public static final int default_hint=0x7f050054;
public static final int default_ringer=0x7f050022;
public static final int default_save_hint=0x7f050053;
public static final int delete=0x7f050060;
public static final int deleteing=0x7f050042;
public static final int description=0x7f050007;
public static final int disable=0x7f050012;
public static final int edit_location=0x7f05000e;
public static final int editing=0x7f050024;
public static final int editing_location=0x7f05000f;
public static final int email=0x7f050038;
public static final int email_about=0x7f050039;
public static final int dtmf_volume=0x7f05005b;
public static final int edit_location=0x7f05001d;
public static final int editing=0x7f050026;
public static final int editing_location=0x7f05001c;
public static final int email=0x7f050039;
public static final int email_about=0x7f05003a;
public static final int enable=0x7f050011;
public static final int gathering=0x7f050042;
public static final int gathering=0x7f050043;
public static final int gps_fix=0x7f050001;
public static final int hello=0x7f05000b;
public static final int ignore_location=0x7f050026;
public static final int ignore_location_about=0x7f050027;
public static final int loading=0x7f05003f;
public static final int hello=0x7f05000d;
public static final int how=0x7f050055;
public static final int ignore_location=0x7f050028;
public static final int ignore_location_about=0x7f050029;
public static final int loading=0x7f050040;
public static final int location=0x7f05005e;
public static final int location_and_radius=0x7f05001b;
public static final int map_editiing_disabled=0x7f05001f;
public static final int map_editing_enabled=0x7f05001e;
public static final int music_volume=0x7f050031;
public static final int new_ringer=0x7f050025;
public static final int map_editiing_disabled=0x7f050021;
public static final int map_editing_enabled=0x7f050020;
public static final int music_volume=0x7f050032;
public static final int new_ringer=0x7f050027;
public static final int no_reports=0x7f050009;
public static final int notification_ringtone=0x7f050048;
public static final int notification_ringtone=0x7f050049;
public static final int notification_ringtone_options=0x7f050015;
public static final int other_volume_levels=0x7f050033;
public static final int radius=0x7f05004b;
public static final int registered=0x7f050044;
public static final int restore=0x7f05002c;
public static final int restore_about=0x7f050051;
public static final int ringer_name=0x7f05002a;
public static final int notification_volume=0x7f050057;
public static final int other_volume_levels=0x7f050034;
public static final int radius=0x7f05004c;
public static final int registered=0x7f050045;
public static final int reporting_error=0x7f05000b;
public static final int reporting_error_msg=0x7f05000c;
public static final int restore=0x7f05002d;
public static final int restore_about=0x7f050052;
public static final int ringer_description=0x7f05005c;
public static final int ringer_name=0x7f050061;
public static final int ringer_options=0x7f050010;
public static final int ringtone=0x7f050047;
public static final int ringtone=0x7f050048;
public static final int ringtone_options=0x7f050013;
public static final int save_ringer=0x7f05001d;
public static final int saving=0x7f05003e;
public static final int search=0x7f050029;
public static final int select_tone=0x7f05004c;
public static final int ringtone_volume=0x7f05005a;
public static final int save_ringer=0x7f05001f;
public static final int saving=0x7f05003f;
public static final int search=0x7f05002b;
public static final int select_tone=0x7f05004d;
public static final int send=0x7f050006;
public static final int sending=0x7f050005;
public static final int sending_report=0x7f05000a;
public static final int settings=0x7f05002f;
public static final int silent_disabled=0x7f05000d;
public static final int silent_enabled=0x7f05000c;
public static final int skyhook_error_registration=0x7f050045;
public static final int settings=0x7f050030;
public static final int silent=0x7f05005d;
public static final int silent_disabled=0x7f05000f;
public static final int silent_enabled=0x7f05000e;
public static final int skyhook_error_registration=0x7f050046;
public static final int sorry=0x7f050004;
public static final int sorry_theres_trouble=0x7f050002;
public static final int start_on_boot=0x7f05003c;
public static final int start_on_boot_about=0x7f05003d;
public static final int start_service=0x7f05002d;
public static final int stop_service=0x7f05002e;
public static final int toasty=0x7f050034;
public static final int toasty_about=0x7f050035;
public static final int update_interval=0x7f05001c;
public static final int update_interval_about=0x7f050037;
public static final int upgrading=0x7f050040;
public static final int start_on_boot=0x7f05003d;
public static final int start_on_boot_about=0x7f05003e;
public static final int start_service=0x7f05002e;
public static final int stop_service=0x7f05002f;
public static final int system_volume=0x7f050059;
public static final int toasty=0x7f050035;
public static final int toasty_about=0x7f050036;
public static final int update_interval=0x7f05001e;
public static final int update_interval_about=0x7f050038;
public static final int upgrading=0x7f050041;
public static final int version=0x7f050008;
public static final int version_info=0x7f05003b;
public static final int version_info=0x7f05003c;
public static final int volume=0x7f050014;
public static final int welcome=0x7f050043;
public static final int wifi=0x7f050049;
public static final int welcome=0x7f050044;
public static final int what=0x7f050056;
public static final int wifi=0x7f05004a;
public static final int wifi_disabled=0x7f050018;
public static final int wifi_enabled=0x7f050017;
}
public static final class style {
public static final int CustomCirclePageIndicator=0x7f0c0002;
public static final int CustomTitlePageIndicator=0x7f0c0001;
public static final int StyledIndicators=0x7f0c0000;
/**
Copyright (C) 2011 Jake Wharton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
public static final int Theme_PageIndicatorDefaults=0x7f0c0003;
public static final int Widget_CirclePageIndicator=0x7f0c0004;
public static final int Widget_TitlePageIndicator=0x7f0c0005;
}
public static final class xml {
public static final int setings=0x7f040000;
public static final int updatelocationwidgetinfo=0x7f040001;
}
public static final class styleable {
/** Attributes that can be used with a CirclePageIndicator.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #CirclePageIndicator_centered com.TwentyCodes.android.LocationRinger:centered}</code></td><td></td></tr>
<tr><td><code>{@link #CirclePageIndicator_fillColor com.TwentyCodes.android.LocationRinger:fillColor}</code></td><td></td></tr>
<tr><td><code>{@link #CirclePageIndicator_radius com.TwentyCodes.android.LocationRinger:radius}</code></td><td></td></tr>
<tr><td><code>{@link #CirclePageIndicator_snap com.TwentyCodes.android.LocationRinger:snap}</code></td><td></td></tr>
<tr><td><code>{@link #CirclePageIndicator_strokeColor com.TwentyCodes.android.LocationRinger:strokeColor}</code></td><td></td></tr>
</table>
@see #CirclePageIndicator_centered
@see #CirclePageIndicator_fillColor
@see #CirclePageIndicator_radius
@see #CirclePageIndicator_snap
@see #CirclePageIndicator_strokeColor
*/
public static final int[] CirclePageIndicator = {
0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005,
0x7f010006
};
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#centered}
attribute's value can be found in the {@link #CirclePageIndicator} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:centered
*/
public static final int CirclePageIndicator_centered = 0;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#fillColor}
attribute's value can be found in the {@link #CirclePageIndicator} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:fillColor
*/
public static final int CirclePageIndicator_fillColor = 1;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#radius}
attribute's value can be found in the {@link #CirclePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:radius
*/
public static final int CirclePageIndicator_radius = 2;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#snap}
attribute's value can be found in the {@link #CirclePageIndicator} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:snap
*/
public static final int CirclePageIndicator_snap = 3;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#strokeColor}
attribute's value can be found in the {@link #CirclePageIndicator} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:strokeColor
*/
public static final int CirclePageIndicator_strokeColor = 4;
/** Attributes that can be used with a TitlePageIndicator.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #TitlePageIndicator_clipPadding com.TwentyCodes.android.LocationRinger:clipPadding}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerColor com.TwentyCodes.android.LocationRinger:footerColor}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerIndicatorHeight com.TwentyCodes.android.LocationRinger:footerIndicatorHeight}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerIndicatorPadding com.TwentyCodes.android.LocationRinger:footerIndicatorPadding}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerIndicatorStyle com.TwentyCodes.android.LocationRinger:footerIndicatorStyle}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerIndicatorUnderlinePadding com.TwentyCodes.android.LocationRinger:footerIndicatorUnderlinePadding}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_footerLineHeight com.TwentyCodes.android.LocationRinger:footerLineHeight}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_selectedBold com.TwentyCodes.android.LocationRinger:selectedBold}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_selectedColor com.TwentyCodes.android.LocationRinger:selectedColor}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_textColor com.TwentyCodes.android.LocationRinger:textColor}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_textSize com.TwentyCodes.android.LocationRinger:textSize}</code></td><td></td></tr>
<tr><td><code>{@link #TitlePageIndicator_titlePadding com.TwentyCodes.android.LocationRinger:titlePadding}</code></td><td></td></tr>
</table>
@see #TitlePageIndicator_clipPadding
@see #TitlePageIndicator_footerColor
@see #TitlePageIndicator_footerIndicatorHeight
@see #TitlePageIndicator_footerIndicatorPadding
@see #TitlePageIndicator_footerIndicatorStyle
@see #TitlePageIndicator_footerIndicatorUnderlinePadding
@see #TitlePageIndicator_footerLineHeight
@see #TitlePageIndicator_selectedBold
@see #TitlePageIndicator_selectedColor
@see #TitlePageIndicator_textColor
@see #TitlePageIndicator_textSize
@see #TitlePageIndicator_titlePadding
*/
public static final int[] TitlePageIndicator = {
0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a,
0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e,
0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012
};
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#clipPadding}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:clipPadding
*/
public static final int TitlePageIndicator_clipPadding = 0;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerColor}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:footerColor
*/
public static final int TitlePageIndicator_footerColor = 1;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerIndicatorHeight}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:footerIndicatorHeight
*/
public static final int TitlePageIndicator_footerIndicatorHeight = 4;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerIndicatorPadding}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:footerIndicatorPadding
*/
public static final int TitlePageIndicator_footerIndicatorPadding = 5;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerIndicatorStyle}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>triangle</code></td><td>1</td><td></td></tr>
<tr><td><code>underline</code></td><td>2</td><td></td></tr>
</table>
@attr name android:footerIndicatorStyle
*/
public static final int TitlePageIndicator_footerIndicatorStyle = 3;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerIndicatorUnderlinePadding}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:footerIndicatorUnderlinePadding
*/
public static final int TitlePageIndicator_footerIndicatorUnderlinePadding = 6;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#footerLineHeight}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:footerLineHeight
*/
public static final int TitlePageIndicator_footerLineHeight = 2;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#selectedBold}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:selectedBold
*/
public static final int TitlePageIndicator_selectedBold = 8;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#selectedColor}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:selectedColor
*/
public static final int TitlePageIndicator_selectedColor = 7;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#textColor}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:textColor
*/
public static final int TitlePageIndicator_textColor = 9;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#textSize}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:textSize
*/
public static final int TitlePageIndicator_textSize = 10;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#titlePadding}
attribute's value can be found in the {@link #TitlePageIndicator} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:titlePadding
*/
public static final int TitlePageIndicator_titlePadding = 11;
/** Attributes that can be used with a ViewPagerIndicator.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ViewPagerIndicator_circlePageIndicatorStyle com.TwentyCodes.android.LocationRinger:circlePageIndicatorStyle}</code></td><td></td></tr>
<tr><td><code>{@link #ViewPagerIndicator_titlePageIndicatorStyle com.TwentyCodes.android.LocationRinger:titlePageIndicatorStyle}</code></td><td></td></tr>
</table>
@see #ViewPagerIndicator_circlePageIndicatorStyle
@see #ViewPagerIndicator_titlePageIndicatorStyle
*/
public static final int[] ViewPagerIndicator = {
0x7f010000, 0x7f010001
};
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#circlePageIndicatorStyle}
attribute's value can be found in the {@link #ViewPagerIndicator} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name android:circlePageIndicatorStyle
*/
public static final int ViewPagerIndicator_circlePageIndicatorStyle = 0;
/**
<p>This symbol is the offset where the {@link com.TwentyCodes.android.LocationRinger.R.attr#titlePageIndicatorStyle}
attribute's value can be found in the {@link #ViewPagerIndicator} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name android:titlePageIndicatorStyle
*/
public static final int ViewPagerIndicator_titlePageIndicatorStyle = 1;
};
}

View File

View File

@@ -9,6 +9,6 @@
android.library.reference.1=../../exception_handler_library/ExceptionHandlerLib
android.library.reference.2=../../location_library/LocationLib
proguard.config=proguard.cfg
#proguard.config=proguard.cfg
# Project target.
target=Google Inc.:Google APIs:15

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="@string/alarm_volume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:drawable/title_bar"
android:textColor="#FFFFFF"
android:layout_marginTop="10dip"/>
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/alarm_volume"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"/>
</LinearLayout>

View File

@@ -5,14 +5,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!-- <ImageView -->
<!-- android:layout_width="wrap_content" -->
<!-- android:layout_height="wrap_content" -->
<!-- android:src="@drawable/icon" -->
<!-- android:layout_alignParentLeft="true" -->
<!-- android:layout_alignParentTop="true" -->
<!-- android:id="@+id/icon"/> -->
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</ScrollView>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fragment_list_contianer"
>
</LinearLayout>

View File

@@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- buttons -->
<include
android:id="@+id/buttons"
layout="@layout/ringer_info_button_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"/>
<com.TwentyCodes.android.LocationRinger.ui.ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:id="@+id/scrollview"
android:layout_above="@id/buttons"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<!-- Location Options -->
<include android:id="@+id/map_info"
layout="@layout/map_info"
android:layout_width="match_parent"
android:layout_height="350dip"
android:layout_alignParentBottom="true"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"/>
</RelativeLayout>
</com.TwentyCodes.android.LocationRinger.ui.ScrollView>
</RelativeLayout>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />

View File

@@ -1,27 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:gravity="center_vertical"
android:id="@+id/ringer_enabled_checkbox"
android:focusable="false"
/>
<TextView
android:id="@id/android:id/text1"
android:layout_toRightOf="@id/ringer_enabled_checkbox"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:paddingLeft="6dip"
android:paddingRight="6dip"
/>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<CheckBox
android:id="@+id/ringer_enabled_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:focusable="false"
android:gravity="center_vertical" />
<TextView
android:id="@id/android:id/text1"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:layout_toRightOf="@id/ringer_enabled_checkbox"
android:gravity="center_vertical"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@id/android:id/text2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/android:id/text1"
android:paddingLeft="6dip"
android:paddingRight="6dip" />
</RelativeLayout>

View File

@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="10dip"
android:layout_alignParentTop="true"
android:id="@+id/map_controls">
<TextView
android:text="@string/location_and_radius"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/title_bar"
android:textColor="#FFFFFF"
/>
<ToggleButton
android:id="@+id/map_edit_toggle"
android:textOn="@string/editing_location"
android:textOff="@string/edit_location"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView
android:text="@string/radius"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/radius"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"/>
</LinearLayout>
<!--
ricky beta release 0rKmsWMM0D-IRAEgcSZEqwZCs_8AUwxjYjj0bnA
ricky 0rKmsWMM0D-KC9KXr1WbA5aEb-2ozQ0SHTvV46g
TWENTYCODES 0rKmsWMM0D-K15bEM_kwabPbNhsn4dp4rcq2q5Q
-->
<com.TwentyCodes.android.location.MapView
android:id="@+id/mapview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:apiKey="0rKmsWMM0D-KC9KXr1WbA5aEb-2ozQ0SHTvV46g"
android:layout_alignParentBottom="true"
android:layout_below="@id/map_controls"
/>
</RelativeLayout>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/map_controls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginBottom="10dip"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/title_bar"
android:text="@string/location_and_radius"
android:textColor="#FFFFFF" />
<ToggleButton
android:id="@+id/map_edit_toggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textOff="@string/edit_location"
android:textOn="@string/editing_location" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/radius" />
<SeekBar
android:id="@+id/radius"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip" />
</LinearLayout>
<include
android:id="@+id/buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
layout="@layout/ringer_info_button_bar"
android:visibility="gone" />
<fragment
android:id="@+id/mapview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/buttons"
android:layout_below="@id/map_controls"
class="com.TwentyCodes.android.fragments.SkyHoookUserOverlayMapFragment" >
</fragment>
</RelativeLayout>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="@string/music_volume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:drawable/title_bar"
android:textColor="#FFFFFF"
android:layout_marginTop="10dip"/>
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/music_volume"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"/>
</LinearLayout>

View File

@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="@string/notification_ringtone_options"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/title_bar"
android:textColor="#FFFFFF"
android:layout_marginTop="10dip"/>
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="0,1">
<TableRow >
<ToggleButton
android:id="@+id/notification_silent_toggle"
android:textOn="@string/silent_enabled"
android:textOff="@string/silent_disabled"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
<Button
android:id="@+id/notification_ringtone_button"
android:text="@string/select_tone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</TableRow>
</TableLayout>
<EditText
android:id="@+id/notification_ringtone"
android:editable="false"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:cursorVisible="false"/>
<TextView
android:text="@string/volume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/notification_ringtone_volume"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"/>
</LinearLayout>

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ToggleButton
android:layout_height="wrap_content"
android:id="@+id/ringer_enabled"
android:textOn="@string/enable"
android:textOff="@string/disable"
android:layout_width="match_parent"
/>
<TextView
android:text="@string/ringer_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/title_bar"
android:textColor="#FFFFFF"
android:layout_marginTop="10dip"/>
<view class="com.TwentyCodes.android.LocationRinger.ui.fragments.AboutRingerFragment$ListeningEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/ringer_name"
android:capitalize="words"
/>
<TextView
android:text="@string/ringer_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/title_bar"
android:textColor="#FFFFFF"
android:layout_marginTop="10dip"/>
<view class="com.TwentyCodes.android.LocationRinger.ui.fragments.AboutRingerFragment$ListeningEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/ringer_description"
android:inputType="textMultiLine"
android:capitalize="sentences"/>
</LinearLayout>

View File

@@ -4,15 +4,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:background="@android:drawable/ic_menu_add"
android:id="@+id/add_feature_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dip"
/>
><Button
android:id="@+id/add_feature_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dip"
android:background="@android:drawable/ic_menu_add" />
<Button
android:background="@android:drawable/ic_menu_save"
@@ -27,7 +24,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:visibility="gone"
/>
<Button
@@ -37,7 +33,6 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="20dip"
android:visibility="gone"
/>
<Button
@@ -47,7 +42,6 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="20dip"
android:visibility="gone"
/>
<Button
@@ -57,6 +51,5 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="20dip"
android:visibility="gone"
/>
</LinearLayout>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/ringerinfpager">
</android.support.v4.view.ViewPager>
</LinearLayout>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2011 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<com.jakewharton.android.viewpagerindicator.TitlePageIndicator
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dip" />
<com.TwentyCodes.android.LocationRinger.ui.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>

View File

@@ -1,35 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:background="@android:drawable/ic_menu_add"
android:id="@+id/add_ringer_button"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
/>
<ListView
android:layout_above="@id/add_ringer_button"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/ringer_list"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/add_ringer_button"
android:textColor="#ffffff"
android:text="@string/add_a_ringer"
android:layout_centerHorizontal="true"
android:id="@+id/add_ringer_button_hint"
android:background="#000000"
android:gravity="center"
/>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/add_ringer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@android:drawable/ic_menu_add" />
<ListView
android:id="@+id/ringer_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/add_ringer_button" />
<TextView
android:id="@+id/add_ringer_button_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/add_ringer_button"
android:layout_centerHorizontal="true"
android:background="#000000"
android:gravity="center"
android:text="@string/add_a_ringer"
android:textColor="#ffffff" />
</RelativeLayout>

View File

@@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="@string/ringtone_options"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="@android:drawable/title_bar"
android:textColor="#FFFFFF"
android:layout_marginTop="10dip"/>
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="0,1">
<TableRow >
<ToggleButton
android:id="@+id/ringtone_silent_toggle"
android:textOn="@string/silent_enabled"
android:textOff="@string/silent_disabled"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
<Button
android:id="@+id/ringtone_button"
android:text="@string/select_tone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</TableRow>
</TableLayout>
<EditText
android:id="@+id/ringtone"
android:editable="false"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:cursorVisible="false"/>
<TextView
android:text="@string/volume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/ringtone_volume"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"/>
</LinearLayout>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@android:drawable/title_bar"
android:text="@string/ringtone_options"
android:textColor="#FFFFFF" />
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ToggleButton
android:id="@+id/ringtone_silent_toggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:textOff="@string/silent_disabled"
android:textOn="@string/silent_enabled" />
<Button
android:id="@+id/ringtone_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/select_tone" />
</LinearLayout>
<EditText
android:id="@+id/ringtone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cursorVisible="false"
android:editable="false" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/volume" />
<SeekBar
android:id="@+id/ringtone_volume"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip" />
</LinearLayout>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@android:drawable/title_bar"
android:text="@string/ringtone_options"
android:textColor="#FFFFFF" />
<ToggleButton
android:id="@+id/toggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textOff="@string/disable"
android:textOn="@string/enable" />
</LinearLayout>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="@string/update_interval"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:drawable/title_bar"
android:textColor="#FFFFFF"
android:layout_marginTop="10dip"/>
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/update_interval"
android:entries="@array/runtime_string"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"/>
</LinearLayout>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@android:drawable/title_bar"
android:text="@string/update_interval"
android:textColor="#FFFFFF" />
<Spinner
android:id="@+id/update_interval"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:entries="@array/runtime_string" />
</LinearLayout>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/volume_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@android:drawable/title_bar"
android:text="@string/volume"
android:textColor="#FFFFFF" />
<SeekBar
android:id="@+id/volume"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip" />
</LinearLayout>

View File

@@ -1,164 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<include
android:id="@+id/buttons"
layout="@layout/ringer_info_button_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/buttons"
>
<com.TwentyCodes.android.LocationRinger.ui.ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:id="@+id/scrollview"
>
<LinearLayout
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ringer_options"
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Ringer Options -->
<ToggleButton
android:textOn="@string/enable"
android:textOff="@string/disable"
android:id="@+id/ringer_toggle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/ringer_name"
android:hint="@string/ringer_name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:id="@+id/info"
android:layout_below="@id/ringer_options"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="10dip"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip">
<!-- Ringtone -->
<include android:id="@+id/ringtone_info"
layout="@layout/ringtone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<!-- Notification Ringtone -->
<include android:id="@+id/notification_ringtone_info"
layout="@layout/notification_ringtone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<!-- Media Volume -->
<include android:id="@+id/music_volume_info"
layout="@layout/music_volume"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<!-- Alarm Volume -->
<include android:id="@+id/alarm_volume_info"
layout="@layout/alarm_volume"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<!-- data options -->
<TextView
android:id="@+id/data_label"
android:text="@string/data"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/title_bar"
android:textColor="#FFFFFF"
android:layout_marginTop="10dip"
android:visibility="gone"
/>
<ToggleButton
android:id="@+id/wifi_toggle"
android:textOn="@string/wifi_enabled"
android:textOff="@string/wifi_disabled"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
/>
<ToggleButton
android:id="@+id/bluetooth_toggle"
android:textOn="@string/bt_enabled"
android:textOff="@string/bt_disabled"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
/>
<!-- Update Interval -->
<include android:id="@+id/update_interval_info"
layout="@layout/update_interval"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
/>
</LinearLayout>
</LinearLayout>
</com.TwentyCodes.android.LocationRinger.ui.ScrollView>
</RelativeLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/buttons"
android:textColor="#ffffff"
android:text="@string/add_a_feature"
android:layout_centerHorizontal="true"
android:id="@+id/add_a_feature_label"
android:background="#000000"
android:gravity="center"
/>
</RelativeLayout>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 Patrik Åkerfeldt
Copyright (C) 2011 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<declare-styleable name="ViewPagerIndicator">
<attr name="circlePageIndicatorStyle" format="reference"/>
<attr name="titlePageIndicatorStyle" format="reference"/>
</declare-styleable>
<declare-styleable name="CirclePageIndicator">
<attr name="centered" format="boolean" />
<attr name="fillColor" format="color" />
<attr name="radius" format="dimension" />
<attr name="snap" format="boolean" />
<attr name="strokeColor" format="color" />
</declare-styleable>
<declare-styleable name="TitlePageIndicator">
<attr name="clipPadding" format="dimension" />
<attr name="footerColor" format="color" />
<attr name="footerLineHeight" format="dimension" />
<attr name="footerIndicatorStyle">
<enum name="none" value="0" />
<enum name="triangle" value="1" />
<enum name="underline" value="2" />
</attr>
<attr name="footerIndicatorHeight" format="dimension" />
<attr name="footerIndicatorPadding" format="dimension" />
<attr name="footerIndicatorUnderlinePadding" format="dimension" />
<attr name="selectedColor" format="color" />
<attr name="selectedBold" format="boolean" />
<attr name="textColor" format="color" />
<attr name="textSize" format="dimension" />
<attr name="titlePadding" format="dimension" />
</declare-styleable>
</resources>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<bool name="default_circle_indicator_centered">true</bool>
<color name="default_circle_indicator_fill_color">#FFFFFFFF</color>
<dimen name="default_circle_indicator_radius">3dp</dimen>
<bool name="default_circle_indicator_snap">false</bool>
<color name="default_circle_indicator_stroke_color">#FFDDDDDD</color>
<dimen name="default_title_indicator_clip_padding">0dp</dimen>
<color name="default_title_indicator_footer_color">#FF6899FF</color>
<dimen name="default_title_indicator_footer_line_height">1px</dimen>
<integer name="default_title_indicator_footer_indicator_style">1</integer>
<dimen name="default_title_indicator_footer_indicator_height">7dp</dimen>
<dimen name="default_title_indicator_footer_indicator_padding">5dp</dimen>
<dimen name="default_title_indicator_footer_indicator_underline_padding">10dp</dimen>
<color name="default_title_indicator_selected_color">#FFFFFFFF</color>
<bool name="default_title_indicator_selected_bold">true</bool>
<color name="default_title_indicator_text_color">#FFAAAAAA</color>
<dimen name="default_title_indicator_text_size">18dp</dimen>
<dimen name="default_title_indicator_title_padding">5dp</dimen>
</resources>

View File

@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Location Ringer allows you to create location based ringer profiles called Ringers. Ringers allow you to have your phone automatically change basic settings based on where you are. For example you can have your phone automatically become silent when you go to work, or automatically enable your wireless when you get home.\n\nTo Start simply set your default settings in the Default Ringer, and create new ringers as they are needed.\n\nThe Default Ringer is applied when there are no applicable Ringers for your current location.</string>
<string name="app_name">Location Ringer beta</string>
<string name="silent_enabled">Silent Enabled</string>
<string name="silent_disabled">Silent Disabled</string>
<string name="edit_location">Edit Location</string>
<string name="editing_location">Editing Location</string>
<string name="ringer_options">Ringer Options</string>
<string name="enable">Enabled</string>
<string name="disable">Disabled</string>
@@ -34,8 +33,6 @@
<string name="ignore_location_about">Ignore location when the reported accuracy is greater than the selected amount</string>
<string name="address">Address</string>
<string name="search">Search</string>
<string name="ringer_name">Ringer Name</string>
<string name="new_ringer">New Ringer</string>
<string name="backup">Backup</string>
<string name="restore">Restore</string>
<string name="start_service">Start Service</string>
@@ -55,22 +52,19 @@
<string name="version_info">Version Information</string>
<string name="start_on_boot">Start on boot</string>
<string name="start_on_boot_about">Enable Location Ringer to start on boot</string>
<string name="saving">Saving...</string>
<string name="loading">Loading...</string>
<string name="upgrading">Upgrading database...</string>
<string name="deleteing">Deleting ringer...</string>
<string name="gathering">Gathering Location...</string>
<string name="saving">Saving</string>
<string name="loading">Loading</string>
<string name="upgrading">Upgrading database</string>
<string name="deleteing">Deleting ringer</string>
<string name="gathering">Gathering Location</string>
<string name="welcome">Welcome</string>
<string name="registered">Registered with Skyhook</string>
<string name="skyhook_error_registration">There was an error registering with Skyhook, please try again when you have an Internet connection.</string>
<string name="add_feature">Add Feature</string>
<string name="update_interval">Update Interval</string>
<string name="ringtone">Ringtone</string>
<string name="notification_ringtone">Notification Ringtone</string>
<string name="wifi">Wifi</string>
<string name="bluetooth">Bluetooth</string>
<string name="music_volume">Music Volume</string>
<string name="alarm_volume">Alarm Volume</string>
<string name="radius">Radius</string>
<string name="select_tone">Select Tone</string>
<string name="add_a_feature">Click the plus to add a feature</string>
@@ -80,4 +74,18 @@
<string name="restore_about">Restores your ringers and settings from exteranal storage</string>
<string name="default_save_hint">This is the first time you edited your Default ringer. When you are done editing please click save to save.</string>
<string name="default_hint">Click Default to edit your default ringer.</string>
</resources>
<string name="how">How</string>
<string name="what">What</string>
<string name="notification_volume">Notification Volume</string>
<string name="call_volume">Call Volume</string>
<string name="system_volume">System Volume</string>
<string name="ringtone_volume">Ringtone Volume</string>
<string name="dtmf_volume">DTMF Volume</string>
<string name="ringer_description">Ringer Description</string>
<string name="silent">Silent</string>
<string name="location">Location</string>
<string name="about_default_ringer">This Ringer is applied when there is no applicable ringers</string>
<string name="delete">Delete</string>
<string name="ringer_name">Ringer Name</string>
</resources>

View File

@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<style name="StyledIndicators" parent="@android:style/Theme.Light">
<item name="circlePageIndicatorStyle">@style/CustomCirclePageIndicator</item>
<item name="titlePageIndicatorStyle">@style/CustomTitlePageIndicator</item>
</style>
<style name="CustomTitlePageIndicator">
<item name="android:background">#FFDDDDDD</item>
<item name="footerColor">#FFEE3333</item>
<item name="footerLineHeight">2dp</item>
<item name="footerIndicatorStyle">none</item>
<item name="textColor">#FF999999</item>
<item name="selectedColor">#FF000000</item>
<item name="selectedBold">false</item>
</style>
<style name="CustomCirclePageIndicator">
<item name="android:background">#FFCCCCCC</item>
<item name="fillColor">#FF888888</item>
<item name="strokeColor">#FF000000</item>
<item name="radius">10dp</item>
<item name="centered">true</item>
</style>
<!--
Copyright (C) 2011 Jake Wharton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-->
<style name="Theme.PageIndicatorDefaults" parent="@android:style/Theme">
<item name="circlePageIndicatorStyle">@style/Widget.CirclePageIndicator</item>
<item name="titlePageIndicatorStyle">@style/Widget.TitlePageIndicator</item>
</style>
<style name="Widget.CirclePageIndicator" parent="@android:style/Widget">
<item name="centered">@bool/default_circle_indicator_centered</item>
<item name="fillColor">@color/default_circle_indicator_fill_color</item>
<item name="radius">@dimen/default_circle_indicator_radius</item>
<item name="snap">@bool/default_circle_indicator_snap</item>
<item name="strokeColor">@color/default_circle_indicator_stroke_color</item>
</style>
<style name="Widget.TitlePageIndicator" parent="@android:style/Widget">
<item name="clipPadding">@dimen/default_title_indicator_clip_padding</item>
<item name="footerColor">@color/default_title_indicator_footer_color</item>
<item name="footerLineHeight">@dimen/default_title_indicator_footer_line_height</item>
<item name="footerIndicatorStyle">
@integer/default_title_indicator_footer_indicator_style
</item>
<item name="footerIndicatorHeight">
@dimen/default_title_indicator_footer_indicator_height
</item>
<item name="footerIndicatorPadding">
@dimen/default_title_indicator_footer_indicator_padding
</item>
<item name="footerIndicatorUnderlinePadding">
@dimen/default_title_indicator_footer_indicator_underline_padding
</item>
<item name="selectedColor">@color/default_title_indicator_selected_color</item>
<item name="selectedBold">@bool/default_title_indicator_selected_bold</item>
<item name="textColor">@color/default_title_indicator_text_color</item>
<item name="textSize">@dimen/default_title_indicator_text_size</item>
<item name="titlePadding">@dimen/default_title_indicator_title_padding</item>
</style>
</resources>

View File

@@ -1,35 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<ListPreference android:key="update_interval"
android:title="@string/update_interval" android:entryValues="@array/runtimes"
android:entries="@array/runtime_string" />
<ListPreference
android:entries="@array/runtime_string"
android:entryValues="@array/runtimes"
android:key="update_interval"
android:title="@string/update_interval" />
<ListPreference
android:entries="@array/accuracy_strings"
android:entryValues="@array/accuracy"
android:key="accuracy"
android:summary="@string/accuracy_about"
android:title="@string/accuracy" >
</ListPreference>
<ListPreference
android:entries="@array/ignore_strings"
android:entryValues="@array/ignore"
android:key="ignore_location"
android:summary="@string/ignore_location_about"
android:title="@string/ignore_location" >
</ListPreference>
<ListPreference android:entryValues="@array/accuracy"
android:entries="@array/accuracy_strings" android:title="@string/accuracy"
android:key="accuracy" android:summary="@string/accuracy_about"></ListPreference>
<ListPreference android:entryValues="@array/ignore"
android:entries="@array/ignore_strings" android:key="ignore_location"
android:title="@string/ignore_location" android:summary="@string/ignore_location_about"></ListPreference>
<CheckBoxPreference android:key="toasty"
android:title="@string/toasty" android:summary="@string/toasty_about" android:defaultValue="false"></CheckBoxPreference>
<CheckBoxPreference android:key="start_on_boot"
android:title="@string/start_on_boot" android:summary="@string/start_on_boot_about"
android:defaultValue="false"></CheckBoxPreference>
<PreferenceScreen android:title="@string/about">
<com.TwentyCodes.android.LocationRinger.ui.TextViewPreference android:title="@string/hello"/>
</PreferenceScreen>
<PreferenceCategory android:title="@string/contact_us">
<Preference android:key="email" android:summary="@string/email_about"
android:title="@string/email"></Preference>
<CheckBoxPreference
android:defaultValue="false"
android:key="toasty"
android:summary="@string/toasty_about"
android:title="@string/toasty" >
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue="false"
android:key="start_on_boot"
android:summary="@string/start_on_boot_about"
android:title="@string/start_on_boot" >
</CheckBoxPreference>
</PreferenceCategory><PreferenceCategory android:title="@string/version_info">
<com.TwentyCodes.android.LocationRinger.ui.VersionInformationPreference />
</PreferenceCategory>
<PreferenceScreen android:title="@string/about" >
<com.TwentyCodes.android.LocationRinger.ui.TextViewPreference android:title="@string/hello" />
</PreferenceScreen>
<PreferenceCategory android:title="@string/contact_us" >
<Preference
android:key="email"
android:summary="@string/email_about"
android:title="@string/email" >
</Preference>
</PreferenceCategory>
<PreferenceCategory android:title="@string/version_info" >
<com.TwentyCodes.android.exception.VersionInformationPreference />
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -0,0 +1,17 @@
/**
* enableScrollingListener.java
* @date Aug 13, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger;
/**
* A simple listener to allow fragments to set scrolling enabled
* @author ricky
*/
public interface EnableScrollingListener {
public void setScrollEnabled(boolean enabled);
}

View File

@@ -1,18 +0,0 @@
/**
* LocatoinSelectedListener.java
* @date May 9, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger;
import com.google.android.maps.GeoPoint;
/**
* This interface will be used to pass the selected location from the dialogs to the listening instance
* @author ricky barrette
*/
public interface LocationSelectedListener {
public void onLocationSelected(GeoPoint point);
}

View File

@@ -0,0 +1,22 @@
/**
* onContentChangedListener.java
* @date Aug 7, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger;
import android.content.ContentValues;
/**
* This interface will be used to pass the content updated in fragments down to the main FragmentActivity
* @author ricky
*/
public interface OnContentChangedListener {
void onRingerContentChanged(ContentValues ringer);
void onInfoContentChanged(ContentValues info);
}

View File

@@ -41,7 +41,6 @@ public class RingerDatabase {
private Context mContext;
private SQLiteDatabase mDb;
public boolean isUpgrading = false;
private static final String RINGER_INFO_TABLE = "ringer_info";
private DatabaseListener mListener;
/*
@@ -54,6 +53,7 @@ public class RingerDatabase {
*/
private final String DATABASE_NAME = "ringers.db";
private final String RINGER_TABLE = "ringers";
private static final String RINGER_INFO_TABLE = "ringer_info";
/*
* Database keys
@@ -79,6 +79,10 @@ public class RingerDatabase {
public static final String KEY = "key";
public static final String KEY_UPDATE_INTERVAL = "update_interval";
public static final String KEY_PLUS_BUTTON_HINT = "plus_button_hint";
public static final String KEY_DTMF_VOLUME = "dtmf_volume";
public static final String KEY_SYSTEM_VOLUME = "system_volume";
public static final String KEY_CALL_VOLUME = "call_volume";
public static final String KEY_RINGER_DESCRIPTION = "ringer_description";
/**
@@ -424,6 +428,20 @@ private class OpenHelper extends SQLiteOpenHelper {
return list;
}
/**
* returns all ringer descriptions in the database, where or not if they are enabled
* @return list of all strings in the database table
* @author ricky barrette
*/
public List<String> getAllRingerDescriptions() {
List<String> list = new ArrayList<String>();
List<String> ringers = getAllRingerTitles();
for(String ringer: ringers){
list.add(getRingerInfo(ringer).getAsString(KEY_RINGER_DESCRIPTION));
}
return list;
}
/**
* gets a ringer from a row id;
* @param id

View File

@@ -69,7 +69,7 @@ public class LocationService extends SkyHookService {
*/
private void startOnGoingNotification() {
this.mNotificationManager = (NotificationManager) this.getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);
Notification notifyDetails = new Notification(R.drawable.newstatusbar_icon, this.getString(R.string.app_name), System.currentTimeMillis());
Notification notifyDetails = new Notification(R.drawable.icon, this.getString(R.string.app_name), System.currentTimeMillis());
PendingIntent intent = PendingIntent.getActivity(this, 0, new Intent(this, LocationRinger.class), android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
notifyDetails.setLatestEventInfo(this, this.getString(R.string.app_name), this.getString(R.string.gathering), intent);
notifyDetails.flags |= Notification.FLAG_ONGOING_EVENT;

View File

@@ -1,375 +0,0 @@
/**
* RingerInformationHowActivity.java
* @date Jul 29, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui;
import android.app.ProgressDialog;
import android.content.ContentValues;
import android.content.Intent;
import android.os.Bundle;
import android.os.Looper;
import android.util.Log;
import android.util.TypedValue;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.view.WindowManager;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.Toast;
import android.widget.ToggleButton;
import com.TwentyCodes.android.LocationRinger.LocationSelectedListener;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.db.RingerDatabase;
import com.TwentyCodes.android.LocationRinger.debug.Debug;
import com.TwentyCodes.android.SkyHook.SkyHook;
import com.TwentyCodes.android.location.GeoPointLocationListener;
import com.TwentyCodes.android.location.MapView;
import com.google.android.maps.GeoPoint;
/**
* This activity will allow users to pick how a ringer works. Using this activity they will pick triggers for this ringer
* @author ricky
*/
public class HowActivity extends com.google.android.maps.MapActivity implements LocationSelectedListener, GeoPointLocationListener, OnClickListener, OnCheckedChangeListener, OnSeekBarChangeListener {
private static final String TAG = "RingerInformationHowActivity";
private static final int ADD_ID = 1;
private static final int WHAT_REQUEST_CODE = 467468436;
private SeekBar mRadius;
private MapView mMapView;
private ToggleButton mMapEditToggle;
private RadiusOverlay mRadiusOverlay;
private GeoPoint mPoint;
private SkyHook mSkyHook;
private ProgressDialog mGpsProgress;
private boolean isFirstFix;
private ScrollView mScrollView;
@Override
protected boolean isRouteDisplayed() {
//UNUSED
return false;
}
/**
* Called when the HOW activity finishes, this will just pass the results back to the ringer list activity
*/
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(resultCode == RESULT_OK){
this.setResult(RESULT_OK, data);
this.finish();
}
//don show for default
if(this.getIntent().getBooleanExtra(ListActivity.KEY_IS_DEFAULT, false))
this.finish();
}
/**
* Called when a toggle button's state is changed
* @author ricky barrette
*/
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
switch(buttonView.getId()){
case R.id.map_edit_toggle:
this.isFirstFix = isChecked;
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,
isChecked
? (this.getResources().getDisplayMetrics().heightPixels - findViewById(R.id.map_controls).getHeight())
: (int) (TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 350, getResources().getDisplayMetrics())));
if(isChecked){
this.mSkyHook.getUpdates();
params.addRule(RelativeLayout.ALIGN_PARENT_TOP );
this.mGpsProgress = ProgressDialog.show(this, "", this.getText(R.string.gps_fix), true, true);
} else {
this.mSkyHook.removeUpdates();
params.addRule(RelativeLayout.BELOW, R.id.info);
params.addRule(RelativeLayout.ALIGN_BOTTOM );
if(this.mGpsProgress != null)
this.mGpsProgress.dismiss();
}
findViewById(R.id.map_info).setLayoutParams(params );
this.mMapView.setDoubleTapZoonEnabled(isChecked);
//buttons
findViewById(R.id.mark_my_location).setVisibility(isChecked ? View.VISIBLE : View.GONE);
findViewById(R.id.my_location).setVisibility(isChecked ? View.VISIBLE : View.GONE);
findViewById(R.id.map_mode).setVisibility(isChecked ? View.VISIBLE : View.GONE);
findViewById(R.id.search).setVisibility(isChecked ? View.VISIBLE : View.GONE);
findViewById(R.id.add_feature_button).setVisibility(isChecked ? View.GONE : View.VISIBLE);
this.mScrollView.invalidate();
this.mScrollView.setScrollEnabled(! isChecked);
this.mMapView.setBuiltInZoomControls(isChecked);
this.mMapView.setClickable(isChecked);
this.mRadius.setEnabled(isChecked);
Toast.makeText(this, isChecked ? getString(R.string.map_editing_enabled) : getString(R.string.map_editiing_disabled), Toast.LENGTH_SHORT).show();
break;
}
}
/**
* Called when a view is clicked
* @author ricky barrette
*/
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.mark_my_location:
if(this.mPoint != null){
this.mRadiusOverlay.setLocation(mPoint);
this.mMapView.getController().setCenter(mPoint);
}
break;
case R.id.my_location:
if(this.mPoint != null)
this.mMapView.getController().setCenter(mPoint);
break;
case R.id.map_mode:
this.mMapView.setSatellite(mMapView.isSatellite() ? false : true);
break;
case R.id.search:
new SearchDialog(this, this).show();
break;
case R.id.add_feature_button:
Toast.makeText(this, "NO TRIGGERS YET", Toast.LENGTH_LONG).show();
break;
case R.id.save_ringer_button:
save();
break;
}
}
/**
* Called when the acivity is first created
* @author ricky barrette
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.how);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
this.mSkyHook = new SkyHook(this);
this.mSkyHook.setLocationListener(this);
this.mScrollView = (ScrollView) findViewById(R.id.scrollview);
this.mMapView = (MapView) findViewById(R.id.mapview);
this.mRadius = (SeekBar) findViewById(R.id.radius);
this.mRadius.setMax(Debug.MAX_RADIUS_IN_METERS);
this.mMapView.setClickable(false);
this.mMapEditToggle = (ToggleButton) findViewById(R.id.map_edit_toggle);
this.mMapEditToggle.setChecked(false);
this.mMapEditToggle.setOnCheckedChangeListener(this);
this.mRadiusOverlay = new RadiusOverlay();
this.mRadius.setOnSeekBarChangeListener(this);
this.mMapView.getOverlays().add(mRadiusOverlay);
this.mRadius.setEnabled(false);
findViewById(R.id.mark_my_location).setOnClickListener(this);
findViewById(R.id.my_location).setOnClickListener(this);
findViewById(R.id.map_mode).setOnClickListener(this);
findViewById(R.id.search).setOnClickListener(this);
findViewById(R.id.save_ringer_button).setOnClickListener(this);
findViewById(R.id.add_feature_button).setOnClickListener(this);
Intent data = this.getIntent();
this.setTitle(getString(R.string.editing)+" "+data.getStringExtra(RingerDatabase.KEY_RINGER_NAME));
if(data.hasExtra(ListActivity.KEY_INFO)){
/*
* We need to null check all the values
*/
ContentValues info = (ContentValues) data.getParcelableExtra(ListActivity.KEY_INFO);
if (info.get(RingerDatabase.KEY_LOCATION_LAT) != null && info.get(RingerDatabase.KEY_LOCATION_LON) != null){
this.mRadiusOverlay.setLocation(new GeoPoint(info.getAsInteger(RingerDatabase.KEY_LOCATION_LAT), info.getAsInteger(RingerDatabase.KEY_LOCATION_LON)));
}
if (info.get(RingerDatabase.KEY_RADIUS) != null){
this.mRadius.setProgress(info.getAsInteger(RingerDatabase.KEY_RADIUS));
}
if(data.getBooleanExtra(ListActivity.KEY_IS_DEFAULT, false)){
this.startActivityForResult(new Intent(this, WhatActivity.class).putExtras(this.getIntent()), WHAT_REQUEST_CODE);
}
} else
this.setTitle(R.string.new_ringer);
if(this.mRadiusOverlay.getLocation() != null){
this.mMapView.getController().setCenter(this.mRadiusOverlay.getLocation());
this.mMapView.getController().setZoom(16);
}
this.mMapView.setDoubleTapZoonEnabled(false);
}
/**
* Creates the main menu that is displayed when the menu button is clicked
* @author ricky barrette
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, ADD_ID, 0, getString(R.string.add_feature)).setIcon(android.R.drawable.ic_menu_add);
return super.onCreateOptionsMenu(menu);
}
/* (non-Javadoc)
* @see com.google.android.maps.MapActivity#onDestroy()
* @author ricky barrette
*/
@Override
protected void onDestroy() {
this.mSkyHook.removeUpdates();
super.onDestroy();
}
/**
* Called when skyhook has a location to report
* @author ricky barrette
*/
@Override
public void onLocationChanged(GeoPoint point, int accuracy) {
this.mPoint = point;
if(point != null){
/*
* if this is the first fix and the radius overlay does not have a point specified
* then pan the map, and zoom in to the users current location
*/
if(this.isFirstFix)
if(this.mRadiusOverlay.getLocation() == null){
if(this.mMapView != null){
this.mMapView.getController().setCenter(point);
this.mMapView.getController().setZoom((this.mMapView.getMaxZoomLevel() - 5));
}
this.isFirstFix = false;
}
/*
* dismiss the acquiring gps dialog
*/
if(this.mGpsProgress != null)
this.mGpsProgress.dismiss();
}
}
/*
*/
@Override
public void onLocationSelected(GeoPoint point) {
if(point != null){
if(Debug.DEBUG)
Log.d(TAG, "onLocationSelected() "+ point.toString());
if(this.mRadiusOverlay != null)
this.mRadiusOverlay.setLocation(point);
if(this.mMapView != null){
this.mMapView.getController().setCenter(point);
this.mMapView.getController().setZoom((this.mMapView.getMaxZoomLevel() - 5));
}
} else if(Debug.DEBUG)
Log.d(TAG, "onLocationSelected() Location was null");
}
/* (non-Javadoc)
* @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem)
* @author ricky barrette
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()){
case ADD_ID:
//TODO display triggers
break;
}
return super.onOptionsItemSelected(item);
}
/**
* Called when a seekbar is has its progress changed
* @author ricky barrette
*/
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()){
case R.id.radius:
this.mRadiusOverlay.setRadius(progress);
this.mMapView.invalidate();
break;
}
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
//UNUSED
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
//UNUSED
}
/**
* Prepares a bundle containing all the information that needs to be saved, and returns it to the starting activity
* @author ricky barrette
*/
private void save() {
final ProgressDialog progress = ProgressDialog.show(this, "", this.getText(R.string.saving), true, true);
//Generate the intent in a thread to prevent anr's and allow for progress dialog
new Thread( new Runnable(){
@Override
public void run(){
Looper.prepare();
Intent data = new Intent(HowActivity.this, WhatActivity.class).putExtras(HowActivity.this.getIntent());
GeoPoint point = HowActivity.this.mRadiusOverlay.getLocation();
ContentValues info = data.getParcelableExtra(ListActivity.KEY_INFO);
if(info == null)
info = new ContentValues();
/*
* package the ringer table information
*/
info.put(RingerDatabase.KEY_LOCATION_LAT, point.getLatitudeE6());
info.put(RingerDatabase.KEY_LOCATION_LON, point.getLongitudeE6());
info.put(RingerDatabase.KEY_RADIUS, HowActivity.this.mRadius.getProgress());
//package the intent
data.putExtra(ListActivity.KEY_INFO, info);
progress.dismiss();
HowActivity.this.startActivityForResult(data, WHAT_REQUEST_CODE);
}
}).start();
}
@Override
public void onFirstFix(boolean isFirstFix) {
// TODO Auto-generated method stub
}
}

View File

@@ -100,7 +100,7 @@ public class ListActivity extends Activity implements OnItemClickListener, OnCli
@Override
public void onClick(View v) {
Intent i = new Intent(this, HowActivity.class);
Intent i = new Intent(this, RingerInformationActivity.class);
startActivityForResult(i, ACTIVITY_CREATE );
}
@@ -227,28 +227,31 @@ public class ListActivity extends Activity implements OnItemClickListener, OnCli
public void run(){
Looper.prepare();
Intent i = new Intent(ListActivity.this, HowActivity.class)
Intent i = new Intent(ListActivity.this, RingerInformationActivity.class)
.putExtra(KEY_ROWID, id+1);
/*
* get the ringer
*/
Cursor ringer = mDb.getRingerFromId(id+1);
if (ringer.moveToFirst())
i.putExtra(RingerDatabase.KEY_RINGER_NAME, ringer.getString(0))
.putExtra(RingerDatabase.KEY_IS_ENABLED, RingerDatabase.parseBoolean(ringer.getString(1)));
if (ringer.moveToFirst()){
ContentValues r = new ContentValues();
r.put(RingerDatabase.KEY_RINGER_NAME, ringer.getString(0));
r.put(RingerDatabase.KEY_IS_ENABLED, RingerDatabase.parseBoolean(ringer.getString(1)));
i.putExtra(KEY_RINGER, r);
if (ringer != null && !ringer.isClosed()) {
ringer.close();
}
if(id == 0)
i.putExtra(KEY_IS_DEFAULT, true);
/*
* get the ringer's info, and parse it into content values
*/
i.putExtra(KEY_INFO, mDb.getRingerInfo(i.getStringExtra(RingerDatabase.KEY_RINGER_NAME)));
if (ringer != null && !ringer.isClosed()) {
ringer.close();
}
if(id == 0)
i.putExtra(KEY_IS_DEFAULT, true);
/*
* get the ringer's info, and parse it into content values
*/
i.putExtra(KEY_INFO, mDb.getRingerInfo(r.getAsString(RingerDatabase.KEY_RINGER_NAME)));
}
progress.dismiss();
@@ -269,7 +272,7 @@ public class ListActivity extends Activity implements OnItemClickListener, OnCli
public boolean onOptionsItemSelected (MenuItem item) {
switch (item.getItemId()){
case NEW_RINGER:
Intent i = new Intent(this, WhatActivity.class);
Intent i = new Intent(this, RingerInformationActivity.class);
startActivityForResult(i, ACTIVITY_CREATE );
return true;

View File

@@ -1,150 +0,0 @@
/**
* @author Twenty Codes
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Point;
import android.graphics.RectF;
import com.TwentyCodes.android.location.GeoUtils;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;
import com.google.android.maps.Projection;
/**
* This class will used to draw a radius of a specified size in a specified location, then inserted into
* an overlay list to be displayed a map
* @author ricky barrette
*/
public class RadiusOverlay extends Overlay{
public OverlayItem mOverlayItem;
private GeoPoint mPoint;
private float mRadius = 0;
private int mColor = Color.GREEN;
private GeoPoint mRadiusPoint;
/**
* Creates a new RadiusOverlay
* @author ricky barrette
*/
public RadiusOverlay(){
}
/**
* Creates a new RadiusOverlay object that can be inserted into an overlay list.
* @param point center of radius geopoint
* @param radius radius in meters
* @param color desired color of the radius from Color API
* @author ricky barrette
*/
public RadiusOverlay(GeoPoint point, float radius, int color) {
mPoint = point;
mRadius = radius;
mColor = color;
}
/**
* draws a specific radius on the mapview that is handed to it
* @param canvas canvas to be drawn on
* @param mapView
* @param shadow
* @param when
*/
@Override
public void draw(Canvas canvas, MapView mapView, boolean shadow){
if(mPoint != null){
Paint paint = new Paint();
Point center = new Point();
Point left = new Point();
Projection projection = mapView.getProjection();
/*
* Calculate a geopoint that is "radius" meters away from geopoint point and
* convert the given GeoPoint and leftGeo to onscreen pixel coordinates,
* relative to the top-left of the MapView that provided this Projection.
*/
mRadiusPoint = GeoUtils.distanceFrom(mPoint , mRadius);
projection.toPixels(mRadiusPoint, left);
projection.toPixels(mPoint, center);
/*
* get radius of the circle being drawn by
*/
int circleRadius = center.x - left.x;
if(circleRadius <= 0){
circleRadius = left.x - center.x;
}
/*
* paint a circle on the map
*/
paint.setAntiAlias(true);
paint.setStrokeWidth(2.0f);
paint.setColor(mColor);
paint.setStyle(Style.STROKE);
canvas.drawCircle(center.x, center.y, circleRadius, paint);
//draw a dot over the geopoint
RectF oval = new RectF(center.x - 2, center.y - 2, center.x + 2, center.y + 2);
canvas.drawOval(oval, paint);
//fill the radius with a nice green
paint.setAlpha(25);
paint.setStyle(Style.FILL);
canvas.drawCircle(center.x, center.y, circleRadius, paint);
}
}
/**
* @return the selected location
* @author ricky barrette
*/
public GeoPoint getLocation(){
return mPoint;
}
@Override
public boolean onTap(GeoPoint p, MapView mapView) {
mPoint = p;
return super.onTap(p, mapView);
}
/**
* @param color
* @author ricky barrette
*/
public void setColor(int color){
mColor = color;
}
/**
* @param location
* @author ricky barrette
*/
public void setLocation(GeoPoint location){
mPoint = location;
}
/**
* @param radius in meters
* @author ricky barrette
* @param radius
*/
public void setRadius(int radius){
mRadius = radius;
}
public int getZoomLevel() {
// GeoUtils.GeoUtils.distanceFrom(mPoint , mRadius)
return 0;
}
}

View File

@@ -0,0 +1,213 @@
/**
* RingerInformationActivity.java
* @date Aug 6, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui;
import java.util.ArrayList;
import java.util.Map.Entry;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.ContentValues;
import android.content.Intent;
import android.media.AudioManager;
import android.os.Bundle;
import android.os.Looper;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import com.TwentyCodes.android.LocationRinger.EnableScrollingListener;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.OnContentChangedListener;
import com.TwentyCodes.android.LocationRinger.db.RingerDatabase;
import com.TwentyCodes.android.LocationRinger.debug.Debug;
import com.TwentyCodes.android.LocationRinger.ui.fragments.AboutRingerFragment;
import com.TwentyCodes.android.LocationRinger.ui.fragments.FeatureListFragment;
import com.TwentyCodes.android.LocationRinger.ui.fragments.MapFragment;
import com.TwentyCodes.android.LocationRinger.ui.fragments.RingtoneFragment;
import com.TwentyCodes.android.LocationRinger.ui.fragments.ToggleButtonFragment;
import com.TwentyCodes.android.LocationRinger.ui.fragments.VolumeFragment;
import com.jakewharton.android.viewpagerindicator.TitlePageIndicator;
import com.jakewharton.android.viewpagerindicator.TitledFragmentAdapter;
/**
* This activity will handle displaying ringer options
* @author ricky
*/
public class RingerInformationActivity extends FragmentActivity implements OnContentChangedListener, EnableScrollingListener{
private static final int SAVE_ID = 0;
private static final String TAG = "RingerInformationActivity";
private ContentValues mRinger;
private ContentValues mInfo;
private Intent mData;
private ViewPager mPager;
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
setContentView(R.layout.ringer_information_activity);
this.mData = new Intent().putExtras(RingerInformationActivity.this.getIntent());
this.mRinger = this.mData.getParcelableExtra(ListActivity.KEY_RINGER);
this.mInfo = this.mData.getParcelableExtra(ListActivity.KEY_INFO);
if(this.mRinger == null)
this.mRinger = new ContentValues();
if(this.mInfo == null)
this.mInfo = new ContentValues();
/*
* set the title
*/
if(this.mRinger.containsKey(RingerDatabase.KEY_RINGER_NAME))
this.setTitle(this.getString(R.string.editing)+" "+this.mRinger.getAsString(RingerDatabase.KEY_RINGER_NAME));
else
this.setTitle(R.string.new_ringer);
/*
* Page titles
*/
String[] titles = new String[]{
this.getString(R.string.about),
this.getString(R.string.location),
this.getString(R.string.what)
};
ArrayList<Fragment> fragments = new ArrayList<Fragment>();
/*
* about page
*/
fragments.add(new AboutRingerFragment(this.mRinger, this.mInfo, this));
/*
* Location page
*/
fragments.add(new MapFragment(this.mInfo, this, this));
/*
* What page
* ONLY Dynamically add the required fragments that have already been added.
*
* TODO
* update interval
*/
ArrayList<Fragment> what = new ArrayList<Fragment>();
// if(this.mInfo.containsKey(RingerDatabase.KEY_RINGTONE) || this.mInfo.containsKey(RingerDatabase.KEY_RINGTONE_IS_SILENT) || this.mInfo.containsKey(RingerDatabase.KEY_RINGTONE_VOLUME))
what.add(new RingtoneFragment(this.mInfo, this, AudioManager.STREAM_RING));
// if(this.mInfo.containsKey(RingerDatabase.KEY_NOTIFICATION_RINGTONE) || this.mInfo.containsKey(RingerDatabase.KEY_NOTIFICATION_IS_SILENT) || this.mInfo.containsKey(RingerDatabase.KEY_NOTIFICATION_RINGTONE_VOLUME))
what.add(new RingtoneFragment(this.mInfo, this, AudioManager.STREAM_NOTIFICATION));
// if(this.mInfo.containsKey(RingerDatabase.KEY_ALARM_VOLUME))
what.add(new VolumeFragment(this.mInfo, this, this, AudioManager.STREAM_ALARM));
// if(this.mInfo.containsKey(RingerDatabase.KEY_MUSIC_VOLUME))
what.add(new VolumeFragment(this.mInfo, this, this, AudioManager.STREAM_MUSIC));
// if(this.mInfo.containsKey(RingerDatabase.KEY_WIFI))
what.add(new ToggleButtonFragment(this.getString(R.string.wifi), RingerDatabase.KEY_WIFI, this.mInfo, this));
// if(this.mInfo.containsKey(RingerDatabase.KEY_BT))
what.add(new ToggleButtonFragment(this.getString(R.string.bluetooth), RingerDatabase.KEY_BT, this.mInfo, this));
fragments.add(new FeatureListFragment(this.mInfo, this, what));
//Populate the pager
this.mPager = (ViewPager)findViewById(R.id.pager);
if(this.mPager != null)
this.mPager.setAdapter(new TitledFragmentAdapter(this.getSupportFragmentManager(), fragments, titles));
//populate the pager's indicator
TitlePageIndicator indicator = (TitlePageIndicator)findViewById(R.id.indicator);
if(indicator != null)
indicator.setViewPager(this.mPager);
/*
* TODO
* button bar
*/
}
/**
* Creates the main menu that is displayed when the menu button is clicked
* @author ricky barrette
*/
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, SAVE_ID, 0, getString(R.string.save_ringer)).setIcon(android.R.drawable.ic_menu_save);
return super.onCreateOptionsMenu(menu);
}
/* (non-Javadoc)
* @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem)
* @author ricky barrette
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()){
case SAVE_ID:
save();
break;
}
return super.onOptionsItemSelected(item);
}
/**
* Prepares a bundle containing all the information that needs to be saved, and returns it to the starting activity
* @author ricky barrette
*/
private void save() {
final ProgressDialog progress = ProgressDialog.show(this, "", this.getText(R.string.saving), true, true);
//Generate the intent in a thread to prevent anr's and allow for progress dialog
new Thread( new Runnable(){
@Override
public void run(){
Looper.prepare();
RingerInformationActivity.this.mData.putExtra(ListActivity.KEY_RINGER, RingerInformationActivity.this.mRinger).putExtra(ListActivity.KEY_INFO, RingerInformationActivity.this.mInfo);
RingerInformationActivity.this.setResult(Activity.RESULT_OK, RingerInformationActivity.this.mData);
progress.dismiss();
RingerInformationActivity.this.finish();
}
}).start();
}
@Override
public void onRingerContentChanged(ContentValues values) {
if(Debug.DEBUG){
Log.v(TAG,"onRingerContentChanged()");
logContentValues(values);
}
this.mRinger.putAll(values);
}
@Override
public void onInfoContentChanged(ContentValues values) {
if(Debug.DEBUG){
Log.v(TAG,"onInfoContentChanged()");
logContentValues(values);
}
this.mInfo.putAll(values);
}
/**
* Logs the content values
* @param values
* @author ricky barrette
*/
private void logContentValues(ContentValues values) {
for(Entry<String,Object> item : values.valueSet())
Log.d(TAG, item.getKey() +" = "+ item.getValue());
}
@Override
public void setScrollEnabled(boolean enabled) {
this.mPager.setScrollEnabled(enabled);
}
}

View File

@@ -31,18 +31,10 @@ public class RingerListAdapter extends BaseAdapter {
private static final String TAG = "RingerListAdapter";
/* (non-Javadoc)
* @see android.widget.BaseAdapter#notifyDataSetChanged()
* @author ricky barrette
*/
@Override
public void notifyDataSetChanged() {
super.notifyDataSetChanged();
}
private RingerDatabase mDb;
private List<String> mList;
private List<String> mTitles;
private LayoutInflater mInflater;
private List<String> mDescriptions;
/**
* Creates a new RingerListAdapter
@@ -56,17 +48,18 @@ public class RingerListAdapter extends BaseAdapter {
// Cache the LayoutInflate to avoid asking for a new one each time.
mInflater = LayoutInflater.from(context);
mDb = db;
mList = db.getAllRingerTitles();
mTitles = db.getAllRingerTitles();
mDescriptions = db.getAllRingerDescriptions();
}
@Override
public int getCount() {
return mList.size();
return mTitles.size();
}
@Override
public String getItem(int position) {
return mList.get(position);
return mTitles.get(position);
}
@Override
@@ -90,7 +83,8 @@ public class RingerListAdapter extends BaseAdapter {
// Creates a ViewHolder and store references to the two children views
// we want to bind data to.
holder = new ViewHolder();
holder.text = (TextView) convertView.findViewById(android.R.id.text1);
holder.title = (TextView) convertView.findViewById(android.R.id.text1);
holder.description = (TextView) convertView.findViewById(android.R.id.text2);
holder.checkbox = (CheckBox) convertView.findViewById(R.id.ringer_enabled_checkbox);
convertView.setTag(holder);
@@ -109,7 +103,7 @@ public class RingerListAdapter extends BaseAdapter {
if(holder == null)
Log.e(TAG,"holder is null!!!");
if(holder.text == null)
if(holder.title == null)
Log.e(TAG,"holder.text is null!!!");
if(holder.checkbox == null)
@@ -121,7 +115,8 @@ public class RingerListAdapter extends BaseAdapter {
* Remember that you should always call setChecked() after calling setOnCheckedChangedListener.
* This will prevent the list from changing the values on you.
*/
holder.text.setText(getItem(position));
holder.title.setText(getItem(position));
holder.description.setText(mDescriptions.get(position));
holder.checkbox.setOnCheckedChangeListener(new OnCheckedChangeListener(){
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
@@ -131,15 +126,19 @@ public class RingerListAdapter extends BaseAdapter {
holder.checkbox.setChecked(mDb.isRingerEnabled(position +1));
//Remove the checkbox for the default ringer
if(position == 0)
if(position == 0) {
holder.checkbox.setVisibility(View.INVISIBLE);
if(holder.description.getText().toString() == null)
holder.description.setText(R.string.about_default_ringer);
}
else
holder.checkbox.setVisibility(View.VISIBLE);
return convertView;
}
class ViewHolder {
TextView text;
TextView title;
TextView description;
CheckBox checkbox;
}

View File

@@ -65,4 +65,4 @@ public class ScrollView extends android.widget.ScrollView {
return isEnabled ? super.onTouchEvent(ev) : false;
}
}
}

View File

@@ -24,9 +24,9 @@ import android.widget.EditText;
import android.widget.ListView;
import android.widget.ProgressBar;
import com.TwentyCodes.android.LocationRinger.LocationSelectedListener;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.debug.Debug;
import com.TwentyCodes.android.location.OnLocationSelectedListener;
import com.TwentyCodes.android.location.ReverseGeocoder;
import com.google.android.maps.GeoPoint;
@@ -43,14 +43,14 @@ public class SearchDialog extends Dialog implements android.view.View.OnClickLis
private ProgressBar mProgress;
private Handler mHandler;
private Context mContext;
private LocationSelectedListener mListener;
private OnLocationSelectedListener mListener;
/**
* Creates a new search dialog
* @param context
* @author ricky barrette
*/
public SearchDialog(Context context, LocationSelectedListener listener) {
public SearchDialog(Context context, OnLocationSelectedListener listener) {
super(context);
this.setTitle(R.string.search);
this.setContentView(R.layout.address_dialog);

View File

@@ -1,118 +0,0 @@
/**
* @author Twenty Codes
* @author ricky barrette
* @date June 29, 2011
*/
package com.TwentyCodes.android.LocationRinger.ui;
import com.TwentyCodes.android.LocationRinger.R;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.Typeface;
import android.preference.Preference;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
/**
* this class will be a simple preference that contains only a text view that will display the application build information
* @author ricky barrette
*/
public class VersionInformationPreference extends Preference {
private Context mContext;
/**
* creates a preference that is nothing but a text view
* @param context
*/
public VersionInformationPreference(Context context) {
super(context);
mContext = context;
}
/**
* creates a preference that is nothing but a text view
* @param context
* @param attrs
*/
public VersionInformationPreference(Context context, AttributeSet attrs) {
super(context, attrs);
mContext = context;
}
/**
* creates a preference that is nothing but a text view
* @param context
* @param attrs
* @param defStyle
*/
public VersionInformationPreference(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
mContext = context;
}
/**
* creates a linear layout the contains only a textview.
* (non-Javadoc)
* @see android.preference.Preference#onCreateView(android.view.ViewGroup)
* @param parent
* @return
* @author ricky barrette
*/
@Override
protected View onCreateView(ViewGroup parent){
/*
* get the build information, and build the string
*/
PackageManager pm = mContext.getPackageManager();
PackageInfo pi;
try {
pi = pm.getPackageInfo(mContext.getPackageName(), 0);
} catch (NameNotFoundException eNnf) {
//doubt this will ever run since we want info about our own package
pi = new PackageInfo();
pi.versionName = "unknown";
pi.versionCode = 1;
}
/*
* create a vertical linear layout that width and height that wraps content
*/
LinearLayout layout = new LinearLayout(getContext());
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
// params.gravity = Gravity.CENTER;
layout.setPadding(15, 5, 10, 5);
layout.setOrientation(LinearLayout.VERTICAL);
layout.removeAllViews();
/*
* create a textview that will be used to display the application's name and build information
* and add it to the layout
*/
TextView title = new TextView(getContext());
title.setText(mContext.getString(R.string.app_name)+" "+pi.versionName+" bulid "+pi.versionCode);
title.setTextSize(16);
title.setTypeface(Typeface.SANS_SERIF);
title.setGravity(Gravity.LEFT);
title.setLayoutParams(params);
/*
* add the title views to the layout
*/
layout.addView(title);
layout.setId(android.R.id.widget_frame);
return layout;
}
}

View File

@@ -0,0 +1,57 @@
/**
* ViewPager.java
* @date Aug 13, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
/**
* @author ricky
*/
public class ViewPager extends android.support.v4.view.ViewPager {
private boolean isEnabled = true;
/**
* @param context
* @param apiKey
* @author ricky barrette
*/
public ViewPager(Context context) {
super(context);
}
/**
* @param context
* @param attrs
* @author ricky barrette
*/
public ViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
/**
* Enables or disabled the scrollview's ability to scroll
* @param enabled
* @author ricky barrette
*/
public void setScrollEnabled(boolean enabled){
isEnabled = enabled;
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
return isEnabled ? super.onInterceptTouchEvent(ev) : false;
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
return isEnabled ? super.onTouchEvent(ev) : false;
}
}

View File

@@ -1,504 +0,0 @@
/**
* RingeInformationActivity.java
* @date Apr 29, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.ContentValues;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.media.AudioManager;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Looper;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.SeekBar;
import android.widget.Spinner;
import android.widget.ToggleButton;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.db.RingerDatabase;
/**
* This activity will be used to display what this ringer controls. here the user will be able to add or modify features they wish to control
* @author ricky barrette
*/
public class WhatActivity extends Activity implements OnCheckedChangeListener, OnClickListener {
private static final int SAVE_ID = 0;
//private static final String TAG = "RingerInformationWhatActivity";
private static final int ADD_ID = 1;
private SeekBar mRingtonVolume;
private SeekBar mNotificationRingtoneVolume;
private EditText mNotificationRingtone;
private EditText mRingerName;
private EditText mRingtone;
private ToggleButton mNotificationRingtoneToggle;
private ToggleButton mRingerToggle;
private ToggleButton mRingtoneToggle;
private String mRingtoneURI;
private String mNotificationRingtoneURI;
private ToggleButton mWifiToggle;
private ToggleButton mBTToggle;
private SeekBar mAlarmVolume;
private ProgressBar mMusicVolume;
private void addFeature(int item) {
String feature = this.getResources().getStringArray(R.array.features)[item];
if(feature.equals(this.getString(R.string.ringtone))){
findViewById(R.id.ringtone_info).setVisibility(View.VISIBLE);
}
if(feature.equals(this.getString(R.string.notification_ringtone))){
findViewById(R.id.notification_ringtone_info).setVisibility(View.VISIBLE);
}
if(feature.equals(this.getString(R.string.alarm_volume))){
findViewById(R.id.alarm_volume_info).setVisibility(View.VISIBLE);
}
if(feature.equals(this.getString(R.string.music_volume))){
findViewById(R.id.music_volume_info).setVisibility(View.VISIBLE);
}
if(feature.equals(this.getString(R.string.bluetooth))){
findViewById(R.id.bluetooth_toggle).setVisibility(View.VISIBLE);
}
if(feature.equals(this.getString(R.string.wifi))){
findViewById(R.id.wifi_toggle).setVisibility(View.VISIBLE);
}
if(feature.equals(this.getString(R.string.update_interval))){
findViewById(R.id.update_interval_info).setVisibility(View.VISIBLE);
}
if(this.mBTToggle.isShown() || this.mWifiToggle.isShown())
findViewById(R.id.data_label).setVisibility(View.VISIBLE);
}
/**
* Will display a prompt asking for what feature to add.
* @author ricky
*/
private void displayFeaturesDialog() {
/*
* TODO
* Check to see if wifi is available
* check to see if bluetooth is available,
* remove unavailable options
*/
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(this.getText(R.string.add_feature));
builder.setItems(R.array.features, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
addFeature(item);
}
});
AlertDialog alert = builder.create();
alert.show();
}
/**
* starts the ringtone picker
* @param ringtoneCode RingtoneManager.TYPE_?
* @param uri of current tone
* @author ricky barrette
*/
private void getRingtoneURI(int ringtoneCode, String uri){
Intent intent = new Intent( RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TYPE, ringtoneCode);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TITLE, "Select Tone");
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);
if( uri == null)
try {
uri = RingtoneManager.getActualDefaultRingtoneUri(this, ringtoneCode).toString();
} catch (NullPointerException e) {
e.printStackTrace();
}
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, uri == null ? null : Uri.parse(uri));
startActivityForResult( intent, ringtoneCode);
}
/**
* Called when the rintone picker activity returns it's result
*/
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
switch (requestCode) {
case RingtoneManager.TYPE_RINGTONE:
this.mRingtoneURI = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI).toString();
Ringtone ringtone = RingtoneManager.getRingtone(this, Uri.parse(this.mRingtoneURI));
this.mRingtone.setText(ringtone == null ? "Silent" : ringtone.getTitle(this));
break;
case RingtoneManager.TYPE_NOTIFICATION:
this.mNotificationRingtoneURI = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI).toString();
Ringtone notificationTone = RingtoneManager.getRingtone(this, Uri.parse(this.mNotificationRingtoneURI));
this.mNotificationRingtone.setText(notificationTone == null ? "Silent" : notificationTone.getTitle(this));
break;
}
}
}
/**
* Called when a toggle button's state is changed
* @author ricky barrette
*/
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
switch(buttonView.getId()){
case R.id.ringer_toggle:
//TODO disable all the child views, or find xml tag to allow setting of child view enabled via parent
findViewById(R.id.ringtone_info).setEnabled(isChecked);
findViewById(R.id.notification_ringtone_info).setEnabled(isChecked);
findViewById(R.id.alarm_volume_info).setEnabled(isChecked);
findViewById(R.id.music_volume_info).setEnabled(isChecked);
findViewById(R.id.bluetooth_toggle).setEnabled(isChecked);
findViewById(R.id.wifi_toggle).setEnabled(isChecked);
findViewById(R.id.update_interval_info).setEnabled(isChecked);
findViewById(R.id.data_label).setEnabled(isChecked);
break;
case R.id.notification_silent_toggle:
findViewById(R.id.notification_ringtone_button).setEnabled(!isChecked);
this.mNotificationRingtone.setEnabled(!isChecked);
this.mNotificationRingtoneVolume.setEnabled(!isChecked);
break;
case R.id.ringtone_silent_toggle:
this.mRingtone.setEnabled(!isChecked);
findViewById(R.id.ringtone_button).setEnabled(!isChecked);
this.mRingtonVolume.setEnabled(!isChecked);
break;
}
}
/**
* Called when a view is clicked
* @author ricky barrette
*/
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.notification_ringtone_button:
getRingtoneURI(RingtoneManager.TYPE_NOTIFICATION, mNotificationRingtoneURI);
break;
case R.id.ringtone_button:
getRingtoneURI(RingtoneManager.TYPE_RINGTONE, mRingtoneURI);
break;
case R.id.save_ringer_button:
save();
break;
case R.id.add_feature_button:
findViewById(R.id.add_a_feature_label).setVisibility(View.GONE);
displayFeaturesDialog();
break;
}
}
/**
* Called when the acivity is first created
* @author ricky barrette
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.what);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
AudioManager mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
this.mRingerName = (EditText) findViewById(R.id.ringer_name);
this.mRingerToggle = (ToggleButton) findViewById(R.id.ringer_toggle);
this.mRingerToggle.setChecked(true);
this.mRingerToggle.setOnCheckedChangeListener(this);
this.mRingtone = (EditText) findViewById(R.id.ringtone);
this.mRingtoneToggle = (ToggleButton) findViewById(R.id.ringtone_silent_toggle);
this.mRingtonVolume = (SeekBar) findViewById(R.id.ringtone_volume);
this.mRingtonVolume.setMax(mAudioManager.getStreamMaxVolume(AudioManager.STREAM_RING));
this.mRingtonVolume.setProgress(mAudioManager.getStreamVolume(AudioManager.STREAM_RING));
this.mRingtoneToggle.setChecked(mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT ? true : false);
this.mRingtoneToggle.setOnCheckedChangeListener(this);
this.mRingtone.setEnabled(! mRingtoneToggle.isChecked());
this.mRingtonVolume.setEnabled(! mRingtoneToggle.isChecked());
this.mRingtone.setClickable(true);
this.mNotificationRingtone = (EditText) findViewById(R.id.notification_ringtone);
this.mNotificationRingtoneVolume = (SeekBar) findViewById(R.id.notification_ringtone_volume);
this.mNotificationRingtoneToggle = (ToggleButton) findViewById(R.id.notification_silent_toggle);
this.mNotificationRingtoneVolume.setMax(mAudioManager.getStreamMaxVolume(AudioManager.STREAM_NOTIFICATION));
this.mNotificationRingtoneVolume.setProgress(mAudioManager.getStreamVolume(AudioManager.STREAM_NOTIFICATION));
this.mNotificationRingtoneToggle.setOnCheckedChangeListener(this);
this.mNotificationRingtoneToggle.setChecked(mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT ? true : false);
this.mNotificationRingtone.setEnabled(! mNotificationRingtoneToggle.isChecked());
this.mNotificationRingtoneVolume.setEnabled(! mNotificationRingtoneToggle.isChecked());
this.mNotificationRingtone.setClickable(true);
this.mMusicVolume = (SeekBar) findViewById(R.id.music_volume);
this.mMusicVolume.setMax(mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC));
this.mMusicVolume.setProgress(mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC));
this.mAlarmVolume = (SeekBar) findViewById(R.id.alarm_volume);
this.mAlarmVolume.setMax(mAudioManager.getStreamMaxVolume(AudioManager.STREAM_ALARM));
this.mAlarmVolume.setProgress(mAudioManager.getStreamVolume(AudioManager.STREAM_ALARM));
this.mWifiToggle = (ToggleButton) findViewById(R.id.wifi_toggle);
this.mBTToggle = (ToggleButton) findViewById(R.id.bluetooth_toggle);
findViewById(R.id.ringtone_button).setOnClickListener(this);
findViewById(R.id.notification_ringtone_button).setOnClickListener(this);
findViewById(R.id.save_ringer_button).setOnClickListener(this);
findViewById(R.id.mark_my_location).setOnClickListener(this);
findViewById(R.id.my_location).setOnClickListener(this);
findViewById(R.id.map_mode).setOnClickListener(this);
findViewById(R.id.search).setOnClickListener(this);
findViewById(R.id.add_feature_button).setOnClickListener(this);
try {
this.mRingtoneURI = RingtoneManager.getActualDefaultRingtoneUri(this, RingtoneManager.TYPE_RINGTONE).toString();
this.mRingtone.setText(RingtoneManager.getRingtone(this, Uri.parse(mRingtoneURI)).getTitle(this));
} catch (NullPointerException e) {
e.printStackTrace();
this.mRingtoneToggle.setChecked(true);
}
try {
this.mNotificationRingtoneURI = RingtoneManager.getActualDefaultRingtoneUri(this, RingtoneManager.TYPE_NOTIFICATION).toString();
this.mNotificationRingtone.setText(RingtoneManager.getRingtone(this, Uri.parse(mNotificationRingtoneURI)).getTitle(this));
} catch (NullPointerException e) {
e.printStackTrace();
this.mNotificationRingtoneToggle.setChecked(true);
}
Intent data = this.getIntent();
if(data.hasExtra(ListActivity.KEY_INFO)){
this.mRingerToggle.setChecked(data.getBooleanExtra(RingerDatabase.KEY_IS_ENABLED, true));
this.mRingerName.setText(data.getStringExtra(RingerDatabase.KEY_RINGER_NAME));
this.setTitle(getString(R.string.editing)+" "+mRingerName.getText().toString());
/*
* if this is the default ringer, then we will display everything
*/
if(data.getBooleanExtra(ListActivity.KEY_IS_DEFAULT, false)){
findViewById(R.id.ringer_options).setVisibility(View.GONE);
findViewById(R.id.notification_ringtone_info).setVisibility(View.VISIBLE);
findViewById(R.id.ringtone_info).setVisibility(View.VISIBLE);
findViewById(R.id.wifi_toggle).setVisibility(View.VISIBLE);
findViewById(R.id.data_label).setVisibility(View.VISIBLE);
findViewById(R.id.bluetooth_toggle).setVisibility(View.VISIBLE);
findViewById(R.id.music_volume_info).setVisibility(View.VISIBLE);
findViewById(R.id.alarm_volume_info).setVisibility(View.VISIBLE);
findViewById(R.id.update_interval_info).setVisibility(View.VISIBLE);
findViewById(R.id.add_feature_button).setVisibility(View.GONE);
}
/*
* We need to null check all the values
*/
ContentValues info = (ContentValues) data.getParcelableExtra(ListActivity.KEY_INFO);
if(RingerDatabase.parseBoolean(info.getAsString(RingerDatabase.KEY_PLUS_BUTTON_HINT)));
findViewById(R.id.add_a_feature_label).setVisibility(View.GONE);
if (info.get(RingerDatabase.KEY_NOTIFICATION_IS_SILENT) != null){
this.mNotificationRingtoneToggle.setChecked(RingerDatabase.parseBoolean(info.getAsString(RingerDatabase.KEY_NOTIFICATION_IS_SILENT)));
findViewById(R.id.notification_ringtone_info).setVisibility(View.VISIBLE);
}
if (info.get(RingerDatabase.KEY_NOTIFICATION_RINGTONE) != null){
this.mNotificationRingtone.setText(info.getAsString(RingerDatabase.KEY_NOTIFICATION_RINGTONE));
findViewById(R.id.notification_ringtone_info).setVisibility(View.VISIBLE);
}
if (info.get(RingerDatabase.KEY_NOTIFICATION_RINGTONE_URI) != null)
this.mNotificationRingtoneURI = info.getAsString(RingerDatabase.KEY_NOTIFICATION_RINGTONE_URI);
if (info.get(RingerDatabase.KEY_RINGTONE) != null){
findViewById(R.id.ringtone_info).setVisibility(View.VISIBLE);
this.mRingtone.setText(info.getAsString(RingerDatabase.KEY_RINGTONE));
}
if (info.get(RingerDatabase.KEY_RINGTONE_IS_SILENT) != null) {
this.mRingtoneToggle.setChecked(RingerDatabase.parseBoolean(info.getAsString(RingerDatabase.KEY_RINGTONE_IS_SILENT)));
findViewById(R.id.ringtone_info).setVisibility(View.VISIBLE);
}
if (info.get(RingerDatabase.KEY_RINGTONE_URI) != null)
this.mRingtoneURI = info.getAsString(RingerDatabase.KEY_RINGTONE_URI);
if (info.get(RingerDatabase.KEY_WIFI) != null){
this.mWifiToggle.setChecked(RingerDatabase.parseBoolean(info.getAsString(RingerDatabase.KEY_WIFI)));
findViewById(R.id.wifi_toggle).setVisibility(View.VISIBLE);
findViewById(R.id.data_label).setVisibility(View.VISIBLE);
}
if (info.get(RingerDatabase.KEY_BT) != null){
this.mBTToggle.setChecked(RingerDatabase.parseBoolean(info.getAsString(RingerDatabase.KEY_BT)));
findViewById(R.id.bluetooth_toggle).setVisibility(View.VISIBLE);
findViewById(R.id.data_label).setVisibility(View.VISIBLE);
}
if (info.get(RingerDatabase.KEY_NOTIFICATION_RINGTONE_VOLUME) != null)
this.mNotificationRingtoneVolume.setProgress(info.getAsInteger(RingerDatabase.KEY_NOTIFICATION_RINGTONE_VOLUME));
if (info.get(RingerDatabase.KEY_RINGTONE_VOLUME) != null)
this.mRingtonVolume.setProgress(info.getAsInteger(RingerDatabase.KEY_RINGTONE_VOLUME));
if (info.get(RingerDatabase.KEY_MUSIC_VOLUME) != null){
this.mMusicVolume.setProgress(info.getAsInteger(RingerDatabase.KEY_MUSIC_VOLUME));
findViewById(R.id.music_volume_info).setVisibility(View.VISIBLE);
}
if (info.get(RingerDatabase.KEY_ALARM_VOLUME) != null){
this.mAlarmVolume.setProgress(info.getAsInteger(RingerDatabase.KEY_ALARM_VOLUME));
findViewById(R.id.alarm_volume_info).setVisibility(View.VISIBLE);
}
if (info.get(RingerDatabase.KEY_UPDATE_INTERVAL) != null){
String ui = info.getAsString(RingerDatabase.KEY_UPDATE_INTERVAL);
findViewById(R.id.update_interval_info).setVisibility(View.VISIBLE);
String[] values = this.getResources().getStringArray(R.array.runtimes);
for(int i = 0; i < values.length; i++)
if(ui.equals(values[i])){
((Spinner) findViewById(R.id.update_interval)).setSelection(i);
break;
}
}
} else
this.setTitle(R.string.new_ringer);
}
/**
* Creates the main menu that is displayed when the menu button is clicked
* @author ricky barrette
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, SAVE_ID, 0, getString(R.string.save_ringer)).setIcon(android.R.drawable.ic_menu_save);
menu.add(0, ADD_ID, 0, getString(R.string.add_feature)).setIcon(android.R.drawable.ic_menu_add);
return super.onCreateOptionsMenu(menu);
}
/* (non-Javadoc)
* @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem)
* @author ricky barrette
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()){
case ADD_ID:
displayFeaturesDialog();
break;
case SAVE_ID:
save();
break;
}
return super.onOptionsItemSelected(item);
}
/**
* Prepares a bundle containing all the information that needs to be saved, and returns it to the starting activity
* @author ricky barrette
*/
private void save() {
final ProgressDialog progress = ProgressDialog.show(this, "", this.getText(R.string.saving), true, true);
//Generate the intent in a thread to prevent anr's and allow for progress dialog
new Thread( new Runnable(){
@Override
public void run(){
Looper.prepare();
Intent data = new Intent().putExtras(WhatActivity.this.getIntent());
ContentValues ringer = WhatActivity.this.getIntent().getParcelableExtra(ListActivity.KEY_RINGER);
ContentValues info = WhatActivity.this.getIntent().getParcelableExtra(ListActivity.KEY_INFO);
if(ringer == null)
ringer = new ContentValues();
if(info == null)
info = new ContentValues();
/*
* package the ringer table information
*/
ringer.put(RingerDatabase.KEY_RINGER_NAME, WhatActivity.this.mRingerName.getText().toString());
ringer.put(RingerDatabase.KEY_IS_ENABLED, WhatActivity.this.mRingerToggle.isChecked());
/*
* package the ringer_info table information
*/
if(findViewById(R.id.notification_ringtone_info).isShown()){
info.put(RingerDatabase.KEY_NOTIFICATION_IS_SILENT, WhatActivity.this.mNotificationRingtoneToggle.isChecked());
info.put(RingerDatabase.KEY_NOTIFICATION_RINGTONE, WhatActivity.this.mNotificationRingtone.getText().toString());
info.put(RingerDatabase.KEY_NOTIFICATION_RINGTONE_URI, WhatActivity.this.mNotificationRingtoneURI);
info.put(RingerDatabase.KEY_NOTIFICATION_RINGTONE_VOLUME, WhatActivity.this.mNotificationRingtoneVolume.getProgress());
}
if(findViewById(R.id.ringtone_info).isShown()){
info.put(RingerDatabase.KEY_RINGTONE, WhatActivity.this.mRingtone.getText().toString());
info.put(RingerDatabase.KEY_RINGTONE_IS_SILENT, WhatActivity.this.mRingtoneToggle.isChecked());
info.put(RingerDatabase.KEY_RINGTONE_URI, WhatActivity.this.mRingtoneURI);
info.put(RingerDatabase.KEY_RINGTONE_VOLUME, WhatActivity.this.mRingtonVolume.getProgress());
}
if(findViewById(R.id.wifi_toggle).isShown())
info.put(RingerDatabase.KEY_WIFI, WhatActivity.this.mWifiToggle.isChecked());
if(findViewById(R.id.bluetooth_toggle).isShown())
info.put(RingerDatabase.KEY_BT, WhatActivity.this.mBTToggle.isChecked());
if(findViewById(R.id.music_volume_info).isShown())
info.put(RingerDatabase.KEY_MUSIC_VOLUME, WhatActivity.this.mMusicVolume.getProgress());
if(findViewById(R.id.alarm_volume_info).isShown())
info.put(RingerDatabase.KEY_ALARM_VOLUME, WhatActivity.this.mAlarmVolume.getProgress());
if(findViewById(R.id.update_interval_info).isShown())
info.put(RingerDatabase.KEY_UPDATE_INTERVAL,
WhatActivity.this.getResources().getStringArray(R.array.runtimes)[((Spinner) findViewById(R.id.update_interval)).getSelectedItemPosition()]);
info.put(RingerDatabase.KEY_PLUS_BUTTON_HINT, true);
//package the intent
data.putExtra(ListActivity.KEY_RINGER, ringer).putExtra(ListActivity.KEY_INFO, info);
WhatActivity.this.setResult(RESULT_OK, data);
progress.dismiss();
WhatActivity.this.finish();
}
}).start();
}
}

View File

@@ -0,0 +1,180 @@
/**
* AboutRingerFragment.java
* @date Aug 8, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui.fragments;
import java.util.Map.Entry;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.OnContentChangedListener;
import com.TwentyCodes.android.LocationRinger.db.RingerDatabase;
import com.TwentyCodes.android.LocationRinger.debug.Debug;
import android.content.ContentValues;
import android.content.Context;
import android.graphics.Canvas;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.EditText;
import android.widget.ToggleButton;
/**
* This fragment will used to allow the user to enter/edit ringer information
* @author ricky
*/
public class AboutRingerFragment extends Fragment implements OnCheckedChangeListener {
private static final String TAG = "AboutRingerFragment";
private ListeningEditText mRingerName;
private ListeningEditText mRingerDescription;
private ToggleButton mRingerEnabled;
private OnContentChangedListener mListener;
private ContentValues mInfo;
private ContentValues mRinger;
public AboutRingerFragment(ContentValues ringer, ContentValues info, OnContentChangedListener listener){
this.mInfo = info;
this.mRinger = ringer;
this.mListener = listener;
}
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(this.mListener != null){
ContentValues info = new ContentValues();
info.put(RingerDatabase.KEY_IS_ENABLED, isChecked);
this.mListener.onRingerContentChanged(info);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
this.getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
View view = inflater.inflate(R.layout.ringer_about_fragment, container, false);
if(Debug.DEBUG){
for(Entry<String,Object> item : this.mInfo.valueSet())
Log.d(TAG, item.getKey() +" = "+ item.getValue());
for(Entry<String,Object> item : this.mRinger.valueSet())
Log.d(TAG, item.getKey() +" = "+ item.getValue());
}
/*
* ringer name
*/
this.mRingerName = (ListeningEditText) view.findViewById(R.id.ringer_name);
if(this.mRinger.containsKey(RingerDatabase.KEY_RINGER_NAME))
this.mRingerName.setText(this.mRinger.getAsString(RingerDatabase.KEY_RINGER_NAME));
this.mRingerName.setKey(RingerDatabase.KEY_RINGER_NAME);
this.mRingerName.setListener(this.mListener);
/*
* ringer description
*/
this.mRingerDescription = (ListeningEditText) view.findViewById(R.id.ringer_description);
if(this.mInfo.containsKey(RingerDatabase.KEY_RINGER_DESCRIPTION))
this.mRingerDescription.setText(this.mInfo.getAsString(RingerDatabase.KEY_RINGER_DESCRIPTION));
this.mRingerDescription.setKey(RingerDatabase.KEY_RINGER_DESCRIPTION);
this.mRingerDescription.setListener(this.mListener);
/*
* ringer enabled
*/
this.mRingerEnabled = (ToggleButton) view.findViewById(R.id.ringer_enabled);
if(this.mRinger.containsKey(RingerDatabase.KEY_IS_ENABLED))
this.mRingerEnabled.setChecked(this.mRinger.getAsBoolean(RingerDatabase.KEY_IS_ENABLED));
this.mRingerEnabled.setOnCheckedChangeListener(this);
return view;
}
/**
* This Edit text class is used in place of a standard edit text.
* It will update the pass the updated information though a listener
* @author ricky barrette
*/
public static class ListeningEditText extends EditText{
private String mKey;
private OnContentChangedListener mListener;
/**
* Creates a new ListeningEditText
* @param context
* @author ricky barrette
*/
public ListeningEditText(Context context) {
super(context);
}
/**
* Creates a new ListeningEditText
* @param context
* @param attrs
* @author ricky barrette
*/
public ListeningEditText(Context context, AttributeSet attrs) {
super(context, attrs);
}
/**
* Creates a new ListeningEditText
* @param context
* @param attrs
* @param defStyle
* @author ricky barrette
*/
public ListeningEditText(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
/**
* Called when the edit text is drawn
* @author ricky barrette
*/
@Override
public void onDraw(Canvas canvas){
super.onDraw(canvas);
if(mListener != null){
ContentValues info = new ContentValues();
info.put(this.mKey, this.getText().toString());
if(this.mKey.equals(RingerDatabase.KEY_RINGER_NAME))
this.mListener.onRingerContentChanged(info);
else
this.mListener.onInfoContentChanged(info);
}
}
/**
* Sets the key for this ListeningEditText
* @param key
* @ author ricky barrette
*/
public void setKey(String key){
this.mKey = key;
}
/**
* Sets the listener of this ListeningEditText
* @param listener
* @ author ricky barrette
*/
public void setListener(OnContentChangedListener listener){
this.mListener = listener;
}
}
}

View File

@@ -0,0 +1,92 @@
/**
* FeatureListFragment.java
* @date Aug 7, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui.fragments;
import java.util.ArrayList;
import android.content.ContentValues;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.ListFragment;
import android.util.Log;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import com.TwentyCodes.android.LocationRinger.OnContentChangedListener;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.debug.Debug;
/**
* This fragment will be used to display a list of fragments
*
* TODO + create button bar that had a plus button and a hint + add/remove
* features
*
* @author ricky
*/
public class FeatureListFragment extends ListFragment {
/**
* (non-Javadoc)
*
* @see android.support.v4.app.ListFragment#onCreateView(android.view.LayoutInflater,
* android.view.ViewGroup, android.os.Bundle)
*/
@Override
public View onCreateView(LayoutInflater inflator, ViewGroup container,
Bundle bundle) {
// TODO Auto-generated method stub
return super.onCreateView(inflator, container, bundle);
}
private static final String TAG = "FeatureListFragment";
private static final int DELETE_ID = 0;
private ArrayList<Fragment> mFeatures;
// private OnContentChangedListener mListener;
// private ContentValues mInfo;
// private int mIndex;
public FeatureListFragment(ContentValues info,
OnContentChangedListener listener, ArrayList<Fragment> fragments) {
super();
this.mFeatures = fragments;
// this.mInfo = info;
// this.mListener = listener;
}
@Override
public void onResume() {
this.setListAdapter(new FragmentListAdaptor(this, mFeatures));
this.getListView().setOnCreateContextMenuListener(this);
if (Debug.DEBUG)
Log.v(TAG, "onResume()");
super.onResume();
}
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
menu.add(0, DELETE_ID, 0, R.string.delete).setIcon(
android.R.drawable.ic_menu_delete);
}
public boolean onContextItemSelected(MenuItem item) {
switch (item.getItemId()) {
case DELETE_ID:
Toast.makeText(this.getActivity(), "deleted! (note really)",
Toast.LENGTH_LONG).show();
return true;
}
return super.onContextItemSelected(item);
}
}

View File

@@ -0,0 +1,154 @@
/**
* FragmentListAdaptor.java
* @date Dec 24, 2011
* @author ricky barrette
* @author Twenty Codes, LLC
*/
package com.TwentyCodes.android.LocationRinger.ui.fragments;
import java.util.ArrayList;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.ListFragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.debug.Debug;
/**
* This Adaptor Class will be used to display fragments in a ListFragment.
* TODO
* + Add/Remove fragments on the fly
* @author ricky barrette
*/
public class FragmentListAdaptor extends BaseAdapter {
private LayoutInflater mInflater;
private ArrayList<Fragment> mFragments;
private FragmentManager mFragmentManager;
private final String TAG = "FragmentListAdaptor";
/**
* Creates a new FragmentListAdaptor
* @param listFragment
* @param fragments
* @author ricky barrette
*/
public FragmentListAdaptor(ListFragment listFragment, ArrayList<Fragment> fragments) {
if(Debug.DEBUG)
Log.v(TAG, "FragmentListAdaptor()");
mInflater = LayoutInflater.from(listFragment.getActivity());
mFragments = fragments;
mFragmentManager = listFragment.getFragmentManager();
}
/**
* Returns the number of Fragments to display
* (non-Javadoc)
* @see android.widget.Adapter#getCount()
*/
@Override
public int getCount() {
if(Debug.DEBUG)
Log.v(TAG, "getCount() :"+ mFragments.size());
return mFragments.size();
}
/**
* Returns the fragment to display
* (non-Javadoc)
* @see android.widget.Adapter#getItem(int)
*/
@Override
public Fragment getItem(int position) {
if(Debug.DEBUG)
Log.v(TAG, "getItem("+position+")");
return mFragments.get(position);
}
/**
* Returns the id of the fragment being displayed
* (non-Javadoc)
* @see android.widget.Adapter#getItemId(int)
*/
@Override
public long getItemId(int position) {
return position;
}
/**
* (non-Javadoc)
* @see android.widget.Adapter#getView(int, android.view.View, android.view.ViewGroup)
*/
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if(Debug.DEBUG)
Log.v(TAG, "getView("+position+")");
FragmentTransaction transaction = mFragmentManager.beginTransaction();
// A Holder keeps references to children views to avoid unnecessary calls to findViewById() on each row.
Holder holder;
/*
* When convertView is not null, we can reuse it directly, there is no need
* to reinflate it. We only inflate a new View when the convertView supplied
* by ListView is null.
*/
if (convertView == null) {
convertView = mInflater.inflate(R.layout.fragment_container, null);
/*
* Creates a ViewHolder and store references
* that we want to bind data to.
*/
holder = new Holder();
holder.view = (View) convertView.findViewById(R.id.fragment_container);
holder.view.setId(position+1);
holder.tag = createTag(position);
convertView.setTag(holder);
//add the fragment to the new view
transaction.add(holder.view.getId(), getItem(position), holder.tag);
} else {
// Get the ViewHolder back to get fast access to the Old Views
holder = (Holder) convertView.getTag();
Fragment shown = mFragmentManager.findFragmentByTag(holder.tag);
//replace the old fragment with a new one
holder.tag = createTag(position);
if(shown != null)
transaction.remove(shown);
transaction.add(holder.view.getId(), getItem(position), holder.tag);
transaction.addToBackStack(null);
}
transaction.commit();
return convertView;
}
/**
* @param position
* @return a unique tag to be used for identifying fragments
* @author ricky barrette
*/
private String createTag(int position){
return "andorid:FragmentList:tag:"+position;
}
/**
* Simple Holder class
* @author ricky barrette
*/
class Holder{
public String tag;
public View view;
}
}

View File

@@ -0,0 +1,295 @@
/**
* MapFragment.java
* @date Aug 8, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui.fragments;
import android.app.ProgressDialog;
import android.content.ContentValues;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.Toast;
import android.widget.ToggleButton;
import com.TwentyCodes.android.LocationRinger.EnableScrollingListener;
import com.TwentyCodes.android.LocationRinger.OnContentChangedListener;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.db.RingerDatabase;
import com.TwentyCodes.android.LocationRinger.debug.Debug;
import com.TwentyCodes.android.LocationRinger.ui.SearchDialog;
import com.TwentyCodes.android.SkyHook.SkyHook;
import com.TwentyCodes.android.fragments.SkyHoookUserOverlayMapFragment;
import com.TwentyCodes.android.location.GeoPointLocationListener;
import com.TwentyCodes.android.location.OnLocationSelectedListener;
import com.TwentyCodes.android.overlays.RadiusOverlay;
import com.google.android.maps.GeoPoint;
/**
* This fragment will be used to display and allow the user to edit the ringers location trigger
* @author ricky
*/
public class MapFragment extends Fragment implements GeoPointLocationListener, OnClickListener, OnCheckedChangeListener, OnSeekBarChangeListener, OnLocationSelectedListener {
private ContentValues mInfo;
private OnContentChangedListener mListener;
private static final String TAG = "RingerInformationHowActivity";
private SeekBar mRadius;
private SkyHoookUserOverlayMapFragment mMapView;
private ToggleButton mMapEditToggle;
private RadiusOverlay mRadiusOverlay;
private GeoPoint mPoint;
private SkyHook mSkyHook;
private ProgressDialog mGpsProgress;
private boolean isFirstFix;
private View view;
private EnableScrollingListener mEnableScrollingListener;
/**
* Creates a new MapFragment
* @author ricky barrette
* @param ringerInformationActivity
*/
public MapFragment(ContentValues info, OnContentChangedListener listener, EnableScrollingListener enabledListener) {
this.mInfo = info;
this.mListener = listener;
this.mEnableScrollingListener = enabledListener;
}
/**
* Called when a toggle button's state is changed
* @author ricky barrette
*/
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
this.isFirstFix = isChecked;
view.findViewById(R.id.buttons).setVisibility(isChecked ? View.VISIBLE : View.GONE);
if(mEnableScrollingListener != null)
mEnableScrollingListener.setScrollEnabled(!isChecked);
if(isChecked){
this.mSkyHook.getUpdates();
this.mGpsProgress = ProgressDialog.show(this.getActivity(), "", this.getText(R.string.gps_fix), true, true);
} else {
this.mSkyHook.removeUpdates();
if(this.mGpsProgress != null)
this.mGpsProgress.dismiss();
}
this.mMapView.setDoubleTapZoonEnabled(isChecked);
//buttons
this.mMapView.setBuiltInZoomControls(isChecked);
this.mMapView.setClickable(isChecked);
this.mRadius.setEnabled(isChecked);
Toast.makeText(this.getActivity(), isChecked ? getString(R.string.map_editing_enabled) : getString(R.string.map_editiing_disabled), Toast.LENGTH_SHORT).show();
}
/**
* Called when a view is clicked
* @author ricky barrette
*/
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.mark_my_location:
if(this.mPoint != null){
this.mRadiusOverlay.setLocation(mPoint);
this.mMapView.setMapCenter(mPoint);
}
break;
case R.id.my_location:
if(this.mPoint != null)
this.mMapView.setMapCenter(mPoint);
break;
case R.id.map_mode:
this.mMapView.setSatellite(mMapView.isSatellite() ? false : true);
break;
case R.id.search:
new SearchDialog(this.getActivity(), this).show();
break;
}
}
/* (non-Javadoc)
* @see com.google.android.maps.MapActivity#onDestroy()
* @author ricky barrette
*/
@Override
public void onStop() {
this.mSkyHook.removeUpdates();
super.onDestroy();
}
/**
* Called when skyhook has a location to report
* @author ricky barrette
*/
@Override
public void onLocationChanged(GeoPoint point, int accuracy) {
this.mPoint = point;
if(point != null){
/*
* if this is the first fix and the radius overlay does not have a point specified
* then pan the map, and zoom in to the users current location
*/
if(this.isFirstFix)
if(this.mRadiusOverlay.getLocation() == null){
if(this.mMapView != null){
this.mMapView.setMapCenter(point);
this.mMapView.setZoom((this.mMapView.getMap().getMaxZoomLevel() - 5));
}
this.isFirstFix = false;
}
/*
* dismiss the acquiring gps dialog
*/
if(this.mGpsProgress != null)
this.mGpsProgress.dismiss();
}
}
/*
*/
@Override
public void onLocationSelected(GeoPoint point) {
if(point != null){
if(Debug.DEBUG)
Log.d(TAG, "onLocationSelected() "+ point.toString());
if(this.mRadiusOverlay != null)
this.mRadiusOverlay.setLocation(point);
if(this.mMapView != null){
this.mMapView.setMapCenter(point);
this.mMapView.setZoom((this.mMapView.getMap().getMaxZoomLevel() - 5));
}
if(this.mListener != null){
ContentValues info = new ContentValues();
info.put(RingerDatabase.KEY_LOCATION_LAT, point.getLatitudeE6());
info.put(RingerDatabase.KEY_LOCATION_LON, point.getLongitudeE6());
this.mListener.onInfoContentChanged(info);
}
} else if(Debug.DEBUG)
Log.d(TAG, "onLocationSelected() Location was null");
}
/**
* Called when a seekbar is has its progress changed
* @author ricky barrette
*/
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()){
case R.id.radius:
this.mRadiusOverlay.setRadius(progress);
this.mMapView.invalidate();
if(this.mListener != null){
ContentValues info = new ContentValues();
info.put(RingerDatabase.KEY_RADIUS, progress);
this.mListener.onInfoContentChanged(info);
}
break;
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
view = inflater.inflate(R.layout.map_info_fragment, container, false);
this.mSkyHook = new SkyHook(this.getActivity());
this.mSkyHook.setLocationListener(this);
this.mMapView = (SkyHoookUserOverlayMapFragment) this.getFragmentManager().findFragmentById(R.id.mapview);
this.mRadius = (SeekBar) view.findViewById(R.id.radius);
this.mRadius.setMax(Debug.MAX_RADIUS_IN_METERS);
this.mMapView.setClickable(false);
this.mMapEditToggle = (ToggleButton) view.findViewById(R.id.map_edit_toggle);
this.mMapEditToggle.setChecked(false);
this.mMapEditToggle.setOnCheckedChangeListener(this);
this.mRadiusOverlay = new RadiusOverlay();
this.mRadiusOverlay.setLocationSelectedListener(this);
this.mRadius.setOnSeekBarChangeListener(this);
this.mMapView.addOverlay(mRadiusOverlay);
this.mRadius.setEnabled(false);
if (this.mInfo.get(RingerDatabase.KEY_LOCATION_LAT) != null && this.mInfo.get(RingerDatabase.KEY_LOCATION_LON) != null){
this.mRadiusOverlay.setLocation(new GeoPoint(this.mInfo.getAsInteger(RingerDatabase.KEY_LOCATION_LAT), this.mInfo.getAsInteger(RingerDatabase.KEY_LOCATION_LON)));
}
if (this.mInfo.get(RingerDatabase.KEY_RADIUS) != null){
this.mRadius.setProgress(this.mInfo.getAsInteger(RingerDatabase.KEY_RADIUS));
}
if(this.mRadiusOverlay.getLocation() != null){
this.mMapView.setMapCenter(this.mRadiusOverlay.getLocation());
this.mMapView.setZoom(16);
}
this.mMapView.setDoubleTapZoonEnabled(false);
view.findViewById(R.id.my_location).setOnClickListener(this);
view.findViewById(R.id.mark_my_location).setOnClickListener(this);
view.findViewById(R.id.search).setOnClickListener(this);
view.findViewById(R.id.map_mode).setOnClickListener(this);
return view;
}
/**
* (non-Javadoc)
* @see android.support.v4.app.Fragment#onPause()
*/
@Override
public void onPause() {
mSkyHook.removeUpdates();
super.onPause();
}
/**
* (non-Javadoc)
* @see android.support.v4.app.Fragment#onResume()
*/
@Override
public void onResume() {
if(mMapEditToggle.isChecked())
mSkyHook.getUpdates();
super.onResume();
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub
}
@Override
public void onFirstFix(boolean isFirstFix) {
// TODO Auto-generated method stub
}
}

View File

@@ -0,0 +1,244 @@
/**
* RingtoneFragment.java
* @date Aug 6, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui.fragments;
import java.util.Map.Entry;
import android.app.Activity;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.EditText;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
import android.widget.ToggleButton;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.OnContentChangedListener;
import com.TwentyCodes.android.LocationRinger.db.RingerDatabase;
import com.TwentyCodes.android.LocationRinger.debug.Debug;
/**
* This fragment will be for ringtone settings
* @author ricky
*/
public class RingtoneFragment extends Fragment implements OnClickListener, OnCheckedChangeListener, OnSeekBarChangeListener {
private static final String TAG = "RingtoneFragment";
private ToggleButton mRingtoneToggle;
private String mRingtoneURI;
private EditText mRingtone;
private SeekBar mRingtonVolume;
private Button mRingtoneButton;
private int mStream;
private int mType;
private OnContentChangedListener mListener;
private String mKeyEnabled;
private String mKeyUri;
private String mKeyRingtone;
private String mKeyVolume;
private ContentValues mInfo;
public RingtoneFragment(ContentValues info, OnContentChangedListener listener, int stream){
super();
this.mListener = listener;
this.mStream = stream;
this.mInfo = info;
switch(stream){
case AudioManager.STREAM_RING:
mKeyEnabled = RingerDatabase.KEY_RINGTONE_IS_SILENT;
mKeyUri = RingerDatabase.KEY_RINGTONE_URI;
mKeyRingtone = RingerDatabase.KEY_RINGTONE;
mKeyVolume = RingerDatabase.KEY_RINGTONE_VOLUME;
break;
case AudioManager.STREAM_NOTIFICATION:
mKeyEnabled = RingerDatabase.KEY_NOTIFICATION_IS_SILENT;
mKeyUri = RingerDatabase.KEY_NOTIFICATION_RINGTONE_URI;
mKeyRingtone = RingerDatabase.KEY_NOTIFICATION_RINGTONE;
mKeyVolume = RingerDatabase.KEY_NOTIFICATION_RINGTONE_VOLUME;
break;
}
}
/**
* starts the ringtone picker
* @param ringtoneCode RingtoneManager.TYPE_?
* @param uri of current tone
* @author ricky barrette
*/
private void getRingtoneURI(int ringtoneCode, String uri){
Intent intent = new Intent( RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TYPE, ringtoneCode);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TITLE, "Select Tone");
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);
if( uri == null)
try {
uri = RingtoneManager.getActualDefaultRingtoneUri(this.getActivity(), ringtoneCode).toString();
} catch (NullPointerException e) {
e.printStackTrace();
}
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, uri == null ? null : Uri.parse(uri));
startActivityForResult( intent, ringtoneCode);
}
/**
* Called when the ringtone picker activity returns it's result
*/
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == Activity.RESULT_OK) {
Uri tone = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if(tone == null){
this.mRingtone.setText(R.string.silent);
} else {
Ringtone ringtone = RingtoneManager.getRingtone(this.getActivity(), Uri.parse(tone.toString()));
this.mRingtone.setText(ringtone.getTitle(this.getActivity()));
}
if(this.mListener != null){
ContentValues info = new ContentValues();
info.put(this.mKeyRingtone, this.mRingtone.getText().toString());
info.put(this.mKeyUri, tone != null ? tone.toString() : null);
this.mListener.onInfoContentChanged(info);
}
}
}
/**
* Called when a toggle button's state is changed
* @author ricky barrette
*/
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
this.mRingtone.setEnabled(!isChecked);
this.mRingtoneButton.setEnabled(!isChecked);
this.mRingtonVolume.setEnabled(!isChecked);
if(this.mListener != null){
ContentValues info = new ContentValues();
info.put(this.mKeyEnabled, isChecked);
this.mListener.onInfoContentChanged(info);
}
}
/**
* Called when a view is clicked
* @author ricky barrette
*/
@Override
public void onClick(View v) {
getRingtoneURI(this.mType, mRingtoneURI);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.ringtone_fragment, container, false);
AudioManager mAudioManager = (AudioManager) this.getActivity().getSystemService(Context.AUDIO_SERVICE);
if(Debug.DEBUG)
for(Entry<String,Object> item : this.mInfo.valueSet())
Log.d(TAG, item.getKey() +" = "+ item.getValue());
/*
* initialize the views
*/
TextView label = (TextView) view.findViewById(R.id.label);
this.mRingtone = (EditText) view.findViewById(R.id.ringtone);
this.mRingtoneToggle = (ToggleButton) view.findViewById(R.id.ringtone_silent_toggle);
this.mRingtonVolume = (SeekBar) view.findViewById(R.id.ringtone_volume);
this.mRingtoneButton = (Button) view.findViewById(R.id.ringtone_button);
this.mRingtoneButton.setOnClickListener(this);
this.mRingtonVolume.setMax(mAudioManager.getStreamMaxVolume(mStream));
switch(this.mStream){
case AudioManager.STREAM_RING:
label.setText(R.string.ringtone);
mType = RingtoneManager.TYPE_RINGTONE;
break;
case AudioManager.STREAM_NOTIFICATION:
label.setText(R.string.notification_ringtone);
mType = RingtoneManager.TYPE_NOTIFICATION;
break;
}
/*
* ringtone & uri
*/
if(this.mInfo.containsKey(this.mKeyUri) && this.mInfo.containsKey(this.mKeyRingtone)){
this.mRingtone.setText(this.mInfo.getAsString(this.mKeyRingtone));
this.mRingtoneURI = this.mInfo.getAsString(this.mKeyUri);
} else
try {
this.mRingtoneURI = RingtoneManager.getActualDefaultRingtoneUri(this.getActivity(), mType).toString();
this.mRingtone.setText(RingtoneManager.getRingtone(this.getActivity(), Uri.parse(mRingtoneURI)).getTitle(this.getActivity()));
} catch (NullPointerException e) {
e.printStackTrace();
this.mRingtoneToggle.setChecked(true);
}
/*
* volume
*/
if(this.mInfo.containsKey(this.mKeyVolume))
this.mRingtonVolume.setProgress(Integer.parseInt(this.mInfo.getAsString(this.mKeyVolume)));
else
this.mRingtonVolume.setProgress(mAudioManager.getStreamVolume(mStream));
/*
* silent toggle
*/
if(this.mInfo.containsKey(this.mKeyEnabled))
this.mRingtoneToggle.setChecked(!this.mInfo.getAsBoolean(this.mKeyEnabled));
else
this.mRingtoneToggle.setChecked(mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT ? true : false);
/*
* disable views if need be
*/
this.mRingtoneToggle.setOnCheckedChangeListener(this);
this.mRingtone.setEnabled(! mRingtoneToggle.isChecked());
this.mRingtonVolume.setEnabled(! mRingtoneToggle.isChecked());
this.mRingtonVolume.setOnSeekBarChangeListener(this);
return view;
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if(fromUser)
if(this.mListener != null){
ContentValues info = new ContentValues();
info.put(this.mKeyVolume, progress);
this.mListener.onInfoContentChanged(info);
}
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
}

View File

@@ -0,0 +1,69 @@
/**
* ToggleButtonFragment.java
* @date Aug 13, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui.fragments;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.OnContentChangedListener;
import com.TwentyCodes.android.LocationRinger.db.RingerDatabase;
import android.content.ContentValues;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.TextView;
import android.widget.ToggleButton;
/**
* A simple fragment that displays a toggle button and a title label
* @author ricky
*/
public class ToggleButtonFragment extends Fragment implements OnCheckedChangeListener {
private String mTitle;
private String mKey;
private ContentValues mInfo;
private OnContentChangedListener mListener;
/**
* Creates a new ToggleButtonFtagment
* @author ricky barrette
*/
public ToggleButtonFragment(String title, String key, ContentValues info, OnContentChangedListener listener) {
super();
this.mTitle = title;
this.mKey = key;
this.mInfo = info;
this.mListener = listener;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
View view = inflater.inflate(R.layout.toggle_button_fragment, container, false);
TextView t = (TextView) view.findViewById(R.id.label);
t.setText(this.mTitle);
ToggleButton b = (ToggleButton) view.findViewById(R.id.toggle);
if(this.mInfo.containsKey(this.mKey))
b.setChecked(RingerDatabase.parseBoolean(this.mInfo.getAsString(this.mKey)));
b.setOnCheckedChangeListener(this);
return view;
}
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(this.mListener != null){
ContentValues info = new ContentValues();
info.put(this.mKey, isChecked);
this.mListener.onInfoContentChanged(info);
}
}
}

View File

@@ -0,0 +1,123 @@
/**
* AlarmVolumeFragment.java
* @date Aug 7, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.TwentyCodes.android.LocationRinger.ui.fragments;
import java.util.Map.Entry;
import android.content.ContentValues;
import android.content.Context;
import android.media.AudioManager;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
import com.TwentyCodes.android.LocationRinger.R;
import com.TwentyCodes.android.LocationRinger.OnContentChangedListener;
import com.TwentyCodes.android.LocationRinger.db.RingerDatabase;
import com.TwentyCodes.android.LocationRinger.debug.Debug;
/**
* This fragment will represent the volume fragments
* @author ricky
*/
public class VolumeFragment extends Fragment implements OnSeekBarChangeListener {
private static final String TAG = "VolumeFragment";
private AudioManager mAudioManager;
private int mStream;
private OnContentChangedListener mListener;
private String mKey;
private ContentValues mInfo;
public VolumeFragment(ContentValues info, Context context, OnContentChangedListener listener, int stream){
super();
this.mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
this.mStream = stream;
this.mListener = listener;
this.mInfo = info;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if(Debug.DEBUG)
for(Entry<String,Object> item : this.mInfo.valueSet())
Log.d(TAG, item.getKey() +" = "+ item.getValue());
View view = inflater.inflate(R.layout.volume_fragment, container, false);
TextView label = (TextView) view.findViewById(R.id.volume_label);
SeekBar volume = (SeekBar) view.findViewById(R.id.volume);
volume.setMax(this.mAudioManager.getStreamMaxVolume(mStream));
volume.setProgress(this.mAudioManager.getStreamVolume(mStream));
volume.setOnSeekBarChangeListener(this);
switch(this.mStream){
case AudioManager.STREAM_ALARM:
label.setText(R.string.alarm_volume);
this.mKey = RingerDatabase.KEY_ALARM_VOLUME;
break;
case AudioManager.STREAM_DTMF:
label.setText(R.string.dtmf_volume);
this.mKey = RingerDatabase.KEY_DTMF_VOLUME;
break;
case AudioManager.STREAM_MUSIC:
label.setText(R.string.music_volume);
this.mKey = RingerDatabase.KEY_MUSIC_VOLUME;
break;
case AudioManager.STREAM_NOTIFICATION:
label.setText(R.string.notification_volume);
this.mKey = RingerDatabase.KEY_NOTIFICATION_RINGTONE_VOLUME;
break;
case AudioManager.STREAM_RING:
label.setText(R.string.ringtone_volume);
this.mKey = RingerDatabase.KEY_RINGTONE_VOLUME;
break;
case AudioManager.STREAM_SYSTEM:
label.setText(R.string.system_volume);
this.mKey = RingerDatabase.KEY_SYSTEM_VOLUME;
break;
case AudioManager.STREAM_VOICE_CALL:
label.setText(R.string.call_volume);
this.mKey = RingerDatabase.KEY_CALL_VOLUME;
break;
}
if(this.mInfo.containsKey(this.mKey))
volume.setProgress(Integer.parseInt(this.mInfo.getAsString(this.mKey)));
return view;
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if(fromUser)
if(this.mListener != null){
ContentValues info = new ContentValues();
info.put(this.mKey, progress);
this.mListener.onInfoContentChanged(info);
}
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub
}
}

View File

@@ -0,0 +1,45 @@
/**
* FragmentAdapter.java
* @date Aug 6, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.jakewharton.android.viewpagerindicator;
import java.util.ArrayList;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
/**
* This adaptor maintains the How and What fragments
* @author ricky
*/
class FragmentAdapter extends FragmentPagerAdapter {
private ArrayList<Fragment> mFragments;
/**
* Creates a new FragmentAdaptor
* @param fm
* @param fragments to be displayed
* @author ricky barrette
*/
public FragmentAdapter(FragmentManager fm, ArrayList<Fragment> fragments) {
super(fm);
this.mFragments = fragments;
}
@Override
public Fragment getItem(int position) {
return this.mFragments.get(position);
}
@Override
public int getCount() {
return this.mFragments.size();
}
}

View File

@@ -0,0 +1,58 @@
/*
* Copyright (C) 2011 Patrik Akerfeldt
* Copyright (C) 2011 Jake Wharton
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jakewharton.android.viewpagerindicator;
import android.support.v4.view.ViewPager;
/**
* A PageIndicator is responsible to show an visual indicator on the total views
* number and the current visible view.
*/
public interface PageIndicator extends ViewPager.OnPageChangeListener {
/**
* Bind the indicator to a ViewPager.
*
* @param view
*/
public void setViewPager(ViewPager view);
/**
* Bind the indicator to a ViewPager.
*
* @param view
* @param initialPosition
*/
public void setViewPager(ViewPager view, int initialPosition);
/**
* <p>Set the current page of both the ViewPager and indicator.</p>
*
* <p>This <strong>must</strong> be used if you need to set the page before
* the views are drawn on screen (e.g., default start page).</p>
*
* @param item
*/
public void setCurrentItem(int item);
/**
* Set a page change listener which will receive forwarded events.
*
* @param listener
*/
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener);
}

View File

@@ -0,0 +1,630 @@
/*
* Copyright (C) 2011 Patrik Akerfeldt
* Copyright (C) 2011 Francisco Figueiredo Jr.
* Copyright (C) 2011 Jake Wharton
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jakewharton.android.viewpagerindicator;
import java.util.ArrayList;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.TextView;
import com.TwentyCodes.android.LocationRinger.R;
/**
* A TitlePageIndicator is a PageIndicator which displays the title of left view
* (if exist), the title of the current select view (centered) and the title of
* the right view (if exist). When the user scrolls the ViewPager then titles are
* also scrolled.
*/
public class TitlePageIndicator extends TextView implements PageIndicator, View.OnTouchListener {
private static final float UNDERLINE_FADE_PERCENTAGE = 0.25f;
public enum IndicatorStyle {
None(0), Triangle(1), Underline(2);
public final int value;
private IndicatorStyle(int value) {
this.value = value;
}
public static IndicatorStyle fromValue(int value) {
for (IndicatorStyle style : IndicatorStyle.values()) {
if (style.value == value) {
return style;
}
}
return null;
}
}
private ViewPager mViewPager;
private ViewPager.OnPageChangeListener mListener;
private TitleProvider mTitleProvider;
private int mCurrentPage;
private int mCurrentOffset;
private final Paint mPaintText;
private final Paint mPaintSelected;
private Path mPath;
private final Paint mPaintFooterLine;
private IndicatorStyle mFooterIndicatorStyle;
private final Paint mPaintFooterIndicator;
private float mFooterIndicatorHeight;
private float mFooterIndicatorPadding;
private float mFooterIndicatorUnderlinePadding;
private float mTitlePadding;
/** Left and right side padding for not active view titles. */
private float mClipPadding;
private float mFooterLineHeight;
public TitlePageIndicator(Context context) {
this(context, null);
}
public TitlePageIndicator(Context context, AttributeSet attrs) {
this(context, attrs, R.attr.titlePageIndicatorStyle);
}
public TitlePageIndicator(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
super.setOnTouchListener(this);
//Load defaults from resources
final Resources res = getResources();
final int defaultFooterColor = res.getColor(R.color.default_title_indicator_footer_color);
final float defaultFooterLineHeight = res.getDimension(R.dimen.default_title_indicator_footer_line_height);
final int defaultFooterIndicatorStyle = res.getInteger(R.integer.default_title_indicator_footer_indicator_style);
final float defaultFooterIndicatorHeight = res.getDimension(R.dimen.default_title_indicator_footer_indicator_height);
final float defaultFooterIndicatorPadding = res.getDimension(R.dimen.default_title_indicator_footer_indicator_padding);
final float defaultFooterIndicatorUnderlinePadding = res.getDimension(R.dimen.default_title_indicator_footer_indicator_underline_padding);
final int defaultSelectedColor = res.getColor(R.color.default_title_indicator_selected_color);
final boolean defaultSelectedBold = res.getBoolean(R.bool.default_title_indicator_selected_bold);
final int defaultTextColor = res.getColor(R.color.default_title_indicator_text_color);
final float defaultTextSize = res.getDimension(R.dimen.default_title_indicator_text_size);
final float defaultTitlePadding = res.getDimension(R.dimen.default_title_indicator_title_padding);
final float defaultClipPadding = res.getDimension(R.dimen.default_title_indicator_clip_padding);
//Retrieve styles attributes
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TitlePageIndicator, defStyle, R.style.Widget_TitlePageIndicator);
//Retrieve the colors to be used for this view and apply them.
mFooterLineHeight = a.getDimension(R.styleable.TitlePageIndicator_footerLineHeight, defaultFooterLineHeight);
mFooterIndicatorStyle = IndicatorStyle.fromValue(a.getInteger(R.styleable.TitlePageIndicator_footerIndicatorStyle, defaultFooterIndicatorStyle));
mFooterIndicatorHeight = a.getDimension(R.styleable.TitlePageIndicator_footerIndicatorHeight, defaultFooterIndicatorHeight);
mFooterIndicatorPadding = a.getDimension(R.styleable.TitlePageIndicator_footerIndicatorPadding, defaultFooterIndicatorPadding);
mFooterIndicatorUnderlinePadding = a.getDimension(R.styleable.TitlePageIndicator_footerIndicatorUnderlinePadding, defaultFooterIndicatorUnderlinePadding);
mTitlePadding = a.getDimension(R.styleable.TitlePageIndicator_titlePadding, defaultTitlePadding);
mClipPadding = a.getDimension(R.styleable.TitlePageIndicator_clipPadding, defaultClipPadding);
final float textSize = a.getDimension(R.styleable.TitlePageIndicator_textSize, defaultTextSize);
final int footerColor = a.getColor(R.styleable.TitlePageIndicator_footerColor, defaultFooterColor);
mPaintText = new Paint();
mPaintText.setColor(a.getColor(R.styleable.TitlePageIndicator_textColor, defaultTextColor));
mPaintText.setTextSize(textSize);
mPaintText.setAntiAlias(true);
mPaintSelected = new Paint();
mPaintSelected.setColor(a.getColor(R.styleable.TitlePageIndicator_selectedColor, defaultSelectedColor));
mPaintSelected.setTextSize(textSize);
mPaintSelected.setFakeBoldText(a.getBoolean(R.styleable.TitlePageIndicator_selectedBold, defaultSelectedBold));
mPaintSelected.setAntiAlias(true);
mPaintFooterLine = new Paint();
mPaintFooterLine.setStyle(Paint.Style.FILL_AND_STROKE);
mPaintFooterLine.setStrokeWidth(mFooterLineHeight);
mPaintFooterLine.setColor(footerColor);
mPaintFooterIndicator = new Paint();
mPaintFooterIndicator.setStyle(Paint.Style.FILL_AND_STROKE);
mPaintFooterIndicator.setColor(footerColor);
a.recycle();
}
public int getFooterColor() {
return mPaintFooterLine.getColor();
}
public void setFooterColor(int footerColor) {
mPaintFooterLine.setColor(footerColor);
invalidate();
}
public float getFooterLineHeight() {
return mFooterLineHeight;
}
public void setFooterLineHeight(float footerLineHeight) {
mFooterLineHeight = footerLineHeight;
invalidate();
}
public float getFooterIndicatorHeight() {
return mFooterIndicatorHeight;
}
public void setFooterIndicatorHeight(float footerTriangleHeight) {
mFooterIndicatorHeight = footerTriangleHeight;
invalidate();
}
public IndicatorStyle getFooterIndicatorStyle() {
return mFooterIndicatorStyle;
}
public void setFooterIndicatorStyle(IndicatorStyle indicatorStyle) {
mFooterIndicatorStyle = indicatorStyle;
invalidate();
}
public int getSelectedColor() {
return mPaintSelected.getColor();
}
public void setSelectedColor(int selectedColor) {
mPaintSelected.setColor(selectedColor);
invalidate();
}
public boolean isSelectedBold() {
return mPaintSelected.isFakeBoldText();
}
public void setSelectedBold(boolean selectedBold) {
mPaintSelected.setFakeBoldText(selectedBold);
invalidate();
}
public int getTextColor() {
return mPaintText.getColor();
}
public void setTextColor(int textColor) {
mPaintText.setColor(textColor);
invalidate();
}
public float getTextSize() {
return mPaintText.getTextSize();
}
public void setTextSize(float textSize) {
mPaintText.setTextSize(textSize);
invalidate();
}
public float getTitlePadding() {
return this.mTitlePadding;
}
public void setTitlePadding(float titlePadding) {
mTitlePadding = titlePadding;
invalidate();
}
public float getClipPadding() {
return this.mClipPadding;
}
public void setClipPadding(float clipPadding) {
mClipPadding = clipPadding;
invalidate();
}
/*
* (non-Javadoc)
*
* @see android.view.View#onDraw(android.graphics.Canvas)
*/
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
//Calculate views bounds
ArrayList<Rect> bounds = calculateAllBounds(mPaintText);
final int count = mViewPager.getAdapter().getCount();
final int countMinusOne = count - 1;
final int halfWidth = getWidth() / 2;
final int left = getLeft();
final int width = getWidth();
final int height = getHeight();
final int leftPlusWidth = left + width;
//Verify if the current view must be clipped to the screen
Rect curViewBound = bounds.get(mCurrentPage);
int curViewWidth = curViewBound.right - curViewBound.left;
if (curViewBound.left < 0) {
//Try to clip to the screen (left side)
clipViewOnTheLeft(curViewBound, curViewWidth);
}
if (curViewBound.right > leftPlusWidth) {
//Try to clip to the screen (right side)
clipViewOnTheRight(curViewBound, curViewWidth, leftPlusWidth);
}
//Left views starting from the current position
if (mCurrentPage > 0) {
for (int i = mCurrentPage - 1; i >= 0; i--) {
Rect bound = bounds.get(i);
int w = bound.right - bound.left;
//Is left side is outside the screen
if (bound.left < 0) {
//Try to clip to the screen (left side)
clipViewOnTheLeft(bound, w);
//Except if there's an intersection with the right view
if (i < countMinusOne && mCurrentPage != i) {
Rect rightBound = bounds.get(i + 1);
//Intersection
if (bound.right + (int)mTitlePadding > rightBound.left) {
bound.left = rightBound.left - (w + (int)mTitlePadding);
}
}
}
}
}
//Right views starting from the current position
if (mCurrentPage < countMinusOne) {
for (int i = mCurrentPage + 1 ; i < count; i++) {
Rect bound = bounds.get(i);
int w = bound.right - bound.left;
//If right side is outside the screen
if (bound.right > leftPlusWidth) {
//Try to clip to the screen (right side)
clipViewOnTheRight(bound, w, leftPlusWidth);
//Except if there's an intersection with the left view
if (i > 0 && mCurrentPage != i) {
Rect leftBound = bounds.get(i - 1);
//Intersection
if (bound.left - (int)mTitlePadding < leftBound.right) {
bound.left = leftBound.right + (int)mTitlePadding;
}
}
}
}
}
//Now draw views
for (int i = 0; i < count; i++) {
//Get the title
Rect bound = bounds.get(i);
//Only if one side is visible
if ((bound.left > left && bound.left < leftPlusWidth) || (bound.right > left && bound.right < leftPlusWidth)) {
Paint paint = mPaintText;
//Change the color is the title is closed to the center
int middle = (bound.left + bound.right) / 2;
if (Math.abs(middle - halfWidth) < 20) {
paint = mPaintSelected;
}
canvas.drawText(mTitleProvider.getTitle(i), bound.left, bound.bottom, paint);
}
}
//Draw the footer line
mPath = new Path();
mPath.moveTo(0, height - mFooterLineHeight);
mPath.lineTo(width, height - mFooterLineHeight);
mPath.close();
canvas.drawPath(mPath, mPaintFooterLine);
switch (mFooterIndicatorStyle) {
case Triangle:
mPath = new Path();
mPath.moveTo(halfWidth, height - mFooterLineHeight - mFooterIndicatorHeight);
mPath.lineTo(halfWidth + mFooterIndicatorHeight, height - mFooterLineHeight);
mPath.lineTo(halfWidth - mFooterIndicatorHeight, height - mFooterLineHeight);
mPath.close();
canvas.drawPath(mPath, mPaintFooterIndicator);
break;
case Underline:
float deltaPercentage = mCurrentOffset * 1.0f / width;
int alpha = 0xFF;
int page = mCurrentPage;
if (deltaPercentage <= UNDERLINE_FADE_PERCENTAGE) {
alpha = (int)(0xFF * ((UNDERLINE_FADE_PERCENTAGE - deltaPercentage) / UNDERLINE_FADE_PERCENTAGE));
} else if (deltaPercentage >= (1 - UNDERLINE_FADE_PERCENTAGE)) {
alpha = (int)(0xFF * ((deltaPercentage - (1 - UNDERLINE_FADE_PERCENTAGE)) / UNDERLINE_FADE_PERCENTAGE));
page += 1; //We are coming into the next page
} else if (mCurrentOffset != 0) {
break; //Not in underline scope
}
Rect underlineBounds = bounds.get(page);
mPath = new Path();
mPath.moveTo(underlineBounds.left - mFooterIndicatorUnderlinePadding, height - mFooterLineHeight);
mPath.lineTo(underlineBounds.right + mFooterIndicatorUnderlinePadding, height - mFooterLineHeight);
mPath.lineTo(underlineBounds.right + mFooterIndicatorUnderlinePadding, height - mFooterLineHeight - mFooterIndicatorHeight);
mPath.lineTo(underlineBounds.left - mFooterIndicatorUnderlinePadding, height - mFooterLineHeight - mFooterIndicatorHeight);
mPath.close();
mPaintFooterIndicator.setAlpha(alpha);
canvas.drawPath(mPath, mPaintFooterIndicator);
mPaintFooterIndicator.setAlpha(0xFF);
break;
}
}
@Override
public final boolean onTouch(View view, MotionEvent event) {
if ((view != this) || (event.getAction() != MotionEvent.ACTION_DOWN)) {
return false;
}
final int count = mViewPager.getAdapter().getCount();
final float halfWidth = getWidth() / 2;
final float sixthWidth = getWidth() / 6;
if ((mCurrentPage > 0) && (event.getX() < halfWidth - sixthWidth)) {
mViewPager.setCurrentItem(mCurrentPage - 1);
return true;
} else if ((mCurrentPage < count - 1) && (event.getX() > halfWidth + sixthWidth)) {
mViewPager.setCurrentItem(mCurrentPage + 1);
return true;
}
return false;
}
@Override
public final void setOnTouchListener(OnTouchListener listener) {
throw new UnsupportedOperationException("This view does not support listening to its touch events.");
}
/**
* Set bounds for the right textView including clip padding.
*
* @param curViewBound
* current bounds.
* @param curViewWidth
* width of the view.
*/
private void clipViewOnTheRight(Rect curViewBound, int curViewWidth, int leftPlusWidth) {
curViewBound.right = leftPlusWidth - (int)mClipPadding;
curViewBound.left = curViewBound.right - curViewWidth;
}
/**
* Set bounds for the left textView including clip padding.
*
* @param curViewBound
* current bounds.
* @param curViewWidth
* width of the view.
*/
private void clipViewOnTheLeft(Rect curViewBound, int curViewWidth) {
curViewBound.left = 0 + (int)mClipPadding;
curViewBound.right = curViewWidth;
}
/**
* Calculate views bounds and scroll them according to the current index
*
* @param paint
* @param currentIndex
* @return
*/
private ArrayList<Rect> calculateAllBounds(Paint paint) {
ArrayList<Rect> list = new ArrayList<Rect>();
//For each views (If no values then add a fake one)
final int count = mViewPager.getAdapter().getCount();
final int width = getWidth();
final int halfWidth = width / 2;
for (int i = 0; i < count; i++) {
Rect bounds = calcBounds(i, paint);
int w = (bounds.right - bounds.left);
int h = (bounds.bottom - bounds.top);
bounds.left = (halfWidth) - (w / 2) - mCurrentOffset + ((i - mCurrentPage) * width);
bounds.right = bounds.left + w;
bounds.top = 0;
bounds.bottom = h;
list.add(bounds);
}
return list;
}
/**
* Calculate the bounds for a view's title
*
* @param index
* @param paint
* @return
*/
private Rect calcBounds(int index, Paint paint) {
//Calculate the text bounds
Rect bounds = new Rect();
bounds.right = (int)paint.measureText(mTitleProvider.getTitle(index));
bounds.bottom = (int)(paint.descent() - paint.ascent());
return bounds;
}
@Override
public void setViewPager(ViewPager view) {
if (view.getAdapter() == null) {
throw new IllegalStateException("ViewPager does not have adapter instance.");
}
if (!(view.getAdapter() instanceof TitleProvider)) {
throw new IllegalStateException("ViewPager adapter must implement TitleProvider to be used with TitlePageIndicator.");
}
mViewPager = view;
mViewPager.setOnPageChangeListener(this);
mTitleProvider = (TitleProvider)mViewPager.getAdapter();
invalidate();
}
@Override
public void setViewPager(ViewPager view, int initialPosition) {
setViewPager(view);
setCurrentItem(initialPosition);
}
@Override
public void setCurrentItem(int item) {
if (mViewPager == null) {
throw new IllegalStateException("ViewPager has not been bound.");
}
mViewPager.setCurrentItem(item);
mCurrentPage = item;
invalidate();
}
@Override
public void onPageScrollStateChanged(int state) {
if (mListener != null) {
mListener.onPageScrollStateChanged(state);
}
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
mCurrentPage = position;
mCurrentOffset = positionOffsetPixels;
invalidate();
if (mListener != null) {
mListener.onPageScrolled(position, positionOffset, positionOffsetPixels);
}
}
@Override
public void onPageSelected(int position) {
if (mListener != null) {
mListener.onPageSelected(position);
}
}
@Override
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
mListener = listener;
}
/*
* (non-Javadoc)
*
* @see android.view.View#onMeasure(int, int)
*/
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
setMeasuredDimension(measureWidth(widthMeasureSpec), measureHeight(heightMeasureSpec));
}
/**
* Determines the width of this view
*
* @param measureSpec
* A measureSpec packed into an int
* @return The width of the view, honoring constraints from measureSpec
*/
private int measureWidth(int measureSpec) {
int result = 0;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);
if (specMode != MeasureSpec.EXACTLY) {
throw new IllegalStateException(getClass().getSimpleName() + " can only be used in EXACTLY mode.");
}
result = specSize;
return result;
}
/**
* Determines the height of this view
*
* @param measureSpec
* A measureSpec packed into an int
* @return The height of the view, honoring constraints from measureSpec
*/
private int measureHeight(int measureSpec) {
float result = 0;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);
if (specMode == MeasureSpec.EXACTLY) {
//We were told how big to be
result = specSize;
} else {
//Calculate the text bounds
Rect bounds = new Rect();
bounds.bottom = (int) (mPaintText.descent()-mPaintText.ascent());
result = bounds.bottom - bounds.top + mFooterLineHeight;
if (mFooterIndicatorStyle != IndicatorStyle.None) {
result += mFooterIndicatorHeight + mFooterIndicatorPadding;
}
}
return (int)result;
}
@Override
public void onRestoreInstanceState(Parcelable state) {
SavedState savedState = (SavedState)state;
super.onRestoreInstanceState(savedState.getSuperState());
mCurrentPage = savedState.currentPage;
requestLayout();
}
@Override
public Parcelable onSaveInstanceState() {
setFreezesText(true);
Parcelable superState = super.onSaveInstanceState();
SavedState savedState = new SavedState(superState);
savedState.currentPage = mCurrentPage;
return savedState;
}
static class SavedState extends BaseSavedState {
int currentPage;
public SavedState(Parcelable superState) {
super(superState);
}
private SavedState(Parcel in) {
super(in);
currentPage = in.readInt();
}
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeInt(currentPage);
}
public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<SavedState>() {
@Override
public SavedState createFromParcel(Parcel in) {
return new SavedState(in);
}
@Override
public SavedState[] newArray(int size) {
return new SavedState[size];
}
};
}
}

View File

@@ -0,0 +1,28 @@
/*
* Copyright (C) 2011 Patrik Akerfeldt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jakewharton.android.viewpagerindicator;
/**
* A TitleProvider provides the title to display according to a view.
*/
public interface TitleProvider {
/**
* Returns the title of the view at position
* @param position
* @return
*/
public String getTitle(int position);
}

View File

@@ -0,0 +1,38 @@
/**
* TitleFragmentAdapter.java
* @date Aug 6, 2011
* @author Twenty Codes, LLC
* @author ricky barrette
*/
package com.jakewharton.android.viewpagerindicator;
import java.util.ArrayList;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
/**
* This adaptor maintains a ViewPager title indicator.
* @author ricky
*/
public class TitledFragmentAdapter extends FragmentAdapter implements TitleProvider {
private String[] mTitles;
/**
* Creates a new TitleFragmentAdapter
* @param fm
* @param fragments to be displayed
* @param titles for the fragments
* @author ricky barrette
*/
public TitledFragmentAdapter(FragmentManager fm, ArrayList<Fragment> fragments, String[] titles) {
super(fm, fragments);
this.mTitles = titles;
}
@Override
public String getTitle(int position) {
return this.mTitles[position];
}
}