Android Open Source - ccardstats Application






From Project

Back to project page ccardstats.

License

The source code is released under:

GNU General Public License

If you think the Android project ccardstats 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

package com.github.marwinxxii.ccardstats;
/*from  w  ww  .  j a  v  a 2s . co  m*/
import java.util.HashMap;

import android.content.SharedPreferences;
import android.preference.PreferenceManager;

import com.github.marwinxxii.ccardstats.db.DBHelper;
import com.github.marwinxxii.ccardstats.helpers.DateHelper;
import com.github.marwinxxii.ccardstats.helpers.MoneyHelper;
import com.github.marwinxxii.ccardstats.R;


public class Application extends android.app.Application {
    
    @Override
    public void onCreate() {
        DateHelper.setMonthNames(getResources().getStringArray(R.array.month_names));
        SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(this);
        HashMap<String, Double> rates = new HashMap<String, Double>(2);
        rates.put("usd", Double.parseDouble(prefs.getString("exchange_rates_usd", "30.0")));
        rates.put("eur", Double.parseDouble(prefs.getString("exchange_rates_eur", "39.0")));
        rates.put("ron", Double.parseDouble(prefs.getString("exchange_rates_ron", "9")));
        rates.put("huf", Double.parseDouble(prefs.getString("exchange_rates_huf", "0.14")));
        MoneyHelper.setExchangeRates(rates);
        DBHelper.storeMonth = prefs.getBoolean("store_month", DBHelper.storeMonth);
    }
}




Java Source Code List

com.github.marwinxxii.ccardstats.Application.java
com.github.marwinxxii.ccardstats.SmsReceiver.java
com.github.marwinxxii.ccardstats.db.Card.java
com.github.marwinxxii.ccardstats.db.DBHelper.java
com.github.marwinxxii.ccardstats.gui.CardListActivity.java
com.github.marwinxxii.ccardstats.gui.GetStatsTask.java
com.github.marwinxxii.ccardstats.gui.ListActivity.java
com.github.marwinxxii.ccardstats.gui.MonthStatsActivity.java
com.github.marwinxxii.ccardstats.gui.PreferencesActivity.java
com.github.marwinxxii.ccardstats.gui.SimpleListActivity.java
com.github.marwinxxii.ccardstats.gui.TextMappingAdapter.java
com.github.marwinxxii.ccardstats.gui.YearStatsActivity.java
com.github.marwinxxii.ccardstats.helpers.DateHelper.java
com.github.marwinxxii.ccardstats.helpers.MoneyHelper.java
com.github.marwinxxii.ccardstats.notifications.NotificationReader.java
com.github.marwinxxii.ccardstats.notifications.NotificationService.java
com.github.marwinxxii.ccardstats.notifications.SberbankService.java
com.github.marwinxxii.ccardstats.notifications.SmsNotification.java
com.github.marwinxxii.ccardstats.notifications.SmsParser.java
com.github.marwinxxii.ccardstats.notifications.SmsReader.java