François Gautrais 8 年 前
コミット
6d4de40f34

+ 9 - 10
app/src/main/AndroidManifest.xml

@@ -21,15 +21,7 @@
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
         <activity android:name=".ARActivity" />
-        <activity
-            android:name=".SplashActivity"
-            android:label="@string/app_name">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
 
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
         <activity
             android:name=".ViewerActivity"
             android:configChanges="orientation|keyboardHidden|screenSize"
@@ -43,10 +35,17 @@
         <activity
             android:name=".MenuActivity"
             android:label="@string/title_activity_menu"
-            android:theme="@style/AppTheme.NoActionBar" />
+            android:theme="@style/AppTheme.NoActionBar" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
         <activity
             android:name=".SettingsActivity"
-            android:label="@string/title_activity_settings"></activity>
+            android:label="@string/title_activity_settings"
+            android:theme="@style/FullscreenTheme"></activity>
     </application>
 
 </manifest>

+ 6 - 0
app/src/main/java/app/brest/testmin3d/ARActivity.java

@@ -261,6 +261,12 @@ public class ARActivity extends RendererActivity
 
     }
 
+    public void finish()
+    {
+        mGame.stopSensors();
+        super.finish();
+    }
+
     public void setGpsText()
     {
         if(mLocationUpdated) {

+ 0 - 109
app/src/main/java/app/brest/testmin3d/AppCompatPreferenceActivity.java

@@ -1,109 +0,0 @@
-package app.brest.testmin3d;
-
-import android.content.res.Configuration;
-import android.os.Bundle;
-import android.preference.PreferenceActivity;
-import android.support.annotation.LayoutRes;
-import android.support.annotation.Nullable;
-import android.support.v7.app.ActionBar;
-import android.support.v7.app.AppCompatDelegate;
-import android.support.v7.widget.Toolbar;
-import android.view.MenuInflater;
-import android.view.View;
-import android.view.ViewGroup;
-
-/**
- * A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls
- * to be used with AppCompat.
- */
-public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
-
-    private AppCompatDelegate mDelegate;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        getDelegate().installViewFactory();
-        getDelegate().onCreate(savedInstanceState);
-        super.onCreate(savedInstanceState);
-    }
-
-    @Override
-    protected void onPostCreate(Bundle savedInstanceState) {
-        super.onPostCreate(savedInstanceState);
-        getDelegate().onPostCreate(savedInstanceState);
-    }
-
-    public ActionBar getSupportActionBar() {
-        return getDelegate().getSupportActionBar();
-    }
-
-    public void setSupportActionBar(@Nullable Toolbar toolbar) {
-        getDelegate().setSupportActionBar(toolbar);
-    }
-
-    @Override
-    public MenuInflater getMenuInflater() {
-        return getDelegate().getMenuInflater();
-    }
-
-    @Override
-    public void setContentView(@LayoutRes int layoutResID) {
-        getDelegate().setContentView(layoutResID);
-    }
-
-    @Override
-    public void setContentView(View view) {
-        getDelegate().setContentView(view);
-    }
-
-    @Override
-    public void setContentView(View view, ViewGroup.LayoutParams params) {
-        getDelegate().setContentView(view, params);
-    }
-
-    @Override
-    public void addContentView(View view, ViewGroup.LayoutParams params) {
-        getDelegate().addContentView(view, params);
-    }
-
-    @Override
-    protected void onPostResume() {
-        super.onPostResume();
-        getDelegate().onPostResume();
-    }
-
-    @Override
-    protected void onTitleChanged(CharSequence title, int color) {
-        super.onTitleChanged(title, color);
-        getDelegate().setTitle(title);
-    }
-
-    @Override
-    public void onConfigurationChanged(Configuration newConfig) {
-        super.onConfigurationChanged(newConfig);
-        getDelegate().onConfigurationChanged(newConfig);
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-        getDelegate().onStop();
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        getDelegate().onDestroy();
-    }
-
-    public void invalidateOptionsMenu() {
-        getDelegate().invalidateOptionsMenu();
-    }
-
-    private AppCompatDelegate getDelegate() {
-        if (mDelegate == null) {
-            mDelegate = AppCompatDelegate.create(this, null);
-        }
-        return mDelegate;
-    }
-}

