Commit 3fe317fd authored by Lennart Bader's avatar Lennart Bader
Browse files

Fixed no content bug for TFG and Plan Fragment,

added new launcher,
renamed package,
added ACRA support,
added name + email for feedback,
fixed showcases
parent fb06d581
......@@ -4,11 +4,11 @@ android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "de.mytfg.apps.vplan"
applicationId "de.mytfg.apps.mytfg"
minSdkVersion 15
targetSdkVersion 25
versionCode 4
versionName "0.4b"
versionCode 6
versionName "0.5.1b"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
......@@ -31,4 +31,5 @@ dependencies {
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.github.amlcurran.showcaseview:library:5.4.3'
compile 'ch.acra:acra:4.7.0'
}
package de.mytfg.apps.vplan;
package de.mytfg.apps.mytfg;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
package="de.mytfg.apps.vplan">
package="de.mytfg.apps.mytfg">
<!-- To perform API requests -->
<uses-permission android:name="android.permission.INTERNET" />
......@@ -9,12 +9,13 @@
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher_mytfg_text"
android:icon="@mipmap/mytfg_launcher_raw"
android:label="@string/app_name"
android:supportsRtl="true"
android:name=".MytfgVplan"
android:theme="@style/AppTheme.Base">
<activity android:name=".activities.MainActivity"
<activity android:name="de.mytfg.apps.mytfg.activities.MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.Base"
android:windowSoftInputMode="adjustPan"
......
package de.mytfg.apps.mytfg;
import android.app.Application;
import org.acra.ACRA;
import org.acra.annotation.ReportsCrashes;
/**
* Created by lbader on 03.12.16.
*/
@ReportsCrashes(
formUri = "https://acra.lbader.de/acra.php",
//formUriBasicAuthLogin = "your username", // optional
//formUriBasicAuthPassword = "your password", // optional
reportType = org.acra.sender.HttpSender.Type.JSON,
sendReportsAtShutdown = false
)
public class MytfgVplan extends Application {
@Override
public void onCreate() {
ACRA.init(this);
super.onCreate();
}
}
package de.mytfg.apps.vplan.activities;
package de.mytfg.apps.mytfg.activities;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
......@@ -9,22 +9,23 @@ import android.support.design.widget.NavigationView;
import android.support.v4.widget.DrawerLayout;
import android.view.Menu;
import android.view.MenuItem;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.api.MyTFGApi;
import de.mytfg.apps.vplan.fragments.AboutFragment;
import de.mytfg.apps.vplan.fragments.AuthenticationFragment;
import de.mytfg.apps.vplan.fragments.FeedbackFragment;
import de.mytfg.apps.vplan.fragments.LinksFragment;
import de.mytfg.apps.vplan.fragments.OfficeFragment;
import de.mytfg.apps.vplan.fragments.SettingsFragment;
import de.mytfg.apps.vplan.fragments.LoginFragment;
import de.mytfg.apps.vplan.fragments.PlanFragment;
import de.mytfg.apps.vplan.fragments.TfgFragment;
import de.mytfg.apps.vplan.fragments.VrrFragment;
import de.mytfg.apps.vplan.navigation.Navigation;
import de.mytfg.apps.vplan.toolbar.ToolbarManager;
import de.mytfg.apps.vplan.tools.Settings;
import android.widget.EditText;
import de.mytfg.apps.mytfg.R;
import de.mytfg.apps.mytfg.api.MyTFGApi;
import de.mytfg.apps.mytfg.fragments.AboutFragment;
import de.mytfg.apps.mytfg.fragments.AuthenticationFragment;
import de.mytfg.apps.mytfg.fragments.FeedbackFragment;
import de.mytfg.apps.mytfg.fragments.LinksFragment;
import de.mytfg.apps.mytfg.fragments.OfficeFragment;
import de.mytfg.apps.mytfg.fragments.SettingsFragment;
import de.mytfg.apps.mytfg.fragments.LoginFragment;
import de.mytfg.apps.mytfg.fragments.PlanFragment;
import de.mytfg.apps.mytfg.fragments.TfgFragment;
import de.mytfg.apps.mytfg.fragments.VrrFragment;
import de.mytfg.apps.mytfg.navigation.Navigation;
import de.mytfg.apps.mytfg.toolbar.ToolbarManager;
import de.mytfg.apps.mytfg.tools.Settings;
public class MainActivity extends AppCompatActivity {
private NavigationView navigationView;
......@@ -123,7 +124,7 @@ public class MainActivity extends AppCompatActivity {
// Read Landing Page from settings
String fragName = settings.getString("landing_page");
try {
fragName = "de.mytfg.apps.vplan.fragments." + fragName;
fragName = "de.mytfg.apps.mytfg.fragments." + fragName;
Class c = Class.forName(fragName);
fragment = (AuthenticationFragment)c.newInstance();
} catch (Exception ex) {
......
package de.mytfg.apps.vplan.adapters;
package de.mytfg.apps.mytfg.adapters;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.text.Html;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.api.MyTFGApi;
import de.mytfg.apps.vplan.objects.TfgEventsEntry;
import de.mytfg.apps.vplan.objects.TfgNewsEntry;
import de.mytfg.apps.vplan.tools.Settings;
import de.mytfg.apps.mytfg.R;
import de.mytfg.apps.mytfg.api.MyTFGApi;
import de.mytfg.apps.mytfg.objects.TfgEventsEntry;
public class EventsEntryHolder extends RecyclerView.ViewHolder {
private TextView title;
......
package de.mytfg.apps.vplan.adapters;
package de.mytfg.apps.mytfg.adapters;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.fragments.FragmentHolderLogic;
import de.mytfg.apps.mytfg.fragments.FragmentHolderLogic;
public class FragmentHolder extends Fragment {
int resId;
......@@ -40,10 +38,8 @@ public class FragmentHolder extends Fragment {
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
resId = getArguments().getInt("fraglayout");
View view = inflater.inflate(resId, container, false);;
Log.d("FH", "onCreateView");
if (logic != null) {
Log.d("FH", "Logic exists");
logic.init(getContext(), view, getArguments());
}
return view;
......
package de.mytfg.apps.vplan.adapters;
package de.mytfg.apps.mytfg.adapters;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.text.Html;
import android.view.View;
import android.widget.TextView;
import java.util.Set;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.objects.TfgNewsEntry;
import de.mytfg.apps.vplan.objects.VplanEntry;
import de.mytfg.apps.vplan.tools.Settings;
import static android.view.View.GONE;
import de.mytfg.apps.mytfg.R;
import de.mytfg.apps.mytfg.objects.TfgNewsEntry;
import de.mytfg.apps.mytfg.tools.Settings;
public class NewsEntryHolder extends RecyclerView.ViewHolder {
private TextView title;
......
package de.mytfg.apps.vplan.adapters;
package de.mytfg.apps.mytfg.adapters;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.objects.VplanEntry;
import de.mytfg.apps.vplan.tools.Settings;
import de.mytfg.apps.mytfg.R;
import de.mytfg.apps.mytfg.objects.VplanEntry;
import de.mytfg.apps.mytfg.tools.Settings;
import static android.view.View.GONE;
......
package de.mytfg.apps.vplan.adapters;
package de.mytfg.apps.mytfg.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
......@@ -9,9 +9,8 @@ import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.UUID;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.objects.TfgEventsEntry;
import de.mytfg.apps.vplan.objects.TfgNewsEntry;
import de.mytfg.apps.mytfg.R;
import de.mytfg.apps.mytfg.objects.TfgEventsEntry;
public class RecylcerEventsAdapter extends RecyclerView.Adapter<EventsEntryHolder> {
private Context context;
......
package de.mytfg.apps.vplan.adapters;
package de.mytfg.apps.mytfg.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
......@@ -9,9 +9,8 @@ import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.UUID;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.objects.TfgNewsEntry;
import de.mytfg.apps.vplan.objects.VplanEntry;
import de.mytfg.apps.mytfg.R;
import de.mytfg.apps.mytfg.objects.TfgNewsEntry;
public class RecylcerNewsAdapter extends RecyclerView.Adapter<NewsEntryHolder> {
private Context context;
......
package de.mytfg.apps.vplan.adapters;
package de.mytfg.apps.mytfg.adapters;
import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.util.Pair;
import android.support.v4.view.ViewCompat;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.UUID;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.objects.VplanEntry;
import de.mytfg.apps.mytfg.R;
import de.mytfg.apps.mytfg.objects.VplanEntry;
public class RecylcerPlanAdapter extends RecyclerView.Adapter<PlanEntryHolder> {
private Context context;
......
package de.mytfg.apps.vplan.adapters;
package de.mytfg.apps.mytfg.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
......@@ -9,9 +9,8 @@ import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.UUID;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.objects.TfgNewsEntry;
import de.mytfg.apps.vplan.objects.VrrEntry;
import de.mytfg.apps.mytfg.R;
import de.mytfg.apps.mytfg.objects.VrrEntry;
public class RecylcerVrrAdapter extends RecyclerView.Adapter<VrrEntryHolder> {
private Context context;
......
package de.mytfg.apps.vplan.adapters;
package de.mytfg.apps.mytfg.adapters;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentStatePagerAdapter;
import java.util.ArrayList;
......
package de.mytfg.apps.vplan.adapters;
package de.mytfg.apps.mytfg.adapters;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.text.Html;
import android.view.View;
import android.widget.TextView;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.objects.TfgNewsEntry;
import de.mytfg.apps.vplan.objects.VrrEntry;
import de.mytfg.apps.vplan.tools.Settings;
import de.mytfg.apps.mytfg.R;
import de.mytfg.apps.mytfg.objects.VrrEntry;
public class VrrEntryHolder extends RecyclerView.ViewHolder {
private TextView line;
......
package de.mytfg.apps.vplan.api;
package de.mytfg.apps.mytfg.api;
import org.json.JSONObject;
......
package de.mytfg.apps.vplan.api;
package de.mytfg.apps.mytfg.api;
import java.util.HashMap;
import java.util.Locale;
......
package de.mytfg.apps.vplan.api;
package de.mytfg.apps.mytfg.api;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.util.ArraySet;
import android.util.Log;
import android.view.View;
import android.widget.ProgressBar;
......@@ -17,17 +14,14 @@ import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
......@@ -37,13 +31,12 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import javax.net.ssl.HttpsURLConnection;
import de.mytfg.apps.vplan.R;
import de.mytfg.apps.vplan.objects.User;
import de.mytfg.apps.vplan.objects.Vplan;
import de.mytfg.apps.mytfg.R;
import de.mytfg.apps.mytfg.objects.User;
import de.mytfg.apps.mytfg.objects.Vplan;
/**
* Wrapper for the MyTFG API. Handles Login tokens, authentication errors and result parsing.
......
package de.mytfg.apps.vplan.api;
package de.mytfg.apps.mytfg.api;
import org.json.JSONObject;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment