Code cleanup
@@ -55,10 +55,10 @@ public class MainActivity extends AppCompatActivity
|
||||
private static final String ARG_FRAGMENT_PAGE = "fragment_page";
|
||||
private static final String ARG_FRAGMENT_STATUS = "fragment_status";
|
||||
|
||||
FragmentManager mFragmentManager;
|
||||
private FragmentManager mFragmentManager;
|
||||
private GoogleAuth mGoogleAuth;
|
||||
private KVV mKVV;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private NavigationView mNavigationView;
|
||||
|
||||
private int fragmentPage = FRAGMENT_NONE;
|
||||
@@ -289,20 +289,28 @@ public class MainActivity extends AppCompatActivity
|
||||
private void changeFragment(int newFragment, String newData) {
|
||||
onTitleTextChange(R.string.courses);
|
||||
Fragment fragment;
|
||||
if (newFragment == FRAGMENT_MODULES) {
|
||||
fragment = ModulesFragment.newInstance();
|
||||
} else if (newFragment == FRAGMENT_MODULES_DETAILS) {
|
||||
fragment = ModDetailFragment.newInstance(newData);
|
||||
} else if (newFragment == FRAGMENT_LOGIN) {
|
||||
fragment = LoginFragment.newInstance();
|
||||
} else if (newFragment == FRAGMENT_SCHEDULE) {
|
||||
fragment = ScheduleFragment.newInstance();
|
||||
} else if (newFragment == FRAGMENT_CANTEENS) {
|
||||
fragment = CanteensFragment.newInstance();
|
||||
} else if (newFragment == FRAGMENT_CANTEENS_DETAILS) {
|
||||
fragment = DaySwitcherFragment.newInstance(Integer.parseInt(newData));
|
||||
} else { // FRAGMENT_STARTUP
|
||||
fragment = StartupFragment.newInstance();
|
||||
switch (newFragment) {
|
||||
case FRAGMENT_MODULES:
|
||||
fragment = ModulesFragment.newInstance();
|
||||
break;
|
||||
case FRAGMENT_MODULES_DETAILS:
|
||||
fragment = ModDetailFragment.newInstance(newData);
|
||||
break;
|
||||
case FRAGMENT_LOGIN:
|
||||
fragment = LoginFragment.newInstance();
|
||||
break;
|
||||
case FRAGMENT_SCHEDULE:
|
||||
fragment = ScheduleFragment.newInstance();
|
||||
break;
|
||||
case FRAGMENT_CANTEENS:
|
||||
fragment = CanteensFragment.newInstance();
|
||||
break;
|
||||
case FRAGMENT_CANTEENS_DETAILS:
|
||||
fragment = DaySwitcherFragment.newInstance(Integer.parseInt(newData));
|
||||
break;
|
||||
default: // FRAGMENT_STARTUP
|
||||
fragment = StartupFragment.newInstance();
|
||||
break;
|
||||
}
|
||||
|
||||
FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction();
|
||||
|
||||
@@ -17,7 +17,7 @@ import de.sebse.fuplanner.tools.ui.ItemViewHolder;
|
||||
* {@link RecyclerView.Adapter} that can display a {@link Modules.Module} and makes a call to the
|
||||
* specified {@link OnCanteensFragmentInteractionListener}.
|
||||
*/
|
||||
public class CanteensAdapter extends RecyclerView.Adapter<ItemViewHolder> {
|
||||
class CanteensAdapter extends RecyclerView.Adapter<ItemViewHolder> {
|
||||
|
||||
private Canteens mValues;
|
||||
private final OnCanteensFragmentInteractionListener mListener;
|
||||
|
||||
@@ -25,7 +25,7 @@ import de.sebse.fuplanner.tools.logging.Logger;
|
||||
*/
|
||||
public class CanteensFragment extends Fragment {
|
||||
private OnCanteensFragmentInteractionListener mListener;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private CanteensAdapter adapter;
|
||||
private SwipeRefreshLayout swipeLayout;
|
||||
|
||||
@@ -43,11 +43,6 @@ public class CanteensFragment extends Fragment {
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
@@ -32,7 +32,7 @@ import de.sebse.fuplanner.tools.logging.Logger;
|
||||
*/
|
||||
public class LoginFragment extends Fragment {
|
||||
private OnLoginFragmentInteractionListener mListener;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
|
||||
public LoginFragment() {
|
||||
// Required empty public constructor
|
||||
@@ -51,11 +51,6 @@ public class LoginFragment extends Fragment {
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import de.sebse.fuplanner.tools.ui.ItemViewHolder;
|
||||
* {@link RecyclerView.Adapter} that can display a {@link Modules.Module} and makes a call to the
|
||||
* specified {@link OnModulesFragmentInteractionListener}.
|
||||
*/
|
||||
public class ModulesAdapter extends RecyclerView.Adapter<ItemViewHolder> {
|
||||
class ModulesAdapter extends RecyclerView.Adapter<ItemViewHolder> {
|
||||
|
||||
private Modules mValues;
|
||||
private final OnModulesFragmentInteractionListener mListener;
|
||||
|
||||
@@ -25,7 +25,7 @@ import de.sebse.fuplanner.tools.logging.Logger;
|
||||
*/
|
||||
public class ModulesFragment extends Fragment {
|
||||
private OnModulesFragmentInteractionListener mListener;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private ModulesAdapter adapter;
|
||||
private SwipeRefreshLayout swipeLayout;
|
||||
|
||||
@@ -43,11 +43,6 @@ public class ModulesFragment extends Fragment {
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
@@ -37,7 +37,7 @@ import de.sebse.fuplanner.tools.ui.weekview.WeekViewEvent;
|
||||
public class ScheduleFragment extends Fragment implements MonthLoader.MonthChangeListener, WeekView.ScrollListener, WeekView.DoubleTapListener {
|
||||
private MainAcitivityListener mListener;
|
||||
private WeekView mWeekView;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private Modules mModules = null;
|
||||
|
||||
public ScheduleFragment() {
|
||||
@@ -78,9 +78,9 @@ public class ScheduleFragment extends Fragment implements MonthLoader.MonthChang
|
||||
mWeekView.notifyDatasetChanged();
|
||||
}
|
||||
}
|
||||
}, error1 -> log.e(error1), forceRefresh);
|
||||
}, log::e, forceRefresh);
|
||||
}
|
||||
}, error -> log.e(error), forceRefresh);
|
||||
}, log::e, forceRefresh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,11 +33,6 @@ public class StartupFragment extends Fragment {
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
package de.sebse.fuplanner.fragments.canteen;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||
|
||||
import de.sebse.fuplanner.services.Canteen.types.Canteen;
|
||||
import de.sebse.fuplanner.tools.DateUtils;
|
||||
import de.sebse.fuplanner.tools.logging.Logger;
|
||||
|
||||
class DaySwitcherAdapter extends FragmentStatePagerAdapter {
|
||||
private Canteen mCanteen = null;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class DaySwitcherFragment extends Fragment implements DaySwitcherListener
|
||||
private int mCanteenId;
|
||||
|
||||
private MainAcitivityListener mListener;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private ViewPager mViewPager;
|
||||
private DaySwitcherAdapter adapterViewPager;
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@ import de.sebse.fuplanner.services.Canteen.types.Canteen;
|
||||
import de.sebse.fuplanner.tools.network.NetworkCallback;
|
||||
import de.sebse.fuplanner.tools.network.NetworkErrorCallback;
|
||||
|
||||
public interface DaySwitcherListener {
|
||||
interface DaySwitcherListener {
|
||||
void onChildRefresh(NetworkCallback<Canteen> callback, NetworkErrorCallback errorCallback);
|
||||
}
|
||||
|
||||
@@ -9,16 +9,13 @@ import android.widget.BaseExpandableListAdapter;
|
||||
import de.sebse.fuplanner.R;
|
||||
import de.sebse.fuplanner.services.Canteen.types.Day;
|
||||
import de.sebse.fuplanner.services.Canteen.types.Meal;
|
||||
import de.sebse.fuplanner.services.KVV.types.Assignment;
|
||||
import de.sebse.fuplanner.services.KVV.types.Modules;
|
||||
import de.sebse.fuplanner.tools.DateUtils;
|
||||
import de.sebse.fuplanner.tools.ui.ItemViewHolder;
|
||||
import de.sebse.fuplanner.tools.ui.StringViewHolder;
|
||||
|
||||
public class MealAdapter extends BaseExpandableListAdapter {
|
||||
class MealAdapter extends BaseExpandableListAdapter {
|
||||
|
||||
private Day mDay = null;
|
||||
private Context mContext;
|
||||
private final Context mContext;
|
||||
|
||||
public MealAdapter(Context context) {
|
||||
mContext = context;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class MealFragment extends Fragment {
|
||||
|
||||
private int mCanteenId;
|
||||
private int mDayPosition;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private MealAdapter adapter;
|
||||
private SwipeRefreshLayout swipeLayout;
|
||||
private DaySwitcherListener mListener;
|
||||
@@ -78,9 +78,7 @@ public class MealFragment extends Fragment {
|
||||
// Getting SwipeContainerLayout
|
||||
swipeLayout = view.findViewById(R.id.swipe_container);
|
||||
// Adding Listener
|
||||
swipeLayout.setOnRefreshListener(() -> {
|
||||
mListener.onChildRefresh(callback -> refresh(true), error -> refresh(true));
|
||||
});
|
||||
swipeLayout.setOnRefreshListener(() -> mListener.onChildRefresh(callback -> refresh(true), error -> refresh(true)));
|
||||
refresh(false);
|
||||
|
||||
return view;
|
||||
|
||||
@@ -12,7 +12,7 @@ import de.sebse.fuplanner.tools.DateUtils;
|
||||
import de.sebse.fuplanner.tools.ui.ItemViewHolder;
|
||||
import de.sebse.fuplanner.tools.ui.StringViewHolder;
|
||||
|
||||
public class ModDetailAnnounceAdapter extends BaseExpandableListAdapter {
|
||||
class ModDetailAnnounceAdapter extends BaseExpandableListAdapter {
|
||||
|
||||
private Modules.Module mModule = null;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ModDetailAnnounceFragment extends Fragment {
|
||||
private static final String ARG_POSITION = "itemPosition";
|
||||
|
||||
private String mItemPos;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private ModDetailAnnounceAdapter adapter;
|
||||
private SwipeRefreshLayout swipeLayout;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import de.sebse.fuplanner.tools.DateUtils;
|
||||
import de.sebse.fuplanner.tools.ui.ItemViewHolder;
|
||||
import de.sebse.fuplanner.tools.ui.StringViewHolder;
|
||||
|
||||
public class ModDetailAssignmentAdapter extends BaseExpandableListAdapter {
|
||||
class ModDetailAssignmentAdapter extends BaseExpandableListAdapter {
|
||||
|
||||
private Modules.Module mModule = null;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ModDetailAssignmentFragment extends Fragment {
|
||||
private static final String ARG_POSITION = "itemPosition";
|
||||
|
||||
private String mItemPos;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private ModDetailAssignmentAdapter adapter;
|
||||
private SwipeRefreshLayout swipeLayout;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import de.sebse.fuplanner.tools.DateUtils;
|
||||
import de.sebse.fuplanner.tools.ui.CustomViewHolder;
|
||||
import de.sebse.fuplanner.tools.ui.ItemViewHolder;
|
||||
|
||||
public class ModDetailEventAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
class ModDetailEventAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
private static final int TYPE_HEADER = 0;
|
||||
private static final int TYPE_ITEM = 1;
|
||||
|
||||
@@ -153,7 +153,7 @@ public class ModDetailEventAdapter extends RecyclerView.Adapter<RecyclerView.Vie
|
||||
|
||||
|
||||
|
||||
public class HeaderViewHolder extends CustomViewHolder {
|
||||
class HeaderViewHolder extends CustomViewHolder {
|
||||
final TextView mCaption;
|
||||
|
||||
HeaderViewHolder(View view) {
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ModDetailEventFragment extends Fragment {
|
||||
private static final String ARG_POSITION = "itemPosition";
|
||||
|
||||
private String mItemPos;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private ModDetailEventAdapter adapter;
|
||||
private SwipeRefreshLayout swipeLayout;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ModDetailFragment extends Fragment implements ModDetailListener {
|
||||
private String mItemPos;
|
||||
|
||||
private MainAcitivityListener mListener;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private ViewPager mViewPager;
|
||||
|
||||
public ModDetailFragment() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package de.sebse.fuplanner.fragments.moddetails;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Pair;
|
||||
@@ -15,7 +16,7 @@ import de.sebse.fuplanner.services.KVV.types.Gradebook;
|
||||
import de.sebse.fuplanner.services.KVV.types.Modules;
|
||||
import de.sebse.fuplanner.tools.ui.CustomViewHolder;
|
||||
|
||||
public class ModDetailGradebookAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
class ModDetailGradebookAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
private static final int TYPE_TOTAL = 0;
|
||||
private static final int TYPE_GRADE = 1;
|
||||
|
||||
@@ -76,6 +77,7 @@ public class ModDetailGradebookAdapter extends RecyclerView.Adapter<RecyclerView
|
||||
else return -1;
|
||||
}
|
||||
|
||||
@SuppressLint("StringFormatInvalid")
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder holder, int position) {
|
||||
if (mValue == null || position > mPositionalData.size())
|
||||
@@ -84,8 +86,7 @@ public class ModDetailGradebookAdapter extends RecyclerView.Adapter<RecyclerView
|
||||
switch (data.first) {
|
||||
case TYPE_TOTAL:
|
||||
HeaderViewHolder h = (HeaderViewHolder) holder;
|
||||
//String s = R.string.Current_percentage; +": "+String.format("%.2f", mValue.getGradebookPercent()*100) +" %";
|
||||
h.mCaption.setText(String.format("%.2f", mValue.getGradebookPercent()*100) +" %");//R.string.gradebook +": "+String.format("%.2f", mValue.getGradebookPercent()*100) +" %"
|
||||
h.mCaption.setText(h.mView.getResources().getString(R.string.current_percentage, mValue.getGradebookPercent()*100));
|
||||
break;
|
||||
case TYPE_GRADE:
|
||||
int index = data.second / 1024;
|
||||
@@ -117,7 +118,7 @@ public class ModDetailGradebookAdapter extends RecyclerView.Adapter<RecyclerView
|
||||
|
||||
|
||||
|
||||
public class HeaderViewHolder extends CustomViewHolder {
|
||||
class HeaderViewHolder extends CustomViewHolder {
|
||||
final TextView mCaption;
|
||||
|
||||
HeaderViewHolder(View view) {
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ModDetailGradebookFragment extends Fragment {
|
||||
private static final String ARG_POSITION = "itemPosition";
|
||||
|
||||
private String mItemPos;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private ModDetailGradebookAdapter adapter;
|
||||
private SwipeRefreshLayout swipeLayout;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import de.sebse.fuplanner.tools.logging.Logger;
|
||||
import de.sebse.fuplanner.tools.ui.CustomViewHolder;
|
||||
import de.sebse.fuplanner.tools.ui.ItemViewHolder;
|
||||
|
||||
public class ModDetailOverviewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
class ModDetailOverviewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
private static final int MAX_ITEMS_PER_PREVIEW = 2;
|
||||
|
||||
private static final int TYPE_HEADER = 0;
|
||||
@@ -221,7 +221,7 @@ public class ModDetailOverviewAdapter extends RecyclerView.Adapter<RecyclerView.
|
||||
|
||||
|
||||
|
||||
public class HeaderViewHolder extends CustomViewHolder {
|
||||
class HeaderViewHolder extends CustomViewHolder {
|
||||
final TextView mCaption;
|
||||
|
||||
HeaderViewHolder(View view) {
|
||||
@@ -235,7 +235,7 @@ public class ModDetailOverviewAdapter extends RecyclerView.Adapter<RecyclerView.
|
||||
}
|
||||
}
|
||||
|
||||
public class DescriptionViewHolder extends CustomViewHolder {
|
||||
class DescriptionViewHolder extends CustomViewHolder {
|
||||
final ExpandableTextView mText;
|
||||
|
||||
DescriptionViewHolder(View view) {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ModDetailOverviewFragment extends Fragment {
|
||||
private static final String ARG_POSITION = "itemPosition";
|
||||
|
||||
private String mItemPos;
|
||||
private Logger log = new Logger(this);
|
||||
private final Logger log = new Logger(this);
|
||||
private ModDetailOverviewAdapter adapter;
|
||||
private SwipeRefreshLayout swipeLayout;
|
||||
@Nullable private ModDetailListener mListener;
|
||||
|
||||
@@ -19,8 +19,8 @@ import de.sebse.fuplanner.tools.network.NetworkErrorCallback;
|
||||
|
||||
public class CanteenBrowser extends HTTPService {
|
||||
private Canteens canteens;
|
||||
private AsyncQueue queue = new AsyncQueue();
|
||||
private Context context;
|
||||
private final AsyncQueue queue = new AsyncQueue();
|
||||
private final Context context;
|
||||
|
||||
public CanteenBrowser(Context context) {
|
||||
super(context);
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Iterator;
|
||||
public class Day implements Serializable, Iterable<Meal> {
|
||||
private final int canteenId;
|
||||
private final Calendar calendar;
|
||||
private boolean isClosed;
|
||||
private final boolean isClosed;
|
||||
private SortedListMeal list = new SortedListMeal();
|
||||
|
||||
Day(Canteen canteen, Calendar calendar, boolean isClosed) {
|
||||
|
||||
@@ -4,7 +4,7 @@ package de.sebse.fuplanner.services.GoogleAuth;
|
||||
* Created by sebastian on 07.11.17.
|
||||
*/
|
||||
|
||||
public class RequestCode {
|
||||
class RequestCode {
|
||||
public static final int RC_SAVE = 1;
|
||||
public static final int RC_HINT = 2;
|
||||
public static final int RC_READ = 3;
|
||||
|
||||
@@ -19,12 +19,12 @@ import de.sebse.fuplanner.tools.network.NetworkErrorCallback;
|
||||
*/
|
||||
|
||||
public class KVV {
|
||||
private Context context;
|
||||
private final Context context;
|
||||
private LoginToken lastToken;
|
||||
private boolean isLoginPending = true;
|
||||
private ArrayList<LastTokenCallback> updatingList;
|
||||
private HashMap<String, Object> addons = new HashMap<>();
|
||||
private MainAcitivityListener mListener;
|
||||
private final ArrayList<LastTokenCallback> updatingList;
|
||||
private final HashMap<String, Object> addons = new HashMap<>();
|
||||
private final MainAcitivityListener mListener;
|
||||
|
||||
public KVV(Context context) {
|
||||
mListener = (MainAcitivityListener) context;
|
||||
|
||||
@@ -85,9 +85,7 @@ class KVVLogin extends HTTPService {
|
||||
String ident_idp_session = success11112.get("_idp_session");
|
||||
getSAMLResponse(identJSESSIONID, ident_idp_authn_lc_key, identROUTEID, ident_idp_session, success1111 -> loginKVV(success1111.get("RelayState"), success1111.get("SAMLResponse"), kvvJSESSIONID, success111112 -> {
|
||||
LoginToken token = new LoginToken(username, success111112.get("shibsessionKey"), success111112.get("shibsessionName"), kvvJSESSIONID);
|
||||
finishKVVlogin(token, success11111 -> {
|
||||
callback.onResponse(token);
|
||||
}, error);
|
||||
finishKVVlogin(token, success11111 -> callback.onResponse(token), error);
|
||||
}, error), error);
|
||||
}, error), error);
|
||||
}, error), error);
|
||||
@@ -105,7 +103,6 @@ class KVVLogin extends HTTPService {
|
||||
callback.onResponse(loginToken);
|
||||
} catch (JSONException e) {
|
||||
errorCallback.onError(new NetworkError(100201, 403, "Cannot parse profile!"));
|
||||
return;
|
||||
}
|
||||
}, error -> errorCallback.onError(new NetworkError(100200, error.networkResponse.statusCode, "Testing login failed!")));
|
||||
}
|
||||
|
||||
@@ -36,10 +36,10 @@ import de.sebse.fuplanner.tools.network.NetworkErrorCallback;
|
||||
* Created by sebastian on 29.10.17.
|
||||
*/
|
||||
|
||||
public class KVVModuleList extends HTTPService {
|
||||
class KVVModuleList extends HTTPService {
|
||||
private final LoginToken token;
|
||||
private Modules moduleList;
|
||||
private AsyncQueue queueModuleDetails = new AsyncQueue();
|
||||
private final AsyncQueue queueModuleDetails = new AsyncQueue();
|
||||
|
||||
KVVModuleList(Context context, LoginToken token) {
|
||||
super(context);
|
||||
@@ -443,7 +443,6 @@ public class KVVModuleList extends HTTPService {
|
||||
callback.onResponse(loginToken);
|
||||
} catch (JSONException e) {
|
||||
errorCallback.onError(new NetworkError(100201, 403, "Cannot parse profile!"));
|
||||
return;
|
||||
}
|
||||
}, error -> errorCallback.onError(new NetworkError(100200, error.networkResponse.statusCode, "Testing login failed!")));
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
import de.sebse.fuplanner.tools.ColorRGB;
|
||||
import de.sebse.fuplanner.tools.logging.Logger;
|
||||
|
||||
public class Event implements Serializable {
|
||||
private final String id;
|
||||
@@ -14,7 +13,7 @@ public class Event implements Serializable {
|
||||
private final String title;
|
||||
private final long duration;
|
||||
private final long firstTime;
|
||||
private String siteId;
|
||||
private final String siteId;
|
||||
|
||||
public Event(String id, String type, String title, long duration, long firstTime, String siteId) {
|
||||
this.id = id;
|
||||
@@ -46,7 +45,7 @@ public class Event implements Serializable {
|
||||
}
|
||||
|
||||
public ColorRGB getColor() {
|
||||
MessageDigest digest = null;
|
||||
MessageDigest digest;
|
||||
try {
|
||||
digest = MessageDigest.getInstance("SHA-256");
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
@@ -61,20 +60,20 @@ public class Event implements Serializable {
|
||||
}
|
||||
int h = (0xff & encodedHash[0]) + (0xff & encodedHash[1]) * 255;
|
||||
h = h * 360 / 0xffff;
|
||||
int s = 0xff & encodedHash[2];
|
||||
s = s * 100 / 0xffff;
|
||||
int v = 0xff & encodedHash[3];
|
||||
v = v * 100 / 0xffff;
|
||||
//int s = 0xff & encodedHash[2];
|
||||
//s = s * 100 / 0xffff;
|
||||
//int v = 0xff & encodedHash[3];
|
||||
//v = v * 100 / 0xffff;
|
||||
|
||||
// range for more beautiful colors
|
||||
h = h / 30 * 30;
|
||||
s = 100;
|
||||
v = 50;
|
||||
int s = 100;
|
||||
int v = 50;
|
||||
|
||||
return hsvToRgb(h/360.0, s/100.0, v/100.0);
|
||||
}
|
||||
|
||||
public static ColorRGB hsvToRgb(double hue, double saturation, double value) {
|
||||
private static ColorRGB hsvToRgb(double hue, double saturation, double value) {
|
||||
int h = (int)(hue * 6);
|
||||
double f = hue * 6 - h;
|
||||
double p = value * (1 - saturation);
|
||||
|
||||
@@ -22,7 +22,7 @@ public class LoginToken implements Serializable {
|
||||
private final String username;
|
||||
private final String shibsessionKey;
|
||||
private final String shibsessionName;
|
||||
private String JSESSIONID;
|
||||
private final String JSESSIONID;
|
||||
private String fullname;
|
||||
private String email;
|
||||
private long saveDate = 0;
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.Iterator;
|
||||
|
||||
public class Modules implements Iterable<Modules.Module>, Serializable {
|
||||
private SortedListModule list;
|
||||
private LoginToken token;
|
||||
private final LoginToken token;
|
||||
//private transient Logger log = new Logger(this);
|
||||
private static final String FILE_NAME = "ModuleListSaving";
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
package de.sebse.fuplanner.services;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.volley.AuthFailureError;
|
||||
import com.android.volley.Request;
|
||||
import com.android.volley.RequestQueue;
|
||||
import com.android.volley.VolleyLog;
|
||||
import com.android.volley.toolbox.StringRequest;
|
||||
import com.android.volley.toolbox.Volley;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by sebastian on 12.10.17.
|
||||
*/
|
||||
|
||||
public class MensaPlan {
|
||||
|
||||
private final RequestQueue requestQueue;
|
||||
public MensaPlan(Context context) {
|
||||
requestQueue = Volley.newRequestQueue(context);
|
||||
}
|
||||
|
||||
public void request(int MensaID, Date date) throws JSONException {
|
||||
JSONObject post = new JSONObject();
|
||||
post.put("resources_id", 528);
|
||||
post.put("date", "2017-10-13");
|
||||
final String requestBody = post.toString();
|
||||
|
||||
StringRequest request = new StringRequest(Request.Method.POST, "https://www.stw.berlin/xhr/speiseplan-wochentag.html", response -> Log.d("MensaPlan DDDD", response), error -> Log.d("MensaPlan EEEE", error.getMessage())) {
|
||||
@Override
|
||||
public String getBodyContentType() {
|
||||
return "application/json; charset=utf-8";
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getBody() throws AuthFailureError {
|
||||
try {
|
||||
return requestBody == null ? null : requestBody.getBytes("utf-8");
|
||||
} catch (UnsupportedEncodingException uee) {
|
||||
VolleyLog.wtf("Unsupported Encoding while trying to get the bytes of %s using %s", requestBody, "utf-8");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/*@Override
|
||||
protected Response<String> parseNetworkResponse(NetworkResponse response) {
|
||||
String responseString = "";
|
||||
responseString = String.valueOf(response.statusCode);
|
||||
// can get more details such as response.headers
|
||||
|
||||
return Response.success(responseString, HttpHeaderParser.parseCacheHeaders(response));
|
||||
}*/
|
||||
};
|
||||
requestQueue.add(request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,8 +7,8 @@ import de.sebse.fuplanner.tools.network.NetworkCallback;
|
||||
import de.sebse.fuplanner.tools.network.NetworkErrorCallback;
|
||||
|
||||
public class AsyncQueue {
|
||||
private HashMap<String, LinkedList<AsyncQueueCallback>> mQueues = new HashMap<>();
|
||||
private HashMap<String, Boolean> mRunnings = new HashMap<>();
|
||||
private final HashMap<String, LinkedList<AsyncQueueCallback>> mQueues = new HashMap<>();
|
||||
private final HashMap<String, Boolean> mRunnings = new HashMap<>();
|
||||
|
||||
public void add(String hash, AsyncQueueCallback callback) {
|
||||
if (isRunning(hash))
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package de.sebse.fuplanner.tools;
|
||||
|
||||
public enum Compare {
|
||||
SMALLER,
|
||||
EQUAL,
|
||||
LARGER
|
||||
}
|
||||
@@ -97,9 +97,9 @@ public abstract class DateSortedList<T> extends ArrayList<T> {
|
||||
};
|
||||
}
|
||||
|
||||
public boolean reversed() {
|
||||
protected boolean reversed() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract long getDateByItem(T item);
|
||||
protected abstract long getDateByItem(T item);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class DateUtils {
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
|
||||
public static String getDateFormat(Locale locale, String skeleton) {
|
||||
private static String getDateFormat(Locale locale, String skeleton) {
|
||||
return DateFormat.getBestDateTimePattern(locale, skeleton);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
package de.sebse.fuplanner.tools;
|
||||
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
public class EventEmitter<T> {
|
||||
private T lastValue = null;
|
||||
private HashSet<EventListener<T>> list = new HashSet<>();
|
||||
|
||||
public EventEmitter() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
protected EventEmitter(T value) {
|
||||
this.lastValue = value;
|
||||
}
|
||||
|
||||
public boolean emitterAdd(EventListener<T> listener) {
|
||||
return list.add(listener);
|
||||
}
|
||||
|
||||
public boolean emitterAddEmit(EventListener<T> listener) {
|
||||
listener.onResponse(this.lastValue);
|
||||
return list.add(listener);
|
||||
}
|
||||
|
||||
public boolean emitterRemove(EventListener<T> listener) {
|
||||
return list.remove(listener);
|
||||
}
|
||||
|
||||
protected void emit(T value) {
|
||||
this.lastValue = value;
|
||||
for (EventListener<T> emitter: list) {
|
||||
emitter.onResponse(value);
|
||||
}
|
||||
}
|
||||
|
||||
public interface EventListener<T> {
|
||||
void onResponse(T value);
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package de.sebse.fuplanner.tools;
|
||||
|
||||
import android.support.annotation.StringRes;
|
||||
|
||||
import de.sebse.fuplanner.fragments.canteen.DaySwitcherFragment;
|
||||
import de.sebse.fuplanner.services.Canteen.CanteenBrowser;
|
||||
import de.sebse.fuplanner.services.GoogleAuth.GoogleAuth;
|
||||
import de.sebse.fuplanner.services.KVV.KVV;
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Iterator;
|
||||
|
||||
public abstract class SortedList<T, I, F> implements Iterable<T>, Serializable {
|
||||
|
||||
private ArrayList<T> internalList = new ArrayList<>();
|
||||
private final ArrayList<T> internalList = new ArrayList<>();
|
||||
|
||||
public void add(T e) {
|
||||
internalList.add(e);
|
||||
@@ -21,11 +21,11 @@ public abstract class SortedList<T, I, F> implements Iterable<T>, Serializable {
|
||||
this.internalList.remove(index);
|
||||
}
|
||||
|
||||
public abstract int compare(T o1, T o2);
|
||||
protected abstract int compare(T o1, T o2);
|
||||
|
||||
public abstract boolean hasIdentifier(T o1, I id);
|
||||
protected abstract boolean hasIdentifier(T o1, I id);
|
||||
|
||||
public abstract boolean hasFilter(T o1, F filter);
|
||||
protected abstract boolean hasFilter(T o1, F filter);
|
||||
|
||||
@Nullable
|
||||
public T get(int i) {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package de.sebse.fuplanner.tools;
|
||||
|
||||
public class Triplet<T, U, V> {
|
||||
|
||||
private final T first;
|
||||
private final U second;
|
||||
private final V third;
|
||||
|
||||
public Triplet(T first, U second, V third) {
|
||||
this.first = first;
|
||||
this.second = second;
|
||||
this.third = third;
|
||||
}
|
||||
|
||||
public T getFirst() { return first; }
|
||||
public U getSecond() { return second; }
|
||||
public V getThird() { return third; }
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class BetterHurlStack extends HurlStack {
|
||||
private final UrlRewriter mUrlRewriter;
|
||||
private final SSLSocketFactory mSslSocketFactory;
|
||||
@SuppressWarnings({"unused", "FieldCanBeLocal"})
|
||||
private boolean followRedirects; // TODO auto-redirect
|
||||
private final boolean followRedirects; // TODO auto-redirect
|
||||
|
||||
BetterHurlStack() {
|
||||
this(true);
|
||||
|
||||
@@ -24,14 +24,14 @@ import de.sebse.fuplanner.tools.logging.Logger;
|
||||
*/
|
||||
|
||||
public class HTTPService {
|
||||
private RequestQueue requestQueue;
|
||||
private final RequestQueue requestQueue;
|
||||
protected Logger log = new Logger(this);
|
||||
|
||||
public HTTPService(Context context) {
|
||||
protected HTTPService(Context context) {
|
||||
this(context, false);
|
||||
}
|
||||
|
||||
public HTTPService(Context context, boolean followRedirects) {
|
||||
protected HTTPService(Context context, boolean followRedirects) {
|
||||
requestQueue = Volley.newRequestQueue(context, new BetterHurlStack(followRedirects));
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.io.UnsupportedEncodingException;
|
||||
* Created by sebastian on 24.10.17.
|
||||
*/
|
||||
|
||||
public class HttpRequest extends Request<Result> {
|
||||
class HttpRequest extends Request<Result> {
|
||||
private static final int MY_SOCKET_TIMEOUT_MS = 15000;
|
||||
private final Response.Listener<Result> mListener;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.Calendar;
|
||||
* Created by Raquib on 1/6/2015.
|
||||
*/
|
||||
public interface DateTimeInterpreter {
|
||||
public String interpretDate(Calendar date);
|
||||
String interpretDate(Calendar date);
|
||||
|
||||
public String interpretTime(int hour, int minutes);
|
||||
String interpretTime(int hour, int minutes);
|
||||
}
|
||||
|
||||
@@ -25,10 +25,6 @@ public class WeekViewEvent {
|
||||
private boolean mAllDay;
|
||||
private Shader mShader;
|
||||
|
||||
public WeekViewEvent() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the event for week view.
|
||||
*
|
||||
@@ -65,27 +61,6 @@ public class WeekViewEvent {
|
||||
this.mName = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the event for week view.
|
||||
*
|
||||
* @param id The id of the event.
|
||||
* @param name Name of the event.
|
||||
* @param startYear Year when the event starts.
|
||||
* @param startMonth Month when the event starts.
|
||||
* @param startDay Day when the event starts.
|
||||
* @param startHour Hour (in 24-hour format) when the event starts.
|
||||
* @param startMinute Minute when the event starts.
|
||||
* @param endYear Year when the event ends.
|
||||
* @param endMonth Month when the event ends.
|
||||
* @param endDay Day when the event ends.
|
||||
* @param endHour Hour (in 24-hour format) when the event ends.
|
||||
* @param endMinute Minute when the event ends.
|
||||
*/
|
||||
@Deprecated
|
||||
public WeekViewEvent(long id, String name, int startYear, int startMonth, int startDay, int startHour, int startMinute, int endYear, int endMonth, int endDay, int endHour, int endMinute) {
|
||||
this(String.valueOf(id), name, startYear, startMonth, startDay, startHour, startMinute, endYear, endMonth, endDay, endHour, endMinute);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the event for week view.
|
||||
*
|
||||
@@ -107,22 +82,6 @@ public class WeekViewEvent {
|
||||
this.mShader = shader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the event for week view.
|
||||
*
|
||||
* @param id The id of the event.
|
||||
* @param name Name of the event.
|
||||
* @param location The location of the event.
|
||||
* @param startTime The time when the event starts.
|
||||
* @param endTime The time when the event ends.
|
||||
* @param allDay Is the event an all day event.
|
||||
* @param shader the Shader of the event rectangle
|
||||
*/
|
||||
@Deprecated
|
||||
public WeekViewEvent(long id, String name, String location, Calendar startTime, Calendar endTime, boolean allDay, Shader shader) {
|
||||
this(String.valueOf(id), name, location, startTime, endTime, allDay, shader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the event for week view.
|
||||
*
|
||||
@@ -137,21 +96,6 @@ public class WeekViewEvent {
|
||||
this(id, name, location, startTime, endTime, allDay, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the event for week view.
|
||||
*
|
||||
* @param id The id of the event.
|
||||
* @param name Name of the event.
|
||||
* @param location The location of the event.
|
||||
* @param startTime The time when the event starts.
|
||||
* @param endTime The time when the event ends.
|
||||
* @param allDay Is the event an all day event
|
||||
*/
|
||||
@Deprecated
|
||||
public WeekViewEvent(long id, String name, String location, Calendar startTime, Calendar endTime, boolean allDay) {
|
||||
this(id, name, location, startTime, endTime, allDay, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the event for week view.
|
||||
*
|
||||
@@ -165,45 +109,6 @@ public class WeekViewEvent {
|
||||
this(id, name, location, startTime, endTime, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the event for week view.
|
||||
*
|
||||
* @param id The id of the event.
|
||||
* @param name Name of the event.
|
||||
* @param location The location of the event.
|
||||
* @param startTime The time when the event starts.
|
||||
* @param endTime The time when the event ends.
|
||||
*/
|
||||
@Deprecated
|
||||
public WeekViewEvent(long id, String name, String location, Calendar startTime, Calendar endTime) {
|
||||
this(id, name, location, startTime, endTime, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the event for week view.
|
||||
*
|
||||
* @param id The id of the event specified as String.
|
||||
* @param name Name of the event.
|
||||
* @param startTime The time when the event starts.
|
||||
* @param endTime The time when the event ends.
|
||||
*/
|
||||
public WeekViewEvent(String id, String name, Calendar startTime, Calendar endTime) {
|
||||
this(id, name, null, startTime, endTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the event for week view.
|
||||
*
|
||||
* @param id The id of the event.
|
||||
* @param name Name of the event.
|
||||
* @param startTime The time when the event starts.
|
||||
* @param endTime The time when the event ends.
|
||||
*/
|
||||
@Deprecated
|
||||
public WeekViewEvent(long id, String name, Calendar startTime, Calendar endTime) {
|
||||
this(id, name, null, startTime, endTime);
|
||||
}
|
||||
|
||||
public Calendar getStartTime() {
|
||||
return mStartTime;
|
||||
}
|
||||
@@ -295,7 +200,7 @@ public class WeekViewEvent {
|
||||
|
||||
public List<WeekViewEvent> splitWeekViewEvents() {
|
||||
//This function splits the WeekViewEvent in WeekViewEvents by day
|
||||
List<WeekViewEvent> events = new ArrayList<WeekViewEvent>();
|
||||
List<WeekViewEvent> events = new ArrayList<>();
|
||||
// The first millisecond of the next day is still the same day. (no need to split events for this).
|
||||
Calendar endTime = (Calendar) this.getEndTime().clone();
|
||||
endTime.add(Calendar.MILLISECOND, -1);
|
||||
|
||||
@@ -48,10 +48,7 @@ public class WeekViewUtil {
|
||||
*/
|
||||
public static boolean isSameDayAndHour(Calendar dateOne, Calendar dateTwo) {
|
||||
|
||||
if (dateTwo != null) {
|
||||
return isSameDay(dateOne, dateTwo) && dateOne.get(Calendar.HOUR_OF_DAY) == dateTwo.get(Calendar.HOUR_OF_DAY);
|
||||
}
|
||||
return false;
|
||||
return dateTwo != null && isSameDay(dateOne, dateTwo) && dateOne.get(Calendar.HOUR_OF_DAY) == dateTwo.get(Calendar.HOUR_OF_DAY);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,8 +75,8 @@ public class WeekViewUtil {
|
||||
/**
|
||||
* Returns the amount of minutes in the given hours and minutes
|
||||
*
|
||||
* @param hour
|
||||
* @param minute
|
||||
* @param hour Amount of hours
|
||||
* @param minute Amount of minutes
|
||||
* @return amount of minutes in the given hours and minutes
|
||||
*/
|
||||
public static int getPassedMinutesInDay(int hour, int minute) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
android:layout_below="@id/title"
|
||||
android:textColor="#343434"
|
||||
android:textSize="30sp"
|
||||
android:text="/"
|
||||
android:text="@string/grade_separator"
|
||||
android:layout_toLeftOf="@id/grade_max"
|
||||
android:layout_toStartOf="@id/grade_max"
|
||||
android:layout_alignTop="@id/title" />
|
||||
|
||||
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 30 KiB |
@@ -31,11 +31,12 @@
|
||||
<string name="past_events">Vergangene Veranstaltungen</string>
|
||||
<string name="events">Veranstaltungen</string>
|
||||
<string name="gradebook">Noten</string>
|
||||
<string name="current_percentage">Aktuelle Prozentzahl</string>
|
||||
<string name="current_percentage">Aktuelle Prozentzahl: %1$.2f \%%</string>
|
||||
<string name="offline_mode">Offline-Modus</string>
|
||||
<string name="refresh_failed">Aktualisieren fehlgeschlagen…</string>
|
||||
<string name="share_intent">Hey, schau\' dir die neue KVV App an: %1$s</string>
|
||||
<string name="refresh">"Aktualisieren"</string>
|
||||
<string name="go_to_today">Heute</string>
|
||||
<string name="canteens">Kantinen</string>
|
||||
<string name="grade_separator">/</string>
|
||||
</resources>
|
||||
4
app/src/main/res/values-ldrtl/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="grade_separator">/</string>
|
||||
</resources>
|
||||
@@ -1,4 +1,4 @@
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<resources>
|
||||
<item name="ic_menu_camera" type="drawable">@android:drawable/ic_menu_camera</item>
|
||||
<item name="ic_menu_gallery" type="drawable">@android:drawable/ic_menu_gallery</item>
|
||||
<item name="ic_menu_slideshow" type="drawable">@android:drawable/ic_menu_slideshow</item>
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="app_name" translatable="false">FU Planner</string>
|
||||
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
|
||||
<string name="action_settings">Settings</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="overview">Overview</string>
|
||||
<string name="announcements">Announcements</string>
|
||||
<string name="lorem_ipsum_100" translatable="false">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</string>
|
||||
<string name="lorem_ipsum_100" translatable="false" tools:keep="@string/lorem_ipsum_100">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</string>
|
||||
<string name="description">Description</string>
|
||||
<string name="announcements_count">Announcements (%1$d)</string>
|
||||
<string name="cd_ic_launcher">App Icon</string>
|
||||
@@ -31,13 +27,13 @@
|
||||
<string name="date_scale">%1$s - %2$s</string>
|
||||
<string name="open">Open</string>
|
||||
<string name="close">Close</string>
|
||||
<string name="hello_blank_fragment" translatable="false">Hello blank fragment</string>
|
||||
<string name="hello_blank_fragment" translatable="false" tools:keep="@string/hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="enter_offline_mode">Enter Offline Mode (%1$s)</string>
|
||||
<string name="no_items_available">No items available!</string>
|
||||
<string name="past_events">Past Events</string>
|
||||
<string name="events">Events</string>
|
||||
<string name="gradebook">Gradebook</string>
|
||||
<string name="current_percentage">Current Percentage</string>
|
||||
<string name="current_percentage">Current Percentage: %1$.2f \%%</string>
|
||||
<string name="offline_mode">Offline Mode</string>
|
||||
<string name="refresh_failed">Refresh failed…</string>
|
||||
<string name="share_intent">Hey, check out the new KVV app: %1$s</string>
|
||||
@@ -47,4 +43,5 @@
|
||||
<string name="canteens">Canteens</string>
|
||||
<string name="prices" translatable="false">%1$.2f€ / %2$.2f€ / %3$.2f€</string>
|
||||
<string name="price" translatable="false">%1$.2f€</string>
|
||||
<string name="grade_separator">/</string>
|
||||
</resources>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar" tools:keep="@style/AppTheme">
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar">
|
||||
<style name="AppTheme.NoActionBar" tools:keep="@style/AppTheme_NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||