<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity
- android:name=".SettingsActivity"
- android:label="@string/title_activity_settings"
- android:parentActivityName=".CampusApp">
- <meta-data
- android:name="android.support.PARENT_ACTIVITY"
- android:value="de.dhbwloe.campusapp.CampusApp" />
- </activity>
</application>
</manifest>
AppContext.getNavigationManager().navigatePage("News");
break;
case R.id.nav_settings:
- Intent settings = new Intent(AppContext.getMainActivity(), SettingsActivity.class);
- AppContext.getMainActivity().startActivity(settings);
+ AppContext.getNavigationManager().navigatePage("Settings");
+ break;
+ case R.id.nav_wifi:
+ AppContext.getNavigationManager().navigatePage("WifiSettings");
break;
case R.id.nav_impressum:
AppContext.getNavigationManager().navigatePage("Impressum");
import de.dhbwloe.campusapp.fragments.MensaCard;
import de.dhbwloe.campusapp.fragments.News;
import de.dhbwloe.campusapp.fragments.PopupFragment;
+import de.dhbwloe.campusapp.fragments.Settings;
import de.dhbwloe.campusapp.fragments.SplashScreen;
import de.dhbwloe.campusapp.fragments.Vorlesungsplan;
import de.dhbwloe.campusapp.fragments.WebBrowser;
new AppPage("News", News.class),
new AppPage("WifiSettings", WifiSettings.class),
new AppPage("FirstRun", FirstRun.class),
+ new AppPage("Settings", Settings.class),
new AppPage("Impressum", Impressum.class),
new AppPage("WebBrowser", WebBrowser.class),
new AppPage("WebBrowserPopup", WebBrowser.class, 3)
return oContextVariables;
}
+ public String getResString(int id, Object... arguments) {
+ String format = getResString(id);
+ String res = String.format(format, arguments);
+ return res;
+ }
public String getResString(int id) {
String str = oMainActivity.getResources().getString(id);
return str;
+++ /dev/null
-package de.dhbwloe.campusapp;
-
-
-import android.annotation.TargetApi;
-import android.content.Context;
-import android.content.Intent;
-import android.content.res.Configuration;
-import android.media.Ringtone;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.os.Build;
-import android.os.Bundle;
-import android.preference.ListPreference;
-import android.preference.Preference;
-import android.preference.PreferenceActivity;
-import android.support.v7.app.ActionBar;
-import android.preference.PreferenceFragment;
-import android.preference.PreferenceManager;
-import android.preference.RingtonePreference;
-import android.text.TextUtils;
-import android.view.MenuItem;
-import android.support.v4.app.NavUtils;
-
-import java.util.List;
-
-/**
- * A {@link PreferenceActivity} that presents a set of application settings. On
- * handset devices, settings are presented as a single list. On tablets,
- * settings are split by category, with category headers shown to the left of
- * the list of settings.
- * <p/>
- * See <a href="http://developer.android.com/design/patterns/settings.html">
- * Android Design: Settings</a> for design guidelines and the <a
- * 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;
- }
-
- /**
- * 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(), ""));
- }
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setupActionBar();
- }
-
- /**
- * 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);
- }
- }
-
- @Override
- public boolean onMenuItemSelected(int featureId, MenuItem item) {
- int id = item.getItemId();
- if (id == android.R.id.home) {
- if (!super.onMenuItemSelected(featureId, item)) {
- NavUtils.navigateUpFromSameTask(this);
- }
- return true;
- }
- return super.onMenuItemSelected(featureId, item);
- }
-
- /**
- * {@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);
- }
-
- /**
- * 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);
- }
-
- /**
- * 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);
- }
- }
-
- /**
- * 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);
- }
- }
-}
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
+import java.util.Calendar;
+import java.util.Date;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
}
}
+ public static String getWeekdayString(long date) {
+ return getWeekdayString(date, true);
+ }
+
+ public static String getWeekdayString(long date, boolean fullString) {
+ return getWeekdayString(new Date(date * 1000), fullString);
+ }
+
+ public static String getWeekdayString(Date date) {
+ return getWeekdayString(date, true);
+ }
+
+ public static String getWeekdayString(Date date, boolean fullString) {
+ int weekdayResIds[];
+ if(fullString)
+ weekdayResIds = new int[] { R.string.week_sunday, R.string.week_monday, R.string.week_tuesday, R.string.week_wednesday, R.string.week_thursday, R.string.week_friday, R.string.week_saturday };
+ else
+ weekdayResIds = new int[] { R.string.week_sunday_short, R.string.week_monday_short, R.string.week_tuesday_short, R.string.week_wednesday_short, R.string.week_thursday_short, R.string.week_friday_short, R.string.week_saturday_short };
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ int dow = cal.get(Calendar.DAY_OF_WEEK);
+ int weekdayResId = weekdayResIds[dow-1];
+ return CampusAppContext.getInstance().getResString(weekdayResId);
+ }
+
}
public NewsItem[] getNewsItems(String source, long timeFrom, long timeTo) {
String[] whereArgs = new String[] {
source,
- Long.toString(timeFrom),
- Long.toString(timeTo)
+ Long.toString(timeTo),
+ Long.toString(timeFrom)
};
Cursor resultSet = database.rawQuery("SELECT Id, Source, Time, UniqueId, ChkSum, Title, Summary, Content, Link, Categories FROM News WHERE Source = ? AND Time >= ? AND Time <= ?", whereArgs);
ArrayList<NewsItem> results = new ArrayList<NewsItem>();
AppContext = CampusAppContext.getInstance();
oFragmentView = inflater.inflate(R.layout.fragment_appsearch, container, false);
- AppContext.setTitle("Search: " + sSearchQuery);
+ AppContext.setTitle(AppContext.getResString(R.string.appsearch_title, sSearchQuery));
ViewPager viewPager = (ViewPager) oFragmentView.findViewById(R.id.viewpager);
setupViewPager(viewPager);
CampusAppFragment fragment;
Bundle args = new Bundle();
args.putString("query", sSearchQuery);
- Log.i("AppSearch", "New result instances: "+sSearchQuery);
+ Log.i("AppSearch", "New result instances: " + sSearchQuery);
fragment = new AppSearchInternal();
fragment.setArguments(args);
- adapter.addFragment("Campus App", fragment);
+ adapter.addFragment(AppContext.getResString(R.string.appsearch_inapp), fragment);
fragment = new AppSearchDhbw();
fragment.setArguments(args);
- adapter.addFragment("DHBW Suche", fragment);
+ adapter.addFragment(AppContext.getResString(R.string.appsearch_indhbw), fragment);
fragment = new AppSearchStuv();
fragment.setArguments(args);
- adapter.addFragment("Stuv Suche", fragment);
+ adapter.addFragment(AppContext.getResString(R.string.appsearch_instuv), fragment);
}
viewPager.setAdapter(adapter);
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
+import android.widget.ProgressBar;
import java.util.ArrayList;
import java.util.List;
private AppSearchListAdapter appSearchAdapter;
private DhbwSearchHelper seachHelper;
private ArrayList<AppSearchListItem> searchResultItems = new ArrayList<AppSearchListItem>();
+ private ProgressBar progressBar;
@Override
public void onCreate(Bundle savedInstanceState) {
if(bQueryExecuted && !reset)
return;
bQueryExecuted = true;
+ progressBar = (ProgressBar) oFragmentView.findViewById(R.id.searchProgress);
+ progressBar.setVisibility(View.VISIBLE);
searchResultItems.clear();
Log.i("SearchDhbw", "Success: "+results.size());
for(AppSearchListItem result : results)
searchResultItems.add(result);
+ progressBar.setVisibility(View.GONE);
if(appSearchAdapter != null)
appSearchAdapter.notifyDataSetChanged();
else
@Override
public void onSearchFailed(String error) {
Log.i("SearchDhbw", "Failed: " + error);
+ progressBar.setVisibility(View.GONE);
}
});
}
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
+import android.widget.ProgressBar;
import android.widget.TextView;
import java.util.ArrayList;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
+import android.widget.ProgressBar;
import java.util.ArrayList;
import java.util.List;
private AppSearchListAdapter appSearchAdapter;
private StuvSearchHelper seachHelper;
private ArrayList<AppSearchListItem> searchResultItems = new ArrayList<AppSearchListItem>();
+ private ProgressBar progressBar;
@Override
public void onCreate(Bundle savedInstanceState) {
if(bQueryExecuted && !reset)
return;
bQueryExecuted = true;
+ progressBar = (ProgressBar) oFragmentView.findViewById(R.id.searchProgress);
+ progressBar.setVisibility(View.VISIBLE);
searchResultItems.clear();
Log.i("SearchStuv", "Success: "+results.size());
for(AppSearchListItem result : results)
searchResultItems.add(result);
+ progressBar.setVisibility(View.GONE);
if(appSearchAdapter != null)
appSearchAdapter.notifyDataSetChanged();
}
@Override
public void onSearchFailed(String error) {
Log.i("SearchDhbw", "Failed: " + error);
+ progressBar.setVisibility(View.GONE);
}
});
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.ImageView;
import de.dhbwloe.campusapp.R;
import de.dhbwloe.campusapp.search.SearchIndices;
new SearchIndices("Dashboard", true) {{
setUpdateTime(1);
setTarget("#Dashboard");
- setTitle("Dashboard");
- setDescription("Dashboard der App :)");
- addKeyWord("home, dashboard, start, übersicht, overview");
+ setTitle(R.string.search_dashboard_title);
+ setDescription(R.string.search_dashboard_description);
+ addKeyWord(R.string.search_dashboard_keywords);
}},
};
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
- AppContext.getDatabaseManager().setRuntimeCache("CourseName", "tif13a");
}
@Override
view = inflater.inflate(R.layout.fragment_dashboard, container, false);
} catch (InflateException e) {
}
- AppContext.setTitle("Dashboard");
+ AppContext.setTitle(AppContext.getResString(R.string.dashboard_title));
String kursTag = AppContext.getDatabaseManager().getRuntimeCache("CourseName");
if(kursTag == null || kursTag.isEmpty()) {
timetable.setVisibility(View.GONE);
}
+ ImageView image;
+ image = (ImageView)view.findViewById(R.id.timetable_image);
+ image.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ AppContext.getNavigationManager().navigatePage("Vorlesungsplan");
+ }
+ });
+
+ image = (ImageView)view.findViewById(R.id.mensa_image);
+ image.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ AppContext.getNavigationManager().navigatePage("Mensa");
+ }
+ });
+
return view;
}
}
import de.dhbwloe.campusapp.CampusAppContext;
import de.dhbwloe.campusapp.CampusAppFragment;
import de.dhbwloe.campusapp.R;
+import de.dhbwloe.campusapp.Tools;
import de.dhbwloe.campusapp.mensaplan.MensaTagesplan;
/**
else if(now < date + (86400*2))
datetext = AppContext.getResString(R.string.dashboard_calendar_tomorrow);
else {
- int weekdayResIds[] = new int[] { R.string.week_sunday, R.string.week_monday, R.string.week_tuesday, R.string.week_wednesday, R.string.week_thursday, R.string.week_friday, R.string.week_saturday };
- Calendar cal = Calendar.getInstance();
- cal.setTime(new Date(date * 1000));
- int dow = cal.get(Calendar.DAY_OF_WEEK);
- SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM");
+ Date dateObj = new Date(date * 1000);
+ String dayStr = Tools.getWeekdayString(dateObj);
+ SimpleDateFormat dateFormat = new SimpleDateFormat(AppContext.getResString(R.string.timeformat_dashboard_mensa));
- datetext = AppContext.getResString(weekdayResIds[dow]) + ", " + dateFormat.format(cal.getTime());
+ datetext = dayStr + ", " + dateFormat.format(dateObj);
}
return datetext;
}
Date date;
TextView leftCol, rightCol = null;
RelativeLayout.LayoutParams params;
- SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm");
+ SimpleDateFormat dateFormat = new SimpleDateFormat(AppContext.getResString(R.string.timeformat_dashboard_vorlesungsplan_time));
int firstLeftColId = 0;
if(events.size() > 0) {
else if(date1DayId == tomorrowDayId)
datetext = AppContext.getResString(R.string.dashboard_calendar_tomorrow);
else {
- int weekdayResIds[] = new int[] { R.string.week_sunday, R.string.week_monday, R.string.week_tuesday, R.string.week_wednesday, R.string.week_thursday, R.string.week_friday, R.string.week_saturday };
- Calendar cal = Calendar.getInstance();
- cal.setTime(eventDate);
- int dow = cal.get(Calendar.DAY_OF_WEEK);
- SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM");
+ String dayStr = Tools.getWeekdayString(eventDate);
+ SimpleDateFormat dateFormat = new SimpleDateFormat(AppContext.getResString(R.string.timeformat_dashboard_vorlesungsplan_date));
- datetext = AppContext.getResString(weekdayResIds[dow]) + ", " + dateFormat.format(eventDate);
+ datetext = dayStr + ", " + dateFormat.format(eventDate);
}
return datetext;
}
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
+import android.widget.EditText;
import de.dhbwloe.campusapp.CampusAppFragment;
import de.dhbwloe.campusapp.R;
* A simple {@link Fragment} subclass.
*/
public class FirstRun extends CampusAppFragment {
+ private View view;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.fragment_first_run, container, false);
+ view = inflater.inflate(R.layout.fragment_first_run, container, false);
AppContext.setTitle("Campus App");
+ final FirstRun that = this;
Button startAppBtn = (Button)view.findViewById(R.id.startAppBtn);
startAppBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- AppContext.getDatabaseManager().setRuntimeCache("AppStartCounter", "1");
- AppContext.getNavigationManager().navigatePage("SplashScreen", null, false);
+ that.startApp();
+ }
+ });
+
+ Button courseSendBtn = (Button)view.findViewById(R.id.courseSubmitBtn);
+ courseSendBtn.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if(that.setCourse())
+ that.startApp();
}
});
return view;
}
+ private void startApp() {
+ AppContext.getDatabaseManager().setRuntimeCache("AppStartCounter", "1");
+ AppContext.getNavigationManager().navigatePage("SplashScreen", null, false);
+ }
+
+ private boolean setCourse() {
+ EditText courseInput = (EditText)view.findViewById(R.id.courseInput);
+ String courseName = courseInput.getText().toString();
+ if(courseName.length() <= 3)
+ return false;
+
+ AppContext.getDatabaseManager().setRuntimeCache("CourseName", courseName);
+ return true;
+ }
+
}
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.TextView;
import de.dhbwloe.campusapp.CampusAppFragment;
import de.dhbwloe.campusapp.R;
new SearchIndices("Impressum", true) {{
setUpdateTime(1);
setTarget("#Impressum");
- setTitle("Impressum");
- setDescription("Impressum der App");
- addKeyWord("impressum, kontakt, autor, author, contact, imprint");
+ setTitle(R.string.search_impressum_title);
+ setDescription(R.string.search_impressum_description);
+ addKeyWord(R.string.search_impressum_keywords);
}},
};
}
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_impressum, container, false);
- AppContext.setTitle("Impressum");
+ AppContext.setTitle(AppContext.getResString(R.string.impressum_title));
+
+ TextView urlView = (TextView) view.findViewById(R.id.sourceUrl);
+ urlView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Bundle args = new Bundle();
+ args.putString("url", "http://dev.pk910.de/DHBWCampusApp");
+ AppContext.getNavigationManager().navigatePage("WebBrowser", args, false);
+ }
+ });
return view;
}
import de.dhbwloe.campusapp.CampusAppFragment;
import de.dhbwloe.campusapp.R;
+import de.dhbwloe.campusapp.Tools;
import de.dhbwloe.campusapp.search.SearchIndices;
/**
new SearchIndices("Mensa", true) {{
setUpdateTime(1);
setTarget("#Mensa");
- setTitle("Mensa");
- setDescription("Aktuelle Mensapläne");
- addKeyWord("mensa, kantine, essen, mittagessen, mensaplan, plan, hunger, mittag");
+ setTitle(R.string.search_mensa_title);
+ setDescription(R.string.search_mensa_description);
+ addKeyWord(R.string.search_mensa_keywords);
}},
};
}
}
}
- AppContext.setTitle("Mensa Speiseplan");
+ AppContext.setTitle(AppContext.getResString(R.string.mensa_title));
/*
toolbar = (Toolbar) view.findViewById(R.id.toolbar);
if(viewDate < now)
now = viewDate;
- int weekdayResIds[] = new int[] { R.string.week_monday_short, R.string.week_tuesday_short, R.string.week_wednesday_short, R.string.week_thursday_short, R.string.week_friday_short, R.string.week_saturday_short, R.string.week_sunday_short };
Calendar cal = Calendar.getInstance();
cal.setTime(new Date(now * 1000));
cal.set(Calendar.HOUR_OF_DAY, 0);
}
lastWeekday = weekday;
- title = AppContext.getResString(weekdayResIds[weekday]);
+ title = Tools.getWeekdayString(date, false);
bundle.putLong("date", date);
adapter.addFragment(bundle, title);
}
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")) {
setActiveOnLoad = true;
return;
}
- SimpleDateFormat titleDateFormater = new SimpleDateFormat("dd.MM.yyyy");
- AppContext.setTitle("Mensa: " + titleDateFormater.format(viewPlanDate));
+ SimpleDateFormat titleDateFormater = new SimpleDateFormat(AppContext.getResString(R.string.timeformat_mensa_titledate));
+ AppContext.setTitle(AppContext.getResString(R.string.mensa_dayplan_title, titleDateFormater.format(viewPlanDate)));
}
private void setupPlanDate() {
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.ListView;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.ArrayList;
import de.dhbwloe.campusapp.CampusAppFragment;
import de.dhbwloe.campusapp.R;
+import de.dhbwloe.campusapp.news.NewsItem;
import de.dhbwloe.campusapp.search.SearchIndices;
+import de.dhbwloe.campusapp.vorlesungen.CourseEvent;
/**
* A simple {@link Fragment} subclass.
new SearchIndices("News", true) {{
setUpdateTime(1);
setTarget("#News");
- setTitle("News");
- setDescription("News der DHBW & Stuv");
- addKeyWord("news, dhbw, stuv, termin, termine");
+ setTitle(R.string.search_news_title);
+ setDescription(R.string.search_news_description);
+ addKeyWord(R.string.search_news_keywords);
}},
};
}
+ private View view;
+ private NewsListAdapter listAdapter;
+ private ArrayList<NewsListItem> newsListItems = new ArrayList<NewsListItem>();
+
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.fragment_news, container, false);
- AppContext.setTitle("News");
+ view = inflater.inflate(R.layout.fragment_news, container, false);
+ AppContext.setTitle(AppContext.getResString(R.string.news_title));
+
+ ListView newsItemsList = (ListView) view.findViewById(R.id.newsListView);
+ listAdapter = new NewsListAdapter(view.getContext(), R.layout.fragment_news_item, newsListItems);
+ newsItemsList.setAdapter(listAdapter);
+
+ CompoundButton.OnCheckedChangeListener changeListener = new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ refreshNewsItems();
+ }
+ };
+ ((CheckBox) view.findViewById(R.id.showDhbwNews)).setOnCheckedChangeListener(changeListener);
+ ((CheckBox) view.findViewById(R.id.showStuvNews)).setOnCheckedChangeListener(changeListener);
+ ((CheckBox) view.findViewById(R.id.showStuvEvents)).setOnCheckedChangeListener(changeListener);
+ newsItemsList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+ NewsListItem item = newsListItems.get(position);
+ if (item == null)
+ return;
+
+ String link = item.getLink();
+ if(link != null) {
+ Bundle args = new Bundle();
+ args.putString("url", link);
+ AppContext.getNavigationManager().navigatePage("WebBrowser", args, false);
+ }
+ }
+ });
return view;
}
+ @Override
+ public void onResume() {
+ super.onResume();
+ refreshNewsItems();
+ }
+
+ private void refreshNewsItems() {
+ newsListItems.clear();
+
+ CheckBox showDhbwNewsChkbok = (CheckBox) view.findViewById(R.id.showDhbwNews);
+ CheckBox showStuvNewsChkbok = (CheckBox) view.findViewById(R.id.showStuvNews);
+ CheckBox showStuvEventsChkbok = (CheckBox) view.findViewById(R.id.showStuvEvents);
+
+ if(showDhbwNewsChkbok.isChecked()) {
+ loadNewsSource("DHBW", true);
+ }
+ if(showStuvNewsChkbok.isChecked()) {
+ loadNewsSource("STUV", false);
+ }
+ if(showStuvEventsChkbok.isChecked()) {
+ loadEventsSource("STUV", false);
+ }
+
+ Collections.sort(newsListItems, new Comparator<NewsListItem>() {
+ @Override
+ public int compare(NewsListItem item2, NewsListItem item1) {
+ long now = (new Date()).getTime()/1000;
+ return (int) (item2.getTimeDifference(now) - item1.getTimeDifference(now));
+ }
+ });
+ listAdapter.notifyDataSetChanged();
+ }
+
+ private void loadNewsSource(String sourceName, boolean isDhbw) {
+ long now = (new Date()).getTime() / 1000;
+
+ NewsItem[] news = AppContext.getDatabaseManager().getNewsItems(sourceName, now, now - (86400 * 30 * 6)); // load 6 month
+ for(NewsItem cnews : news) {
+ NewsListItem listItem = new NewsListItem(cnews, isDhbw);
+ newsListItems.add(listItem);
+ }
+ }
+
+ private void loadEventsSource(String sourceName, boolean isDhbw) {
+ long now = (new Date()).getTime() / 1000;
+
+ CourseEvent[] events = AppContext.getDatabaseManager().getCourseCalendarTimetable(sourceName, now, 30 * 6); // load 6 month
+ for(CourseEvent event : events) {
+ NewsListItem listItem = new NewsListItem(event, isDhbw);
+ newsListItems.add(listItem);
+ }
+ }
}
--- /dev/null
+package de.dhbwloe.campusapp.fragments;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+import de.dhbwloe.campusapp.R;
+
+/**
+ * Created by pk910 on 27.02.2016.
+ */
+public class NewsListAdapter extends ArrayAdapter<NewsListItem> {
+ private Context context;
+ private int layoutResourceId;
+ private ArrayList<NewsListItem> data = new ArrayList<NewsListItem>();
+
+ public NewsListAdapter(Context context, int layoutResourceId, ArrayList<NewsListItem> data) {
+ super(context, layoutResourceId, data);
+ this.layoutResourceId = layoutResourceId;
+ this.context = context;
+ this.data = data;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ View row = convertView;
+ RecordHolder holder = null;
+
+ if (row == null) {
+ LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ row = inflater.inflate(layoutResourceId, parent, false);
+
+ holder = new RecordHolder(row);
+ row.setTag(holder);
+ } else {
+ holder = (RecordHolder) row.getTag();
+ }
+
+ final NewsListAdapter that = this;
+ final NewsListItem item = data.get(position);
+
+ holder.newsTitle.setText(item.getFormatedDate() + ": " + item.getTitle());
+ holder.newsDescription.setText(item.getDescription());
+ if(item.isDhbwNews()) {
+ holder.newsDhbwLogo.setVisibility(View.VISIBLE);
+ holder.newsStuvLogo.setVisibility(View.GONE);
+ } else {
+ holder.newsDhbwLogo.setVisibility(View.GONE);
+ holder.newsStuvLogo.setVisibility(View.VISIBLE);
+ }
+
+ return row;
+ }
+
+ static class RecordHolder {
+ TextView newsTitle;
+ TextView newsDescription;
+ ImageView newsDhbwLogo;
+ ImageView newsStuvLogo;
+
+ public RecordHolder(View view) {
+ this.newsTitle = (TextView) view.findViewById(R.id.newsTitleView);
+ this.newsDescription = (TextView) view.findViewById(R.id.newsDescriptionView);
+
+ newsDhbwLogo = (ImageView) view.findViewById(R.id.dhbwLogo);
+ newsStuvLogo = (ImageView) view.findViewById(R.id.stuvLogo);
+ }
+ }
+}
--- /dev/null
+package de.dhbwloe.campusapp.fragments;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import de.dhbwloe.campusapp.CampusAppContext;
+import de.dhbwloe.campusapp.R;
+import de.dhbwloe.campusapp.news.NewsItem;
+import de.dhbwloe.campusapp.vorlesungen.CourseEvent;
+
+/**
+ * Created by pk910 on 27.02.2016.
+ */
+public class NewsListItem {
+ private String sNewsTitle;
+ private String sNewsDescription;
+ private String sNewsLink;
+ private long lNewsDate;
+ private boolean bIsDhbwNews;
+ private boolean bIsEvent;
+
+ public NewsListItem(NewsItem newsItem, boolean isDhbwNews) {
+ sNewsTitle = newsItem.getTitle();
+ sNewsDescription = newsItem.getSummary();
+ sNewsLink = newsItem.getLink();
+ lNewsDate = newsItem.getTime();
+ bIsDhbwNews = isDhbwNews;
+ bIsEvent = false;
+ }
+
+ public NewsListItem(CourseEvent newsEvent, boolean isDhbwEvent) {
+ sNewsTitle = newsEvent.getEventTitle();
+ sNewsDescription = newsEvent.getEventLocation();
+ sNewsLink = null;
+ lNewsDate = newsEvent.getEventFrom();
+ bIsDhbwNews = isDhbwEvent;
+ bIsEvent = true;
+ }
+
+ public long getTimeDifference(long now) {
+ return Math.abs(now - lNewsDate);
+ }
+
+ public String getTitle() {
+ return sNewsTitle;
+ }
+
+ public String getDescription() {
+ return sNewsDescription;
+ }
+
+ public boolean isDhbwNews() {
+ return bIsDhbwNews;
+ }
+
+ public String getFormatedDate() {
+ String dateFormat;
+ if(bIsEvent)
+ dateFormat = CampusAppContext.getInstance().getResString(R.string.timeformat_news_event);
+ else
+ dateFormat = CampusAppContext.getInstance().getResString(R.string.timeformat_news_news);
+ SimpleDateFormat format = new SimpleDateFormat(dateFormat);
+ return format.format(new Date(lNewsDate * 1000));
+ }
+
+ public String getLink() {
+ return sNewsLink;
+ }
+}
--- /dev/null
+package de.dhbwloe.campusapp.fragments;
+
+
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import de.dhbwloe.campusapp.CampusAppFragment;
+import de.dhbwloe.campusapp.R;
+
+/**
+ * A simple {@link Fragment} subclass.
+ */
+public class Settings extends CampusAppFragment {
+
+
+ public Settings() {
+ // Required empty public constructor
+ }
+
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.fragment_settings, container, false);
+ }
+
+}
new SearchIndices("Vorlesungsplan", true) {{
setUpdateTime(1);
setTarget("#Vorlesungsplan");
- setTitle("Vorlesungsplan");
- setDescription("Vorlesungsplan dienes Kurses");
- addKeyWord("vorlesung, vorlesungen, plan, vorlesungsplan, stundenplan, termin, termine, kursplan, blockplan, block, zeit, zeiten");
+ setTitle(R.string.search_vorlesungsplan_title);
+ setDescription(R.string.search_vorlesungsplan_description);
+ addKeyWord(R.string.search_vorlesungsplan_keywords);
}},
new SearchIndices("Vorlesungsplan", true) {{
setUpdateTime(1);
setTarget("#Vorlesungsplan#view=exams");
- setTitle("Vorlesungsplan");
- setDescription("Klausurübersicht dienes Kurses");
- addKeyWord("klausuren, prüfungen, exams, termine, zeitpunkt, plan, ergebnisse");
+ setTitle(R.string.search_vorlesungsplan_klausur_title);
+ setDescription(R.string.search_vorlesungsplan_klausur_description);
+ addKeyWord(R.string.search_vorlesungsplan_klausur_keywords);
}},
};
}
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_vorlesungsplan, container, false);
- AppContext.setTitle("Vorlesungsplan");
+ AppContext.setTitle(AppContext.getResString(R.string.vorlesungsplan_title));
ViewPager pager = (ViewPager) view.findViewById(R.id.viewpager);
setupViewPager(pager);
import java.text.SimpleDateFormat;
import java.util.Date;
+import de.dhbwloe.campusapp.CampusAppContext;
+import de.dhbwloe.campusapp.R;
+
/**
* Created by pk910 on 20.02.2016.
*/
}
public String getFirstEvent() {
- SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
+ if(firstEvent == 0)
+ return null;
+ SimpleDateFormat dateFormat = new SimpleDateFormat(CampusAppContext.getInstance().getResString(R.string.timeformat_vorlesungsplan_fulldate));
Date date = new Date(firstEvent*1000);
return dateFormat.format(date);
}
public String getLastEvent() {
- SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
+ if(lastEvent == 0)
+ return null;
+ SimpleDateFormat dateFormat = new SimpleDateFormat(CampusAppContext.getInstance().getResString(R.string.timeformat_vorlesungsplan_fulldate));
Date date = new Date(lastEvent*1000);
return dateFormat.format(date);
}
public String getNextEvent() {
- SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
+ if(nextEvent == 0)
+ return null;
+ SimpleDateFormat dateFormat = new SimpleDateFormat(CampusAppContext.getInstance().getResString(R.string.timeformat_vorlesungsplan_fulldate));
Date date = new Date(nextEvent*1000);
return dateFormat.format(date);
}
public String getNextKlausurEvent() {
if(nextKlausurEvent == 0)
return null;
- SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
+ SimpleDateFormat dateFormat = new SimpleDateFormat(CampusAppContext.getInstance().getResString(R.string.timeformat_vorlesungsplan_fulldate));
Date date = new Date(nextKlausurEvent*1000);
return dateFormat.format(date);
}
public void updateContainerView(View view) {
- SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm");
+ SimpleDateFormat dateFormat = new SimpleDateFormat(CampusAppContext.getInstance().getResString(R.string.timeformat_vorlesungsplan_time));
TextView timeFrom = (TextView) view.findViewById(R.id.timeFrom);
TextView timeTo = (TextView) view.findViewById(R.id.timeTo);
TextView location = (TextView) view.findViewById(R.id.location);
}
public String getFormatedDate() {
- SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.");
+ SimpleDateFormat dateFormat = new SimpleDateFormat(CampusAppContext.getInstance().getResString(R.string.timeformat_vorlesungsplan_date));
Date date = new Date(cardDate * 1000);
- int weekdayResIds[] = new int[] { R.string.week_saturday, R.string.week_sunday, R.string.week_monday, R.string.week_tuesday, R.string.week_wednesday, R.string.week_thursday, R.string.week_friday };
+ int weekdayResIds[] = new int[] { R.string.week_sunday, R.string.week_monday, R.string.week_tuesday, R.string.week_wednesday, R.string.week_thursday, R.string.week_friday, R.string.week_saturday };
Calendar cal = Calendar.getInstance();
cal.setTime(date);
- int dow = cal.get(Calendar.DAY_OF_WEEK);
+ int dow = cal.get(Calendar.DAY_OF_WEEK)-1;
return CampusAppContext.getInstance().getResString(weekdayResIds[dow]) + ", " + dateFormat.format(date);
}
new SearchIndices("WifiSettings", true) {{
setUpdateTime(1);
setTarget("#WifiSettings");
- setTitle("Wifi Settings");
- setDescription("WLAN Konfiguration für dieses Gerät");
- addKeyWord("wlan, secure, dhbw-secure, wifi, w-lan, wireless, internet, netzwerk");
+ setTitle(R.string.search_wifi_title);
+ setDescription(R.string.search_wifi_description);
+ addKeyWord(R.string.search_wifi_keywords);
}},
};
}
}
}
- SupplicantState supl_state=((SupplicantState)intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE));
- switch(supl_state){
- case ASSOCIATING:
- settings.isAssociating = true;
- settings.isAssociated = false;
- settings.isAuthenticated = false;
- settings.isDisconnected = false;
- break;
- case ASSOCIATED:
- settings.isAssociated = true;
- break;
- case COMPLETED:
- settings.isAuthenticated = true;
- break;
- case DISCONNECTED:
- settings.isAssociated = false;
- settings.isAssociating = false;
- settings.isDisconnected = true;
- break;
- default:
- break;
+ if(settings != null) {
+ SupplicantState supl_state = ((SupplicantState) intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE));
+ switch (supl_state) {
+ case ASSOCIATING:
+ settings.isAssociating = true;
+ settings.isAssociated = false;
+ settings.isAuthenticated = false;
+ settings.isDisconnected = false;
+ break;
+ case ASSOCIATED:
+ settings.isAssociated = true;
+ break;
+ case COMPLETED:
+ settings.isAuthenticated = true;
+ break;
+ case DISCONNECTED:
+ settings.isAssociated = false;
+ settings.isAssociating = false;
+ settings.isDisconnected = true;
+ break;
+ default:
+ break;
+ }
+ updateWifiState();
}
- updateWifiState();
}
NetworkInfo networkInfo = (NetworkInfo) intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
if (m.find()) {
NumberFormat nf = NumberFormat.getInstance(Locale.GERMAN);
try {
- Number result = nf.parse(m.group(1));
+ Number result = nf.parse(m.group(1));
return (int)(result.doubleValue()*100);
} catch (ParseException e) {
return 0;
package de.dhbwloe.campusapp.search;
+import java.util.ArrayList;
import java.util.Date;
+import de.dhbwloe.campusapp.CampusAppContext;
+
/**
* Created by pk910 on 19.01.2016.
*/
public class SearchIndices {
private String keyname = null;
- private StringBuffer keywordsBuffer = new StringBuffer();
+ private StringBuilder keywordsBuffer = new StringBuilder();
protected boolean isStatic = false;
protected String target = new String();
protected String keywords = null;
keywordsBuffer.append(words);
}
+ public void addKeyWord(int words) {
+ addKeyWord(CampusAppContext.getInstance().getResString(words));
+ }
+
public void setTarget(String target) {
this.target = target;
}
this.title = title;
}
+ public void setDescription(int description) {
+ this.description = CampusAppContext.getInstance().getResString(description);
+ }
+
+ public void setTitle(int title) {
+ this.title = CampusAppContext.getInstance().getResString(title);
+ }
+
public void setUpdateTime(long updateTime) {
this.updateTime = updateTime;
}
"uD3s1d70097Es++KwAg=\n" +
"-----END CERTIFICATE-----\n"));
+ /*
presets.add((new WifiNetworkSettings("dhbw-802.1x", "dhbw-802.1x", WifiNetworkAuthenticationTypes.WIFI_AUTHTYPE_WPA_ENTERPRISE)).
setWpaEnterprise(
new int[]{WifiConfiguration.KeyMgmt.WPA_EAP, WifiConfiguration.KeyMgmt.IEEE8021X},
"xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU\n" +
"Cm26OWMohpLzGITY+9HPBVZkVw==\n" +
"-----END CERTIFICATE-----"));
+ */
presets.add((new WifiNetworkSettings("eduroam", "eduroam", WifiNetworkAuthenticationTypes.WIFI_AUTHTYPE_WPA_ENTERPRISE)).
setWpaEnterprise(
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_checked="false" android:color="@color/color_dhbw_lightgray" />
+ <item android:state_checked="true" android:color="@color/color_dhbw_lightred" />
+</selector>
\ No newline at end of file
<ImageView
android:layout_width="fill_parent"
android:layout_height="70dp"
- android:id="@+id/imageView4"
+ android:id="@+id/timetable_image"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:name="de.dhbwloe.campusapp.fragments.DashboardVorlesungsplan"
- android:layout_below="@+id/imageView4"
+ android:layout_below="@+id/timetable_image"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="@+id/fragment_timetable" />
<ImageView
android:layout_width="fill_parent"
android:layout_height="70dp"
- android:id="@+id/imageView5"
+ android:id="@+id/mensa_image"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_height="fill_parent"
android:name="de.dhbwloe.campusapp.fragments.DashboardMensa"
android:id="@+id/fragment_mensa"
- android:layout_below="@+id/imageView5"
+ android:layout_below="@+id/mensa_image"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:id="@+id/searchResultItems"
android:layout_gravity="bottom|left|right|top" />
-</LinearLayout>
+
+ <ProgressBar
+ style="?android:attr/progressBarStyleLarge"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/searchProgress"
+ android:layout_alignParentTop="true"
+ android:layout_centerHorizontal="true"
+ android:layout_marginTop="54dp"
+ android:visibility="gone" />
+</RelativeLayout>
<ImageView
android:layout_width="fill_parent"
android:layout_height="70dp"
- android:id="@+id/imageView4"
+ android:id="@+id/timetable_image"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:name="de.dhbwloe.campusapp.fragments.DashboardVorlesungsplan"
- android:layout_below="@+id/imageView4"
+ android:layout_below="@+id/timetable_image"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="@+id/fragment_timetable"
<ImageView
android:layout_width="fill_parent"
android:layout_height="70dp"
- android:id="@+id/imageView5"
+ android:id="@+id/mensa_image"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_height="fill_parent"
android:name="de.dhbwloe.campusapp.fragments.DashboardMensa"
android:id="@+id/fragment_mensa"
- android:layout_below="@+id/imageView5"
+ android:layout_below="@+id/mensa_image"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
tools:layout="@layout/fragment_dashboard_mensa_menu" />
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context="de.dhbwloe.campusapp.fragments.FirstRun">
+ tools:context="de.dhbwloe.campusapp.fragments.FirstRun"
+ android:padding="8dp">
- <TextView
+ <RelativeLayout
android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/firstrun_select_couse"
+ android:id="@+id/textView19" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/firstrun_select_couse_example"
+ android:id="@+id/textView20"
+ android:layout_below="@+id/textView19" />
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:layout_below="@+id/textView20">
+
+ <EditText
+ android:layout_width="150dp"
+ android:layout_height="wrap_content"
+ android:id="@+id/courseInput"
+ android:layout_gravity="center_horizontal"
+ android:layout_alignWithParentIfMissing="false" />
+
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/firstrun_course_ok_button"
+ android:id="@+id/courseSubmitBtn"
+ android:layout_toRightOf="@+id/courseInput" />
+ </RelativeLayout>
+
+ </RelativeLayout>
+
+ <TextView
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="{FirstRun}" />
+ android:text="@string/firstrun_run_as_guest"
+ android:id="@+id/textView21"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="18dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Start App"
+ android:text="@string/firstrun_run_as_guest_button"
android:id="@+id/startAppBtn"
android:layout_gravity="center_horizontal" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/firstrun_settings_note"
+ android:id="@+id/textView22"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="18dp" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:text="@string/firstrun_slow_note"
+ android:id="@+id/textView23"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="24dp"
+ android:textColor="@color/color_dhbw_lightgray" />
+
</LinearLayout>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:orientation="vertical"
tools:context="de.dhbwloe.campusapp.fragments.Impressum">
<!-- TODO: Update blank fragment layout -->
- <TextView
+
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="#000000">
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="180dp"
+ android:id="@+id/imageView10"
+ android:src="@drawable/dhbw_campus" />
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="80dp"
+ android:id="@+id/imageView9"
+ android:layout_gravity="center_horizontal"
+ android:src="@drawable/dhbw_logo"
+ android:scaleType="fitStart"
+ android:layout_marginLeft="8dp"
+ android:layout_marginTop="8dp" />
+ </RelativeLayout>
+
+ <RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:text="{Impressum}" />
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:text="@string/impressum_h1"
+ android:id="@+id/textView24"
+ android:layout_alignParentTop="true"
+ android:layout_centerHorizontal="true"
+ android:layout_marginTop="8dp" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/impressum_about"
+ android:id="@+id/textView25"
+ android:layout_below="@+id/textView24"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_marginTop="8dp" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/impressum_author"
+ android:id="@+id/textView26"
+ android:layout_below="@+id/textView25"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_marginTop="8dp" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Philipp Kreil, Alexander Neumann, Kim Maier"
+ android:id="@+id/textView27"
+ android:layout_below="@+id/textView26"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_marginLeft="26dp"
+ android:layout_marginStart="26dp"
+ android:layout_marginTop="8dp" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/impressum_source"
+ android:id="@+id/textView28"
+ android:layout_below="@+id/textView27"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_marginTop="8dp" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="http://dev.pk910.de/DHBWCampusApp"
+ android:id="@+id/sourceUrl"
+ android:layout_below="@+id/textView28"
+ android:layout_alignLeft="@+id/textView27"
+ android:layout_alignStart="@+id/textView27"
+ android:textColor="#0000ff"
+ android:typeface="normal" />
+
+ </RelativeLayout>
-</FrameLayout>
+</LinearLayout>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context="de.dhbwloe.campusapp.fragments.News">
+ tools:context="de.dhbwloe.campusapp.fragments.News"
+ android:orientation="vertical">
<!-- TODO: Update blank fragment layout -->
- <TextView
+
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:text="{News}" />
+ android:layout_height="30dp"
+ android:orientation="horizontal">
+
+ <CheckBox
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/news_toggle_dhbw"
+ android:id="@+id/showDhbwNews"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
+ android:checked="true" />
+
+ <CheckBox
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/news_toggle_stuv"
+ android:id="@+id/showStuvNews"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
+ android:checked="true" />
-</FrameLayout>
+ <CheckBox
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/news_toggle_stuv_events"
+ android:id="@+id/showStuvEvents"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
+ android:checked="true" />
+ </LinearLayout>
+
+ <ListView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/newsListView"
+ android:layout_gravity="center_horizontal" />
+</LinearLayout>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:card_view="http://schemas.android.com/apk/res-auto"
+ android:orientation="vertical" android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/card_timetable"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="8dp"
+ card_view:cardCornerRadius="5dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingLeft="8dp"
+ android:paddingTop="4dp"
+ android:paddingRight="8dp"
+ android:paddingBottom="4dp"
+ android:orientation="horizontal"
+ android:id="@+id/newsItemLayout">
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="{title}"
+ android:id="@+id/newsTitleView" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="{description}"
+ android:id="@+id/newsDescriptionView"
+ android:layout_below="@+id/newsTitleView"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true" />
+ </RelativeLayout>
+
+ <RelativeLayout
+ android:layout_width="80dp"
+ android:layout_height="50dp"
+ android:layout_alignParentRight="true">
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/dhbwLogo"
+ android:src="@drawable/dhbw_logo"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:scaleType="fitStart" />
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/stuvLogo"
+ android:src="@drawable/header_stuv"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:scaleType="fitStart"
+ android:visibility="visible" />
+
+ </RelativeLayout>
+
+ </LinearLayout>
+
+ </android.support.v7.widget.CardView>
+
+</LinearLayout>
\ No newline at end of file
--- /dev/null
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context="de.dhbwloe.campusapp.fragments.Settings">
+
+ <!-- TODO: Update blank fragment layout -->
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text="@string/hello_blank_fragment" />
+
+</FrameLayout>
<group android:checkableBehavior="single" android:title="Campus App">
<item
android:id="@+id/nav_dashboard"
- android:icon="@drawable/ic_menu_camera"
+ android:icon="@drawable/ic_dashboard_black_24dp"
android:title="Dashboard" />
<item
android:id="@+id/nav_vorlesungsplan"
- android:icon="@drawable/ic_menu_gallery"
+ android:icon="@drawable/ic_event_black_24dp"
android:title="Vorlesungsplan" />
<item
android:id="@+id/nav_mensa"
- android:icon="@drawable/ic_menu_slideshow"
+ android:icon="@drawable/ic_local_dining_black_24dp"
android:title="Mensa" />
<item
android:id="@+id/nav_news"
- android:icon="@drawable/ic_menu_send"
+ android:icon="@drawable/ic_announcement_black_24dp"
android:title="News" />
<item
android:id="@+id/nav_settings"
- android:icon="@drawable/ic_menu_share"
+ android:icon="@android:drawable/ic_menu_preferences"
android:title="Settings" />
+ <item
+ android:id="@+id/nav_wifi"
+ android:icon="@drawable/ic_wifi_black_24dp"
+ android:title="WLAN Konfigurieren" />
<item
android:id="@+id/nav_impressum"
- android:icon="@drawable/ic_menu_send"
+ android:icon="@drawable/ic_info_black_24dp"
android:title="Impressum" />
</group>
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <color name="colorPrimary">#3F51B5</color>
- <color name="colorPrimaryDark">#303F9F</color>
- <color name="colorAccent">#FF4081</color>
+ <color name="colorPrimary">#E3001B</color>
+ <color name="colorPrimaryDark">#8D0011</color>
+ <color name="colorAccent">#7E878E</color>
<color name="color_dhbw_darkred">#8D0011</color>
<color name="color_dhbw_lightred">#E3001B</color>
<string name="week_saturday_short">Sa</string>
<string name="week_sunday_short">So</string>
-
+ <string name="timeformat_dashboard_mensa">dd.MM.</string>
+ <string name="timeformat_dashboard_vorlesungsplan_time">HH:mm</string>
+ <string name="timeformat_dashboard_vorlesungsplan_date">dd.MM.</string>
+ <string name="timeformat_mensa_titledate">dd.MM.yyyy</string>
+ <string name="timeformat_vorlesungsplan_fulldate">dd.MM.yyyy HH:mm</string>
+ <string name="timeformat_vorlesungsplan_time">HH:mm</string>
+ <string name="timeformat_vorlesungsplan_date">dd.MM.</string>
+ <string name="timeformat_news_event">dd.MM.yyy HH:mm</string>
+ <string name="timeformat_news_news">dd.MM.yyy</string>
+
+ <string name="appsearch_title">Search: %s</string>
+ <string name="appsearch_inapp">Campus App</string>
+ <string name="appsearch_indhbw">DHBW Suche</string>
+ <string name="appsearch_instuv">Stuv Suche</string>
+
+ <string name="search_dashboard_title">Dashboard</string>
+ <string name="search_dashboard_description">Dashboard der App :)</string>
+ <string name="search_dashboard_keywords">home, dashboard, start, übersicht, overview</string>
+ <string name="search_impressum_title">Impressum</string>
+ <string name="search_impressum_description">Impressum der App</string>
+ <string name="search_impressum_keywords">impressum, kontakt, autor, author, contact, imprint</string>
+ <string name="search_mensa_title">Mensa</string>
+ <string name="search_mensa_description">Aktuelle Mensapläne</string>
+ <string name="search_mensa_keywords">mensa, kantine, essen, mittagessen, mensaplan, plan, hunger, mittag</string>
+ <string name="search_news_title">News</string>
+ <string name="search_news_description">News der DHBW & Stuv</string>
+ <string name="search_news_keywords">news, dhbw, stuv, termin, termine</string>
+ <string name="search_vorlesungsplan_title">Vorlesungsplan</string>
+ <string name="search_vorlesungsplan_description">Vorlesungsplan dienes Kurses</string>
+ <string name="search_vorlesungsplan_keywords">vorlesung, vorlesungen, plan, vorlesungsplan, stundenplan, termin, termine, kursplan, blockplan, block, zeit, zeiten</string>
+ <string name="search_vorlesungsplan_klausur_title">Vorlesungsplan</string>
+ <string name="search_vorlesungsplan_klausur_description">Klausurübersicht dienes Kurses</string>
+ <string name="search_vorlesungsplan_klausur_keywords">klausuren, prüfungen, exams, termine, zeitpunkt, plan, ergebnisse</string>
+ <string name="search_wifi_title">Wifi Settings</string>
+ <string name="search_wifi_description">WLAN Konfiguration für dieses Gerät</string>
+ <string name="search_wifi_keywords">wlan, secure, dhbw-secure, wifi, w-lan, wireless, internet, netzwerk</string>
+
+ <string name="dashboard_title">Dashboard</string>
+ <string name="dashboard_mensa_title">Mensaplan</string>
<string name="dashboard_calendar_title">Vorlesungsplan</string>
<string name="dashboard_calendar_today">Heute</string>
<string name="dashboard_calendar_tomorrow">Morgen</string>
<string name="dashboard_calendar_klausur">Klausur: </string>
+ <string name="mensa_title">Mensa Speiseplan</string>
+ <string name="mensa_dayplan_title">Speiseplan: %s</string>
<string name="mensa_weekend">Hoch die Hände, Wochenende!</string>
+ <string name="mensacard_title">Mensa Guthaben</string>
+ <string name="mensacard_guthaben">Dein Guthaben:</string>
+ <string name="vorlesungsplan_title">Vorlesungsplan</string>
<string name="vorlesungsplan_upcoming">Nächste Kurse</string>
<string name="vorlesungsplan_groups">Kursübersicht</string>
<string name="vorlesungsplan_exams">Klausurübersicht</string>
+ <string name="vorlesungsplan_show_old_courses">Vergangene Vorlesungen anzeigen</string>
+ <string name="vorlesungsplan_groups_nextevent">Nächste Vorlesung:</string>
+ <string name="vorlesungsplan_groups_lastevent">Letzte Vorlesung:</string>
+ <string name="vorlesungsplan_groups_nonext">- keine -</string>
+ <string name="vorlesungsplan_groups_noklausur">- keine -</string>
+ <string name="vorlesungsplan_groups_klausur">Klausur:</string>
+ <string name="vorlesungsplan_groups_praesi">Präsentation:</string>
+
+ <string name="impressum_title">Impressum</string>
+ <string name="impressum_h1">Campus App</string>
+ <string name="impressum_about">Diese App wurde im Rahmen der Vorlesung \n\'Entwicklung mobiler Apps\' erstellt.</string>
+ <string name="impressum_author">Entwickelt von:</string>
+ <string name="impressum_source">Sourcecode:</string>
+
+ <string name="news_title">News</string>
+ <string name="news_toggle_dhbw">DHBW News</string>
+ <string name="news_toggle_stuv">STUV News</string>
+ <string name="news_toggle_stuv_events">STUV Events</string>
+ <string name="news_followlink">mehr...</string>
+
+ <string name="firstrun_select_couse">Bitte tippe deine Kursbezeichnung ein:</string>
+ <string name="firstrun_select_couse_example">(Beispiel: tif13a, win14a, wwi15b)</string>
+ <string name="firstrun_course_ok_button">Ok</string>
+ <string name="firstrun_run_as_guest">Alternativ kannst du die App auch als Gast starten. Jedoch stehen im Gastmodus nicht alle Funktionen zur verfügung.</string>
+ <string name="firstrun_run_as_guest_button">Als Gast starten</string>
+ <string name="firstrun_settings_note">Du kannst deine Kursbezeichnung jederzeit in den App Einstellungen nachtragen oder verändern.</string>
+ <string name="firstrun_slow_note">Aufgrund der unglaublichen Geschwindigkeit der DHBW Infrastruktur kann der erste Start der App einen kurzen Moment dauern.</string>
+
+ <string name="wifisettings_psk_caption">PSK:</string>
+ <string name="wifisettings_insecure_network">Achtung: Dieses Netzwerk ist potentiell unsicher!</string>
<string name="wifisettings_about_wifi">Die DHBW Lörrach bietet den Studenten verschiedene Möglichkeiten Geräte mit dem W-LAN zu verbinden. Mithilfe dieser App kannst du dein Gerät dazu konfigurieren sich unter berücksichtigung sicherheitsrelevanter Überprüfungen mit dem dhbw-secure Netzwerk zu verbinden.</string>
<string name="wifisettings_ssid_caption">SSID:</string>
<!-- Strings related to Settings -->
-
- <!-- Example General settings -->
- <string name="pref_header_general">General</string>
-
- <string name="pref_title_social_recommendations">Enable social recommendations</string>
- <string name="pref_description_social_recommendations">Recommendations for people to contact
- based on your message history
- </string>
-
- <string name="pref_title_display_name">Display name</string>
- <string name="pref_default_display_name">John Smith</string>
-
- <string name="pref_title_add_friends_to_messages">Add friends to messages</string>
- <string-array name="pref_example_list_titles">
- <item>Always</item>
- <item>When possible</item>
- <item>Never</item>
+ <string name="pref_kurs">Kursbezeichnung (z.B. tif13a)</string>
+ <string name="pref_mensa_role">Arbeitsposition</string>
+ <string-array name="pref_mensa_role_titles">
+ <item>Student</item>
+ <item>Mitarbeiter</item>
+ <item>Schüler</item>
+ <item>Gast</item>
</string-array>
- <string-array name="pref_example_list_values">
- <item>1</item>
+ <string-array name="pref_mensa_role_values">
<item>0</item>
- <item>-1</item>
- </string-array>
-
- <!-- Example settings for Data & Sync -->
- <string name="pref_header_data_sync">Data & sync</string>
-
- <string name="pref_title_sync_frequency">Sync frequency</string>
- <string-array name="pref_sync_frequency_titles">
- <item>15 minutes</item>
- <item>30 minutes</item>
- <item>1 hour</item>
- <item>3 hours</item>
- <item>6 hours</item>
- <item>Never</item>
- </string-array>
- <string-array name="pref_sync_frequency_values">
- <item>15</item>
- <item>30</item>
- <item>60</item>
- <item>180</item>
- <item>360</item>
- <item>-1</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
</string-array>
- <string name="pref_title_system_sync_settings">System sync settings</string>
-
- <!-- Example settings for Notifications -->
- <string name="pref_header_notifications">Notifications</string>
-
- <string name="pref_title_new_message_notifications">New message notifications</string>
-
- <string name="pref_title_ringtone">Ringtone</string>
- <string name="pref_ringtone_silent">Silent</string>
-
- <string name="pref_title_vibrate">Vibrate</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
- <string name="mensacard_guthaben">Dein Guthaben:</string>
- <string name="wifisettings_psk_caption">PSK:</string>
- <string name="wifisettings_insecure_network">Achtung: Dieses Netzwerk ist potentiell unsicher!</string>
- <string name="dashboard_mensa_title">Mensaplan</string>
- <string name="vorlesungsplan_show_old_courses">Vergangene Vorlesungen anzeigen</string>
- <string name="vorlesungsplan_groups_nextevent">Nächste Vorlesung:</string>
- <string name="vorlesungsplan_groups_lastevent">Letzte Vorlesung:</string>
- <string name="vorlesungsplan_groups_nonext">- keine -</string>
- <string name="vorlesungsplan_groups_noklausur">- keine -</string>
- <string name="vorlesungsplan_groups_klausur">Klausur:</string>
- <string name="vorlesungsplan_groups_praesi">Präsentation:</string>
+
</resources>
+++ /dev/null
-<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>
+++ /dev/null
-<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>
+++ /dev/null
-<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
-
- <!-- These settings headers are only used on tablets. -->
-
- <header
- android:fragment="de.dhbwloe.campusapp.SettingsActivity$GeneralPreferenceFragment"
- android:icon="@drawable/ic_info_black_24dp"
- android:title="@string/pref_header_general" />
-
- <header
- android:fragment="de.dhbwloe.campusapp.SettingsActivity$NotificationPreferenceFragment"
- android:icon="@drawable/ic_notifications_black_24dp"
- android:title="@string/pref_header_notifications" />
-
- <header
- android:fragment="de.dhbwloe.campusapp.SettingsActivity$DataSyncPreferenceFragment"
- android:icon="@drawable/ic_sync_black_24dp"
- android:title="@string/pref_header_data_sync" />
-
-</preference-headers>
+++ /dev/null
-<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>