Import to intelij, started updating to use maps v2
This commit is contained in:
9
.idea/libraries/android_support_v13.xml
generated
Normal file
9
.idea/libraries/android_support_v13.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="android-support-v13">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/LocationRinger/libs/android-support-v13.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
9
.idea/libraries/google_play_services.xml
generated
Normal file
9
.idea/libraries/google_play_services.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="google-play-services">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/google-play-services_lib/libs/google-play-services.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
125
.idea/uiDesigner.xml
generated
Normal file
125
.idea/uiDesigner.xml
generated
Normal file
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.RickBarrette.android.LocationRinger"
|
||||
android:installLocation="internalOnly"
|
||||
android:versionCode="236"
|
||||
android:versionName="ff72f9d" >
|
||||
android:versionCode="248"
|
||||
android:versionName="8cc52de" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="8" />
|
||||
<uses-sdk android:minSdkVersion="11" />
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.location"
|
||||
@@ -42,9 +42,6 @@
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.Custom" >
|
||||
<uses-library
|
||||
android:name="com.google.android.maps"
|
||||
android:required="true" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.ListActivity"
|
||||
@@ -60,8 +57,6 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<uses-library android:name="com.google.android.maps" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.RingerInformationActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
|
||||
@@ -140,6 +135,26 @@
|
||||
<action android:name="android.bluetooth.device.action.ACL_DISCONNECTED"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.version"
|
||||
android:value="@integer/google_play_services_version" />
|
||||
|
||||
<!--
|
||||
Maps V1
|
||||
ricky beta release 0rKmsWMM0D-IRAEgcSZEqwZCs_8AUwxjYjj0bnA
|
||||
ricky 0rKmsWMM0D-LWOndcfwrmW-S0OXlnQl2SJCMeTg
|
||||
TWENTYCODES 0rKmsWMM0D-K15bEM_kwabPbNhsn4dp4rcq2q5Q
|
||||
-->
|
||||
|
||||
<!--
|
||||
Maps v2
|
||||
Debug AIzaSyCSqR3sQvE957QUuSfrIgLdhmneB__ljXQ
|
||||
-->
|
||||
<meta-data
|
||||
android:name="com.google.android.maps.v2.API_KEY"
|
||||
android:value="AIzaSyCSqR3sQvE957QUuSfrIgLdhmneB__ljXQ"/>
|
||||
</application>
|
||||
|
||||
|
||||
</manifest>
|
||||
36
LocationRinger/LocationRinger.iml
Normal file
36
LocationRinger/LocationRinger.iml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="EclipseModuleManager" forced_jdk="true">
|
||||
<conelement value="com.android.ide.eclipse.adt.DEPENDENCIES" />
|
||||
<src_description expected_position="1">
|
||||
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
|
||||
<src_folder value="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" expected_position="1" />
|
||||
<src_folder value="file://$MODULE_DIR$/gen" expected_position="2" />
|
||||
<src_folder value="com.android.ide.eclipse.adt.LIBRARIES" expected_position="3" />
|
||||
</src_description>
|
||||
</component>
|
||||
<component name="FacetManager">
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<option name="UPDATE_PROPERTY_FILES" value="true" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/bin/classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$" type="java-resource" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android 4.3 Google APIs" jdkType="Android SDK" />
|
||||
<orderEntry type="module" module-name="ExceptionHandlerLib" />
|
||||
<orderEntry type="module" module-name="LocationLib" />
|
||||
<orderEntry type="module" module-name="google-play-services_lib" />
|
||||
<orderEntry type="library" name="google-play-services" level="project" />
|
||||
<orderEntry type="library" name="android-support-v13" level="project" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
BIN
LocationRinger/libs/android-support-v13.jar
Normal file
BIN
LocationRinger/libs/android-support-v13.jar
Normal file
Binary file not shown.
@@ -7,9 +7,10 @@
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
android.library.reference.1=../exception_handler_library/ExceptionHandlerLib
|
||||
android.library.reference.2=../location_library/LocationLib
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard.cfg
|
||||
# Project target.
|
||||
target=Google Inc.:Google APIs:17
|
||||
target=Google Inc.:Google APIs:18
|
||||
android.library.reference.1=../exception_handler_library/ExceptionHandlerLib
|
||||
android.library.reference.2=../location_library/LocationLib
|
||||
android.library.reference.3=../google-play-services_lib
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ public class ListActivity extends Activity implements OnItemClickListener, OnCli
|
||||
@Override
|
||||
public void onItemClick(final AdapterView<?> arg0, final View v, final int postion, final long id) {
|
||||
|
||||
final ProgressDialog progress = ProgressDialog.show(this, "", getText(R.string.loading), true, true);
|
||||
final ProgressDialog progress = null; //ProgressDialog.show(this.getParent(), "", getText(R.string.loading), true, true);
|
||||
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
|
||||
@@ -67,7 +67,6 @@ public class RingerInformationActivity extends FragmentActivity implements OnCon
|
||||
/**
|
||||
* Called when the activity is first created (non-Javadoc)
|
||||
*
|
||||
* @see android.support.v4.app.FragmentActivity#onCreate(android.os.Bundle)
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
|
||||
@@ -6,13 +6,6 @@
|
||||
*/
|
||||
package org.RickBarrette.android.LocationRinger.ui.fragments;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.RickBarrette.android.LocationRinger.Log;
|
||||
import org.RickBarrette.android.LocationRinger.OnContentChangedListener;
|
||||
import org.RickBarrette.android.LocationRinger.R;
|
||||
import org.RickBarrette.android.LocationRinger.db.RingerDatabase;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
@@ -28,6 +21,12 @@ import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ToggleButton;
|
||||
import org.RickBarrette.android.LocationRinger.Log;
|
||||
import org.RickBarrette.android.LocationRinger.OnContentChangedListener;
|
||||
import org.RickBarrette.android.LocationRinger.R;
|
||||
import org.RickBarrette.android.LocationRinger.db.RingerDatabase;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
* This fragment will used to allow the user to enter/edit ringer information
|
||||
|
||||
@@ -6,17 +6,16 @@
|
||||
*/
|
||||
package org.RickBarrette.android.LocationRinger.ui.fragments;
|
||||
|
||||
import org.RickBarrette.android.LocationRinger.FeatureRemovedListener;
|
||||
import org.RickBarrette.android.LocationRinger.R;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import org.RickBarrette.android.LocationRinger.FeatureRemovedListener;
|
||||
import org.RickBarrette.android.LocationRinger.R;
|
||||
|
||||
/**
|
||||
* This is a simple extention of a fragment that will allow for storage of an id
|
||||
|
||||
@@ -6,13 +6,6 @@
|
||||
*/
|
||||
package org.RickBarrette.android.LocationRinger.ui.fragments;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.RickBarrette.android.LocationRinger.FeatureRemovedListener;
|
||||
import org.RickBarrette.android.LocationRinger.OnContentChangedListener;
|
||||
import org.RickBarrette.android.LocationRinger.R;
|
||||
import org.RickBarrette.android.LocationRinger.db.RingerDatabase;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ContentValues;
|
||||
@@ -27,6 +20,12 @@ import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
import org.RickBarrette.android.LocationRinger.FeatureRemovedListener;
|
||||
import org.RickBarrette.android.LocationRinger.OnContentChangedListener;
|
||||
import org.RickBarrette.android.LocationRinger.R;
|
||||
import org.RickBarrette.android.LocationRinger.db.RingerDatabase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* This fragment will be used to display a list of features
|
||||
@@ -48,7 +47,7 @@ public class FeatureListFragment extends BaseFragmentListFragment implements OnC
|
||||
private final ArrayList<Integer> mAdded;
|
||||
|
||||
/**
|
||||
* Creates a new empty feature list fragment
|
||||
* Creates a new .gitkeep feature list fragment
|
||||
*
|
||||
* @param info
|
||||
* @param listener
|
||||
|
||||
@@ -6,15 +6,6 @@
|
||||
*/
|
||||
package org.RickBarrette.android.LocationRinger.ui.fragments;
|
||||
|
||||
import org.RickBarrette.android.LocationRinger.Constraints;
|
||||
import org.RickBarrette.android.LocationRinger.EnableScrollingListener;
|
||||
import org.RickBarrette.android.LocationRinger.Log;
|
||||
import org.RickBarrette.android.LocationRinger.OnContentChangedListener;
|
||||
import org.RickBarrette.android.LocationRinger.R;
|
||||
import org.RickBarrette.android.LocationRinger.SearchRequestedListener;
|
||||
import org.RickBarrette.android.LocationRinger.db.RingerDatabase;
|
||||
import org.RickBarrette.android.LocationRinger.ui.SearchDialog;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ContentValues;
|
||||
import android.os.Bundle;
|
||||
@@ -23,20 +14,21 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.*;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import com.TwentyCodes.android.location.AndroidGPS;
|
||||
import com.TwentyCodes.android.location.GeoPointLocationListener;
|
||||
import com.TwentyCodes.android.location.GeoUtils;
|
||||
import com.TwentyCodes.android.location.LatLngListener;
|
||||
import com.TwentyCodes.android.location.OnLocationSelectedListener;
|
||||
import com.TwentyCodes.android.overlays.RadiusOverlay;
|
||||
import com.google.android.maps.GeoPoint;
|
||||
import com.google.android.gms.maps.CameraUpdateFactory;
|
||||
import com.google.android.gms.maps.GoogleMap;
|
||||
import com.google.android.gms.maps.MapFragment;
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
import org.RickBarrette.android.LocationRinger.*;
|
||||
import org.RickBarrette.android.LocationRinger.db.RingerDatabase;
|
||||
import org.RickBarrette.android.LocationRinger.ui.SearchDialog;
|
||||
|
||||
/**
|
||||
* This fragment will be used to display and allow the user to edit the ringers
|
||||
@@ -45,7 +37,7 @@ import com.google.android.maps.GeoPoint;
|
||||
* @author ricky
|
||||
*/
|
||||
@SuppressLint("ValidFragment")
|
||||
public class LocationInfomationFragment extends Fragment implements GeoPointLocationListener, OnClickListener, OnCheckedChangeListener, OnSeekBarChangeListener,
|
||||
public class LocationInfomationFragment extends Fragment implements LatLngListener, OnClickListener, OnCheckedChangeListener, OnSeekBarChangeListener,
|
||||
OnLocationSelectedListener, SearchRequestedListener {
|
||||
|
||||
private static final String TAG = "RingerInformationHowActivity";
|
||||
@@ -56,7 +48,7 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
private MapFragment mMap;
|
||||
private ToggleButton mMapEditToggle;
|
||||
private RadiusOverlay mRadiusOverlay;
|
||||
private GeoPoint mPoint;
|
||||
private LatLng mPoint;
|
||||
private AndroidGPS mGPS;
|
||||
private View view;
|
||||
private TextView mRadiusTextView;
|
||||
@@ -65,7 +57,6 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
* Creates a new MapFragment
|
||||
*
|
||||
* @author ricky barrette
|
||||
* @param ringerInformationActivity
|
||||
*/
|
||||
public LocationInfomationFragment(final ContentValues info, final OnContentChangedListener listener, final EnableScrollingListener enabledListener) {
|
||||
mInfo = info;
|
||||
@@ -85,18 +76,18 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
if (mEnableScrollingListener != null)
|
||||
mEnableScrollingListener.setScrollEnabled(!isChecked);
|
||||
|
||||
if (isChecked) {
|
||||
mGPS.enableLocationUpdates(this);
|
||||
mMap.enableGPSProgess();
|
||||
} else {
|
||||
mGPS.disableLocationUpdates();
|
||||
mMap.disableGPSProgess();
|
||||
}
|
||||
|
||||
mMap.setDoubleTapZoonEnabled(isChecked);
|
||||
// buttons
|
||||
mMap.setBuiltInZoomControls(isChecked);
|
||||
mMap.setClickable(isChecked);
|
||||
// /*if (isChecked) {
|
||||
// mGPS.enableLocationUpdates(this);
|
||||
// mMap.enableGPSProgess();
|
||||
// } else {
|
||||
// mGPS.disableLocationUpdates();
|
||||
// mMap.disableGPSProgess();
|
||||
// }
|
||||
//
|
||||
// mMap.setDoubleTapZoonEnabled(isChecked);
|
||||
// // buttons
|
||||
// mMap.setBuiltInZoomControls(isChecked);
|
||||
// mMap.setClickable(isChecked);*/
|
||||
mRadius.setEnabled(isChecked);
|
||||
Toast.makeText(getActivity(), isChecked ? getString(R.string.map_editing_enabled) : getString(R.string.map_editiing_disabled), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -115,10 +106,10 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
break;
|
||||
case R.id.my_location:
|
||||
if (mPoint != null)
|
||||
mMap.setMapCenter(mPoint);
|
||||
mMap.getMap().moveCamera(CameraUpdateFactory.newLatLng(mPoint));
|
||||
break;
|
||||
case R.id.map_mode:
|
||||
mMap.setSatellite(mMap.isSatellite() ? false : true);
|
||||
mMap.getMap().setMapType(mMap.getMap().getMapType() == GoogleMap.MAP_TYPE_NORMAL ? GoogleMap.MAP_TYPE_NORMAL : GoogleMap.MAP_TYPE_SATELLITE);
|
||||
break;
|
||||
case R.id.search:
|
||||
new SearchDialog(getActivity(), this).show();
|
||||
@@ -132,34 +123,39 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
|
||||
mGPS = new AndroidGPS(getActivity());
|
||||
|
||||
mMap = (MapFragment) getFragmentManager().findFragmentById(R.id.mapview);
|
||||
// mMap = (MapFragment) getFragmentManager().findFragmentById(R.id.mapview);
|
||||
mRadius = (SeekBar) view.findViewById(R.id.radius);
|
||||
mRadiusTextView = (TextView) view.findViewById(R.id.radius_textview);
|
||||
mRadius.setMax(Constraints.MAX_RADIUS_IN_METERS);
|
||||
mMap.setClickable(false);
|
||||
|
||||
//TODO extend GoogleMap to intercept clicks
|
||||
// mMap.setClickable(false);
|
||||
|
||||
mMapEditToggle = (ToggleButton) view.findViewById(R.id.map_edit_toggle);
|
||||
mMapEditToggle.setChecked(false);
|
||||
mMapEditToggle.setOnCheckedChangeListener(this);
|
||||
mRadiusOverlay = new RadiusOverlay();
|
||||
mRadiusOverlay.setLocationSelectedListener(this);
|
||||
mRadius.setOnSeekBarChangeListener(this);
|
||||
mMap.addOverlay(mRadiusOverlay);
|
||||
mMap.getMap().addCircle(mRadiusOverlay.getCircleOptions());
|
||||
mRadius.setEnabled(false);
|
||||
|
||||
if (mInfo.get(RingerDatabase.KEY_LOCATION) != null) {
|
||||
final String[] point = mInfo.getAsString(RingerDatabase.KEY_LOCATION).split(",");
|
||||
mRadiusOverlay.setLocation(new GeoPoint(Integer.parseInt(point[0]), Integer.parseInt(point[1])));
|
||||
mRadiusOverlay.setLocation(new LatLng(Integer.parseInt(point[0]), Integer.parseInt(point[1])));
|
||||
}
|
||||
|
||||
if (mInfo.get(RingerDatabase.KEY_RADIUS) != null)
|
||||
mRadius.setProgress(mInfo.getAsInteger(RingerDatabase.KEY_RADIUS));
|
||||
|
||||
if (mRadiusOverlay.getLocation() != null) {
|
||||
mMap.setMapCenter(mRadiusOverlay.getLocation());
|
||||
mMap.setZoom(16);
|
||||
mMap.getMap().moveCamera(CameraUpdateFactory.newLatLng(mRadiusOverlay.getLocation()));
|
||||
//todo zoom
|
||||
// mMap.setZoom(16);
|
||||
}
|
||||
|
||||
mMap.setDoubleTapZoonEnabled(false);
|
||||
//
|
||||
// mMap.setDoubleTapZoonEnabled(false);
|
||||
|
||||
view.findViewById(R.id.my_location).setOnClickListener(this);
|
||||
view.findViewById(R.id.mark_my_location).setOnClickListener(this);
|
||||
@@ -172,26 +168,28 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
/**
|
||||
* Called when the location is a first fix (non-Javadoc)
|
||||
*
|
||||
* @see com.TwentyCodes.android.location.GeoPointLocationListener#onFirstFix(boolean)
|
||||
* todo fix this
|
||||
*
|
||||
* @see com.TwentyCodes.android.location.LatLngListener#onFirstFix(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void onFirstFix(final boolean isFirstFix) {
|
||||
if (mPoint != 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 (isFirstFix) {
|
||||
mMap.disableGPSProgess();
|
||||
if (mRadiusOverlay.getLocation() == null)
|
||||
if (mMap != null) {
|
||||
mMap.setMapCenter(mPoint);
|
||||
mMap.setZoom(mMap.getMap().getMaxZoomLevel() - 5);
|
||||
}
|
||||
}
|
||||
} else
|
||||
mMap.enableGPSProgess();
|
||||
// if (mPoint != 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 (isFirstFix) {
|
||||
// mMap.disableGPSProgess();
|
||||
// if (mRadiusOverlay.getLocation() == null)
|
||||
// if (mMap != null) {
|
||||
// mMap.setMapCenter(mPoint);
|
||||
// mMap.setZoom(mMap.getMap().getMaxZoomLevel() - 5);
|
||||
// }
|
||||
// }
|
||||
// } else
|
||||
// mMap.enableGPSProgess();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,17 +198,17 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
* @author ricky barrette
|
||||
*/
|
||||
@Override
|
||||
public void onLocationChanged(final GeoPoint point, final int accuracy) {
|
||||
public void onLocationChanged(final LatLng point, final int accuracy) {
|
||||
mPoint = point;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a location has been selected (non-Javadoc)
|
||||
*
|
||||
* @see com.TwentyCodes.android.location.OnLocationSelectedListener#onLocationSelected(com.google.android.maps.GeoPoint)
|
||||
// * @see com.TwentyCodes.android.location.OnLocationSelectedListener#onLocationSelected(com.google.android.maps.GeoPoint)
|
||||
*/
|
||||
@Override
|
||||
public void onLocationSelected(final GeoPoint point) {
|
||||
public void onLocationSelected(final LatLng point) {
|
||||
if (point != null) {
|
||||
Log.d(TAG, "onLocationSelected() " + point.toString());
|
||||
|
||||
@@ -218,7 +216,7 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
mRadiusOverlay.setLocation(point);
|
||||
|
||||
if (mMap != null)
|
||||
mMap.setMapCenter(point);
|
||||
mMap.getMap().moveCamera(CameraUpdateFactory.newLatLng(point));
|
||||
|
||||
if (mListener != null) {
|
||||
final ContentValues info = new ContentValues();
|
||||
@@ -232,7 +230,6 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
/**
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see android.support.v4.app.Fragment#onPause()
|
||||
*/
|
||||
@Override
|
||||
public void onPause() {
|
||||
@@ -251,7 +248,8 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
case R.id.radius:
|
||||
mRadiusTextView.setText(GeoUtils.distanceToString(Float.valueOf(progress) / 1000, true));
|
||||
mRadiusOverlay.setRadius(progress);
|
||||
mMap.invalidate();
|
||||
//todo invalidate this shit
|
||||
// mMap.invalidate();
|
||||
if (mListener != null) {
|
||||
final ContentValues info = new ContentValues();
|
||||
info.put(RingerDatabase.KEY_RADIUS, progress);
|
||||
@@ -264,7 +262,6 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
||||
/**
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see android.support.v4.app.Fragment#onResume()
|
||||
*/
|
||||
@Override
|
||||
public void onResume() {
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* MapFragment.java
|
||||
* @date May 12, 2012
|
||||
* @author ricky barrette
|
||||
* @author Twenty Codes, LLC
|
||||
*/
|
||||
package org.RickBarrette.android.LocationRinger.ui.fragments;
|
||||
|
||||
import com.TwentyCodes.android.fragments.BaseMapFragment;
|
||||
import com.TwentyCodes.android.location.MapView;
|
||||
|
||||
/**
|
||||
* @author ricky barrette
|
||||
*/
|
||||
public class MapFragment extends BaseMapFragment {
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ricky barrette
|
||||
*/
|
||||
public MapFragment() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
/**
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.TwentyCodes.android.fragments.BaseMapFragment#onMapViewCreate(com.TwentyCodes.android.location.MapView)
|
||||
*/
|
||||
@Override
|
||||
public void onMapViewCreate(final MapView map) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Submodule exception_handler_library updated: ab75dd3bb1...6b9cbdef84
21
google-play-services_lib/google-play-services_lib.iml
Normal file
21
google-play-services_lib/google-play-services_lib.iml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<option name="LIBRARY_PROJECT" value="true" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android 4.3 Google APIs" jdkType="Android SDK" />
|
||||
<orderEntry type="library" name="google-play-services" level="project" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
Reference in New Issue
Block a user