+ 11 - 8
app/src/main/java/app/brest/testmin3d/MenuActivity.java

@@ -13,6 +13,7 @@ import android.widget.ImageButton;
 import android.widget.LinearLayout;
 
 import app.brest.testmin3d.R;
+import app.brest.utils.Settings;
 import app.brest.utils.app.brest.game.Game;
 
 public class MenuActivity extends AppCompatActivity {
@@ -45,16 +46,15 @@ public class MenuActivity extends AppCompatActivity {
         mIScanner.setLayoutParams(new LinearLayout.LayoutParams(buttonHieght, buttonHieght));
 
         Game g = Game.load(this);
-
-        if(getIntent().hasExtra("game_name"))
-        {
-            String str = getIntent().getStringExtra("game_name");
-            mGame = new Game(str, this);
-
-        }else if (g!= null) {
+        if (g!= null && mGame==null) {
             mGame = g;
             mGame.newSensorManager(this);
-        }else
+        }
+        else if(getIntent().hasExtra("game_name") && mGame==null)
+        {
+            mGame = new Game("game_medium", this);
+
+        }else if( mGame==null)
         {
             throw new Error("Le jeu n'est pas sauvegardé");
         }
@@ -64,6 +64,7 @@ public class MenuActivity extends AppCompatActivity {
     public void onOptionsClick(View v)
     {
         Intent intent = new Intent(this, SettingsActivity.class);
+        intent.putExtra("game", mGame);
         startActivity(intent);
     }
 
@@ -91,4 +92,6 @@ public class MenuActivity extends AppCompatActivity {
         startActivity(intent);
     }
 
+
+
 }

+ 61 - 202
app/src/main/java/app/brest/testmin3d/SettingsActivity.java

@@ -2,6 +2,7 @@ package app.brest.testmin3d;
 
 
 import android.annotation.TargetApi;
+import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
 import android.content.res.Configuration;
@@ -19,9 +20,16 @@ import android.preference.PreferenceManager;
 import android.preference.RingtonePreference;
 import android.text.TextUtils;
 import android.view.MenuItem;
+import android.view.View;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+import android.widget.ToggleButton;
 
 import java.util.List;
 
+import app.brest.utils.Settings;
+import app.brest.utils.app.brest.game.Game;
+
 /**
  * A {@link PreferenceActivity} that presents a set of application settings. On
  * handset devices, settings are presented as a single list. On tablets,
@@ -33,222 +41,73 @@ import java.util.List;
  * href="http://developer.android.com/guide/topics/ui/settings.html">Settings
  * API Guide</a> for more information on developing a Settings UI.
  */
-public class SettingsActivity extends AppCompatPreferenceActivity {
-    /**
-     * A preference value change listener that updates the preference's summary
-     * to reflect its new value.
-     */
-    private static Preference.OnPreferenceChangeListener sBindPreferenceSummaryToValueListener = new Preference.OnPreferenceChangeListener() {
-        @Override
-        public boolean onPreferenceChange(Preference preference, Object value) {
-            String stringValue = value.toString();
-
-            if (preference instanceof ListPreference) {
-                // For list preferences, look up the correct display value in
-                // the preference's 'entries' list.
-                ListPreference listPreference = (ListPreference) preference;
-                int index = listPreference.findIndexOfValue(stringValue);
-
-                // Set the summary to reflect the new value.
-                preference.setSummary(
-                        index >= 0
-                                ? listPreference.getEntries()[index]
-                                : null);
-
-            } else if (preference instanceof RingtonePreference) {
-                // For ringtone preferences, look up the correct display value
-                // using RingtoneManager.
-                if (TextUtils.isEmpty(stringValue)) {
-                    // Empty values correspond to 'silent' (no ringtone).
-                    preference.setSummary(R.string.pref_ringtone_silent);
-
-                } else {
-                    Ringtone ringtone = RingtoneManager.getRingtone(
-                            preference.getContext(), Uri.parse(stringValue));
-
-                    if (ringtone == null) {
-                        // Clear the summary if there was a lookup error.
-                        preference.setSummary(null);
-                    } else {
-                        // Set the summary to reflect the new ringtone display
-                        // name.
-                        String name = ringtone.getTitle(preference.getContext());
-                        preference.setSummary(name);
-                    }
-                }
-
-            } else {
-                // For all other preferences, set the summary to the value's
-                // simple string representation.
-                preference.setSummary(stringValue);
-            }
-            return true;
-        }
-    };
-
-    /**
-     * Helper method to determine if the device has an extra-large screen. For
-     * example, 10" tablets are extra-large.
-     */
-    private static boolean isXLargeTablet(Context context) {
-        return (context.getResources().getConfiguration().screenLayout
-                & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
-    }
+public class SettingsActivity extends Activity {
 
-    /**
-     * Binds a preference's summary to its value. More specifically, when the
-     * preference's value is changed, its summary (line of text below the
-     * preference title) is updated to reflect the value. The summary is also
-     * immediately updated upon calling this method. The exact display format is
-     * dependent on the type of preference.
-     *
-     * @see #sBindPreferenceSummaryToValueListener
-     */
-    private static void bindPreferenceSummaryToValue(Preference preference) {
-        // Set the listener to watch for value changes.
-        preference.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
-
-        // Trigger the listener immediately with the preference's
-        // current value.
-        sBindPreferenceSummaryToValueListener.onPreferenceChange(preference,
-                PreferenceManager
-                        .getDefaultSharedPreferences(preference.getContext())
-                        .getString(preference.getKey(), ""));
-    }
+    protected Game         mGame;
+    protected LinearLayout mRoot;
+    protected ToggleButton mAccelerometer;
+    protected ToggleButton mGPS;
+    protected ToggleButton mPlaces;
+    protected ToggleButton mAreas;
 
-    @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setupActionBar();
+        setContentView(R.layout.activity_settings);
+
+        mGame = (Game) getIntent().getSerializableExtra("game");
+
+        mAccelerometer = new ToggleButton(this);
+        mGPS = new ToggleButton(this);
+        mPlaces=new ToggleButton(this);
+        mAreas=new ToggleButton(this);
+        mRoot = (LinearLayout)findViewById(R.id.root_layout);
+        addOptionBool("Données acceleromètre", mAccelerometer);
+        addOptionBool("Données GPS", mGPS);
+        addOptionBool("Distance Resources", mAreas);
+        addOptionBool("Resources affichés", mPlaces);
+        preset();
     }
 
-    /**
-     * Set up the {@link android.app.ActionBar}, if the API is available.
-     */
-    private void setupActionBar() {
-        ActionBar actionBar = getSupportActionBar();
-        if (actionBar != null) {
-            // Show the Up button in the action bar.
-            actionBar.setDisplayHomeAsUpEnabled(true);
-        }
-    }
 
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean onIsMultiPane() {
-        return isXLargeTablet(this);
-    }
 
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
-    public void onBuildHeaders(List<Header> target) {
-        loadHeadersFromResource(R.xml.pref_headers, target);
+    public void onClick(View v)
+    {
+        setResults();
+        finish();
     }
 
-    /**
-     * This method stops fragment injection in malicious applications.
-     * Make sure to deny any unknown fragments here.
-     */
-    protected boolean isValidFragment(String fragmentName) {
-        return PreferenceFragment.class.getName().equals(fragmentName)
-                || GeneralPreferenceFragment.class.getName().equals(fragmentName)
-                || DataSyncPreferenceFragment.class.getName().equals(fragmentName)
-                || NotificationPreferenceFragment.class.getName().equals(fragmentName);
-    }
+    public void addOptionBool(String name, ToggleButton v)
+    {
+        LinearLayout ll = new LinearLayout(this);
+        TextView tv = new TextView(this);
+        tv.setText(name);
+        //tv.setBackgroundColor(0);
+        //tv.setTextSize(20);
+        //tv.setTextColor(0x33b5e5);
+
+        ll.setOrientation(LinearLayout.HORIZONTAL);
+        //v.setBackgroundColor(0);
+        ll.addView(tv);
+        ll.addView(v);
+        mRoot.addView(ll);
 
-    /**
-     * This fragment shows general preferences only. It is used when the
-     * activity is showing a two-pane settings UI.
-     */
-    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
-    public static class GeneralPreferenceFragment extends PreferenceFragment {
-        @Override
-        public void onCreate(Bundle savedInstanceState) {
-            super.onCreate(savedInstanceState);
-            addPreferencesFromResource(R.xml.pref_general);
-            setHasOptionsMenu(true);
-
-            // Bind the summaries of EditText/List/Dialog/Ringtone preferences
-            // to their values. When their values change, their summaries are
-            // updated to reflect the new value, per the Android Design
-            // guidelines.
-            bindPreferenceSummaryToValue(findPreference("example_text"));
-            bindPreferenceSummaryToValue(findPreference("example_list"));
-        }
-
-        @Override
-        public boolean onOptionsItemSelected(MenuItem item) {
-            int id = item.getItemId();
-            if (id == android.R.id.home) {
-                startActivity(new Intent(getActivity(), SettingsActivity.class));
-                return true;
-            }
-            return super.onOptionsItemSelected(item);
-        }
     }
 
-    /**
-     * This fragment shows notification preferences only. It is used when the
-     * activity is showing a two-pane settings UI.
-     */
-    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
-    public static class NotificationPreferenceFragment extends PreferenceFragment {
-        @Override
-        public void onCreate(Bundle savedInstanceState) {
-            super.onCreate(savedInstanceState);
-            addPreferencesFromResource(R.xml.pref_notification);
-            setHasOptionsMenu(true);
-
-            // Bind the summaries of EditText/List/Dialog/Ringtone preferences
-            // to their values. When their values change, their summaries are
-            // updated to reflect the new value, per the Android Design
-            // guidelines.
-            bindPreferenceSummaryToValue(findPreference("notifications_new_message_ringtone"));
-        }
-
-        @Override
-        public boolean onOptionsItemSelected(MenuItem item) {
-            int id = item.getItemId();
-            if (id == android.R.id.home) {
-                startActivity(new Intent(getActivity(), SettingsActivity.class));
-                return true;
-            }
-            return super.onOptionsItemSelected(item);
-        }
+
+    private void setResults()
+    {
+        mGame.getmSettings().setAccelerometerDebug(mAccelerometer.isChecked());
+        mGame.getmSettings().setAreaDebug(mAreas.isChecked());
+        mGame.getmSettings().setGPSDebug(mGPS.isChecked());
+        mGame.getmSettings().setResourceDebug(mPlaces.isChecked());
     }
 
-    /**
-     * This fragment shows data and sync preferences only. It is used when the
-     * activity is showing a two-pane settings UI.
-     */
-    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
-    public static class DataSyncPreferenceFragment extends PreferenceFragment {
-        @Override
-        public void onCreate(Bundle savedInstanceState) {
-            super.onCreate(savedInstanceState);
-            addPreferencesFromResource(R.xml.pref_data_sync);
-            setHasOptionsMenu(true);
-
-            // Bind the summaries of EditText/List/Dialog/Ringtone preferences
-            // to their values. When their values change, their summaries are
-            // updated to reflect the new value, per the Android Design
-            // guidelines.
-            bindPreferenceSummaryToValue(findPreference("sync_frequency"));
-        }
-
-        @Override
-        public boolean onOptionsItemSelected(MenuItem item) {
-            int id = item.getItemId();
-            if (id == android.R.id.home) {
-                startActivity(new Intent(getActivity(), SettingsActivity.class));
-                return true;
-            }
-            return super.onOptionsItemSelected(item);
-        }
+    private void preset()
+    {
+        mAccelerometer.setChecked(mGame.getmSettings().isAccelerometerDebug());
+        mAreas.setChecked(mGame.getmSettings().isAreaDebug());
+        mGPS.setChecked(mGame.getmSettings().isGPSDebug());
+        mPlaces.setChecked(mGame.getmSettings().isResourceDebug());
     }
+
 }

+ 0 - 79
app/src/main/java/app/brest/testmin3d/SplashActivity.java

@@ -1,79 +0,0 @@
-package app.brest.testmin3d;
-
-import android.content.Intent;
-import android.support.v7.app.AppCompatActivity;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.View;
-
-import app.brest.utils.app.brest.game.Game;
-import app.brest.utils.app.brest.game.Resource;
-import app.brest.utils.geometry.GPSPoint;
-
-public class SplashActivity extends AppCompatActivity {
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_splash);
-        checkSaved();
-        GPSPoint a = new GPSPoint(48.3845125, -4.493831);
-        GPSPoint b = new GPSPoint(48.3840495, -4.5037464);
-        Log.e("GPS", "OUT:"+a.getDistanceWith(b));
-        onClickMenu(null);
-    }
-
-    public void onClickNew(View v)
-    {
-        Intent intent = new Intent(this, ARActivity.class);
-        intent.putExtra("game_name", "game_medium");
-        startActivity(intent);
-    }
-
-
-    public void onClickMenu(View v)
-    {
-        Intent intent = new Intent(this, MenuActivity.class);
-        intent.putExtra("game_name", "game_medium");
-        startActivity(intent);
-    }
-
-    public void onClickContinue(View v)
-    {
-        Intent intent = new Intent(this, ARActivity.class);
-        startActivity(intent);
-    }
-
-    public void onClickView(View v)
-    {
-        Resource r = new Resource("camaro", 1, this);
-        Intent intent = new Intent(this, ViewerActivity.class);
-        intent.putExtra("resource", r);
-        startActivity(intent);
-    }
-
-
-
-    public void onClickList(View v)
-    {
-        Intent intent = new Intent(this, ResourceListActivity.class);
-        startActivity(intent);
-    }
-
-
-
-    protected void onResume()
-    {
-        super.onResume();
-        checkSaved();
-    }
-
-    protected void checkSaved()
-    {
-        View v = (View) findViewById(R.id.button_continue);
-        if(Game.isSaved(this))
-            v.setVisibility(View.VISIBLE);
-        else
-            v.setVisibility(View.INVISIBLE);
-    }
-}

+ 10 - 0
app/src/main/java/app/brest/utils/SensorsManager.java

@@ -93,6 +93,11 @@ public class SensorsManager implements SensorEventListener, LocationListener {
     }
 
     public void onResume() {
+        restartSensors();
+    }
+
+    public void restartSensors()
+    {
         mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME);
         mSensorManager.registerListener(this, mMagnetometer, SensorManager.SENSOR_DELAY_GAME);
 
@@ -111,6 +116,11 @@ public class SensorsManager implements SensorEventListener, LocationListener {
     }
 
     public void onPause() {
+        stopSensors();
+    }
+
+    public void stopSensors()
+    {
         mSensorManager.unregisterListener(this, mAccelerometer);
         mSensorManager.unregisterListener(this, mMagnetometer);
         if (ActivityCompat.checkSelfPermission(mParent, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED

+ 55 - 0
app/src/main/java/app/brest/utils/Settings.java

@@ -0,0 +1,55 @@
+package app.brest.utils;
+
+import android.widget.LinearLayout;
+
+import java.io.Serializable;
+
+/**
+ * Created by ptitcois on 22/08/16.
+ */
+public class Settings implements Serializable{
+
+    protected boolean mAccelerometerDebug = false;
+    protected boolean mGPSDebug = false;
+    protected boolean mAreaDebug = false;
+    protected boolean mResourceDebug = false;
+
+
+
+    public Settings()
+    {
+
+    }
+
+    public boolean isAccelerometerDebug() {
+        return mAccelerometerDebug;
+    }
+
+    public void setAccelerometerDebug(boolean mAccelerometerDebug) {
+        this.mAccelerometerDebug = mAccelerometerDebug;
+    }
+
+    public boolean isGPSDebug() {
+        return mGPSDebug;
+    }
+
+    public void setGPSDebug(boolean mGPSDebug) {
+        this.mGPSDebug = mGPSDebug;
+    }
+
+    public boolean isAreaDebug() {
+        return mAreaDebug;
+    }
+
+    public void setAreaDebug(boolean mAreaDebug) {
+        this.mAreaDebug = mAreaDebug;
+    }
+
+    public boolean isResourceDebug() {
+        return mResourceDebug;
+    }
+
+    public void setResourceDebug(boolean mResourceDebug) {
+        this.mResourceDebug = mResourceDebug;
+    }
+}

+ 13 - 0
app/src/main/java/app/brest/utils/app/brest/game/Game.java

@@ -21,6 +21,7 @@ import app.brest.testmin3d.ARActivity;
 import app.brest.utils.JSONLoader;
 import app.brest.utils.ResourceManager;
 import app.brest.utils.SensorsManager;
+import app.brest.utils.Settings;
 
 /**
  * Created by ptitcois on 19/08/16.
@@ -34,6 +35,7 @@ public class Game  implements Serializable {
     protected Player          mPlayer;
     protected ResourceManager mResources;
     protected String          mName;
+    protected Settings        mSettings = new Settings();
 
     public Game(String name, Activity act)
     {
@@ -53,6 +55,8 @@ public class Game  implements Serializable {
         }
     }
 
+    public Settings getmSettings(){return mSettings;}
+    public void setSettings(Settings s){ mSettings=s;}
 
     public int getNStages() {
         return mNStages;
@@ -312,5 +316,14 @@ public class Game  implements Serializable {
         return mResources.getResourceAquiered();
     }
 
+    public void restartSensors()
+    {
+        mPlayer.getSensorsManager().restartSensors();
+    }
+
+    public void stopSensors()
+    {
+        mPlayer.getSensorsManager().stopSensors();
+    }
 
 }

+ 31 - 0
app/src/main/res/layout/activity_settings.xml

@@ -0,0 +1,31 @@
+<?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:background="#FFFFFF"
+    android:weightSum="1">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="493dp"
+            android:layout_gravity="center_horizontal"
+            android:id="@+id/root_layout"
+            android:layout_above="@+id/button3"
+            android:layout_alignParentTop="true"
+            android:measureWithLargestChild="false" />
+
+        <Button
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="OK"
+            android:id="@+id/button3"
+            android:layout_alignParentBottom="true"
+            android:layout_centerHorizontal="true"
+            android:onClick="onClick" />
+    </RelativeLayout>
+</LinearLayout>

+ 0 - 15
app/src/main/res/layout/content_menu.xml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:paddingBottom="@dimen/activity_vertical_margin"
-    android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    app:layout_behavior="@string/appbar_scrolling_view_behavior"
-    tools:context=".MenuActivity"
-    tools:showIn="@layout/activity_menu">
-
-</RelativeLayout>

+ 0 - 21
app/src/main/res/xml/pref_data_sync.xml

@@ -1,21 +0,0 @@
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <!-- NOTE: Hide buttons to simplify the UI. Users can touch outside the dialog to
-         dismiss it. -->
-    <!-- NOTE: ListPreference's summary should be set to its value by the activity code. -->
-    <ListPreference
-        android:defaultValue="180"
-        android:entries="@array/pref_sync_frequency_titles"
-        android:entryValues="@array/pref_sync_frequency_values"
-        android:key="sync_frequency"
-        android:negativeButtonText="@null"
-        android:positiveButtonText="@null"
-        android:title="@string/pref_title_sync_frequency" />
-
-    <!-- This preference simply launches an intent when selected. Use this UI sparingly, per
-         design guidelines. -->
-    <Preference android:title="@string/pref_title_system_sync_settings">
-        <intent android:action="android.settings.SYNC_SETTINGS" />
-    </Preference>
-
-</PreferenceScreen>

+ 0 - 33
app/src/main/res/xml/pref_general.xml

@@ -1,33 +0,0 @@
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <SwitchPreference
-        android:defaultValue="true"
-        android:key="example_switch"
-        android:summary="@string/pref_description_social_recommendations"
-        android:title="@string/pref_title_social_recommendations" />
-
-    <!-- NOTE: EditTextPreference accepts EditText attributes. -->
-    <!-- NOTE: EditTextPreference's summary should be set to its value by the activity code. -->
-    <EditTextPreference
-        android:capitalize="words"
-        android:defaultValue="@string/pref_default_display_name"
-        android:inputType="textCapWords"
-        android:key="example_text"
-        android:maxLines="1"
-        android:selectAllOnFocus="true"
-        android:singleLine="true"
-        android:title="@string/pref_title_display_name" />
-
-    <!-- NOTE: Hide buttons to simplify the UI. Users can touch outside the dialog to
-         dismiss it. -->
-    <!-- NOTE: ListPreference's summary should be set to its value by the activity code. -->
-    <ListPreference
-        android:defaultValue="-1"
-        android:entries="@array/pref_example_list_titles"
-        android:entryValues="@array/pref_example_list_values"
-        android:key="example_list"
-        android:negativeButtonText="@null"
-        android:positiveButtonText="@null"
-        android:title="@string/pref_title_add_friends_to_messages" />
-
-</PreferenceScreen>

+ 0 - 20
app/src/main/res/xml/pref_headers.xml

@@ -1,20 +0,0 @@
-<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <!-- These settings headers are only used on tablets. -->
-
-    <header
-        android:fragment="app.brest.testmin3d.SettingsActivity$GeneralPreferenceFragment"
-        android:icon="@drawable/ic_info_black_24dp"
-        android:title="@string/pref_header_general" />
-
-    <header
-        android:fragment="app.brest.testmin3d.SettingsActivity$NotificationPreferenceFragment"
-        android:icon="@drawable/ic_notifications_black_24dp"
-        android:title="@string/pref_header_notifications" />
-
-    <header
-        android:fragment="app.brest.testmin3d.SettingsActivity$DataSyncPreferenceFragment"
-        android:icon="@drawable/ic_sync_black_24dp"
-        android:title="@string/pref_header_data_sync" />
-
-</preference-headers>

+ 0 - 27
app/src/main/res/xml/pref_notification.xml

@@ -1,27 +0,0 @@
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <!-- A 'parent' preference, which enables/disables child preferences (below)
-         when checked/unchecked. -->
-    <SwitchPreference
-        android:defaultValue="true"
-        android:key="notifications_new_message"
-        android:title="@string/pref_title_new_message_notifications" />
-
-    <!-- Allows the user to choose a ringtone in the 'notification' category. -->
-    <!-- NOTE: This preference will be enabled only when the checkbox above is checked. -->
-    <!-- NOTE: RingtonePreference's summary should be set to its value by the activity code. -->
-    <RingtonePreference
-        android:defaultValue="content://settings/system/notification_sound"
-        android:dependency="notifications_new_message"
-        android:key="notifications_new_message_ringtone"
-        android:ringtoneType="notification"
-        android:title="@string/pref_title_ringtone" />
-
-    <!-- NOTE: This preference will be enabled only when the checkbox above is checked. -->
-    <SwitchPreference
-        android:defaultValue="true"
-        android:dependency="notifications_new_message"
-        android:key="notifications_new_message_vibrate"
-        android:title="@string/pref_title_vibrate" />
-
-</PreferenceScreen>