X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fde%2Fdhbwloe%2Fcampusapp%2Ffragments%2FMensaCard.java;h=a19ca37a96322093309611a1bf23a2a7bfcba5ea;hb=48e758721a39298a85c69ecc7267f3daf6993e78;hp=e465d7271bb66f6990d143c3489cfc6564bb16ed;hpb=a0f644715b43af1e4acf2513b972c3f980efdaca;p=DHBWCampusApp.git diff --git a/app/src/main/java/de/dhbwloe/campusapp/fragments/MensaCard.java b/app/src/main/java/de/dhbwloe/campusapp/fragments/MensaCard.java index e465d72..a19ca37 100644 --- a/app/src/main/java/de/dhbwloe/campusapp/fragments/MensaCard.java +++ b/app/src/main/java/de/dhbwloe/campusapp/fragments/MensaCard.java @@ -1,5 +1,19 @@ +/* MensaCard.java + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package de.dhbwloe.campusapp.fragments; - import android.content.Context; import android.net.Uri; import android.os.Bundle; @@ -26,24 +40,11 @@ import de.dhbwloe.campusapp.search.SearchIndices; public class MensaCard extends CampusAppFragment { private View view; - /* implement this for search results ;) */ - public static SearchIndices[] GetSearchIndices() { - return new SearchIndices[] { - new SearchIndices("MensaCard", true) {{ - setUpdateTime(1); - setTarget("#MensaCard"); - setTitle("Mensakarte auslesen"); - setDescription("Mensakarte Kontostand"); - addKeyWord("mensa, kantine, essen, mittagessen, mensaplan, karte, ausweis, geld, kontostand, euro"); - }}, - }; - } - @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = inflater.inflate(R.layout.fragment_mensa_card, container, false); - AppContext.setTitle("Mensa Guthaben"); + AppContext.setTitle(AppContext.getResString(R.string.mensacard_title)); Bundle args = getArguments(); if(args != null && args.containsKey("balance")) { @@ -56,8 +57,8 @@ public class MensaCard extends CampusAppFragment { public void showNfcCardData(Bundle bundle) { TextView cardDataView = (TextView)view.findViewById(R.id.balanceTxt); double balance = bundle.getDouble("balance"); - DecimalFormat df = new DecimalFormat("#,###.00"); - cardDataView.setText(df.format(balance)+" €"); + DecimalFormat df = new DecimalFormat(AppContext.getResString(R.string.mensaformat_price)); + cardDataView.setText(df.format(balance)); } }