Android Open Source - Mero-Bhada-Meter Samples Application






From Project

Back to project page Mero-Bhada-Meter.

License

The source code is released under:

GNU General Public License

If you think the Android project Mero-Bhada-Meter listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * Copyright 2013-2014 Ludwig M Brinckmann
 */*from  ww w  .j a  v  a 2  s.c o m*/
 * This program is free software: you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package com.nirab.merobhadameter;

import org.mapsforge.map.android.graphics.AndroidGraphicFactory;
import org.mapsforge.map.model.DisplayModel;

import android.app.Application;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.util.Log;

/**
 * @author ludwig
 */
public class SamplesApplication extends Application {

  public static final String SETTING_SCALE = "scale";
  public static final String TAG = "SAMPLES APP";

  @Override
  public void onCreate() {
    super.onCreate();
    AndroidGraphicFactory.createInstance(this);
    Log.e(TAG,
        "Device scale factor "
            + Float.toString(DisplayModel.getDeviceScaleFactor()));
    SharedPreferences preferences = PreferenceManager
        .getDefaultSharedPreferences(this);
    float fs = Float.valueOf(preferences.getString(SETTING_SCALE,
        Float.toString(DisplayModel.getDefaultUserScaleFactor())));
    Log.e(TAG, "User ScaleFactor " + Float.toString(fs));
    if (fs != DisplayModel.getDefaultUserScaleFactor()) {
      DisplayModel.setDefaultUserScaleFactor(fs);
    }
  }
}




Java Source Code List

com.nirab.merobhadameter.AsyncTaskCompleteListener.java
com.nirab.merobhadameter.DownloadOfflineData.java
com.nirab.merobhadameter.Fare.java
com.nirab.merobhadameter.MainActivity.java
com.nirab.merobhadameter.MapActivity.java
com.nirab.merobhadameter.MenuActivity.java
com.nirab.merobhadameter.MyPreferencesActivity.java
com.nirab.merobhadameter.OfflineMapActivity.java
com.nirab.merobhadameter.OfflineRoute.java
com.nirab.merobhadameter.SamplesApplication.java
com.nirab.merobhadameter.Utils.java
com.nirab.merobhadameter.ViaPointInfoWindow.java