...
 
Commits (12)
  • Toni Beier's avatar
    Update build tools version to 28.0.3 · 35d6f8e7
    Toni Beier authored
    35d6f8e7
  • Toni Beier's avatar
    Set minsdk to 16 and target version to 26 · 1d94ec48
    Toni Beier authored
    1d94ec48
  • Toni Beier's avatar
    update librarys · ac568cea
    Toni Beier authored
    ac568cea
  • Toni Beier's avatar
    Favorites has been implemented in this new feature · 78d32800
    Toni Beier authored
    Changes that I have made are as following:
    - Changed ListViews with RecyclerView for better performance and to handle some relational tasks of two lists.
    - Changed the Refresh with SwipeRefreshLayout because the old way was too bad coding practice.
    - A few GUI changes like limiting the long text to be shown on screen and adding a favorite icon to support favorites.
    - SingleStationActivity has now a separate api call to individually handle one station data in it. This saves us a lot of time to get data in PTSFragment (now we're only calling 2 departures not all of them). Secondly SwipeRefreshLayout has been implemented in this Activity too. To provide user to Refresh the data for a single station by staying on the SingleStationActivity.
    - Removed a few commented code that was no longer needed.
    
    New things that I have made in this new Feature are as following:
    - Created a few classes like (PTSFavAdapter: for RecyclerView of Favorites, DepartureList: for handling a list of Departures in the SingleStationActivity and PTSInterface: this is a generic interface it can be used in future too for two type of functionality onItemRemoved and onItemAdded, it can be further expanded as per our will in future).
    - Created a pts_fav_list_item.xml in res/layout to handle data on every row of favorites RecyclerView.
    - Added a delete icon for deleting favorites from the list if they're not needed anymore
    
    What have we achieved in this new Feature:
    - First of all we have finally configured favorites as a feature inside the PTS Module.
    - The layout is improved
    - You can add or delete favorites very easily(For adding just click on stars in nearby List. While for deleting or to Un-favorite something just swipe to left or click on the yellow star to Un-favorite a station) and there is an undo functionality too.
    - Less amount of data being called from server which saves us cost on memory and time.
    - And frequent refreshing of data on every screen.
    78d32800
  • Toni Beier's avatar
    Merge branch 'feature/public_transportation_system/favorites' into 'develop' · d64281b6
    Toni Beier authored
    Feature/public transportation system/favorites
    
    See merge request OpenASiST/openasist4android_core!28
    d64281b6
  • Toni Beier's avatar
    Translate english text to german in pts modul · e7097d7f
    Toni Beier authored
    e7097d7f
  • Toni Beier's avatar
    Rework translation to better german · fd4b06f2
    Toni Beier authored
    fd4b06f2
  • Toni Beier's avatar
    Merge branch 'fix/pts/rework_favorite_translation' into 'develop' · 33d9b1f4
    Toni Beier authored
    Überarbeitung der Übersetzung für die Haltestellenfavoriten
    
    See merge request OpenASiST/openasist4android_core!29
    33d9b1f4
  • Toni Beier's avatar
    Change Color-Schema in #ARGB · 246d3dd6
    Toni Beier authored
    246d3dd6
  • Toni Beier's avatar
    Activate old http apache legacy · 84cab8c4
    Toni Beier authored
    84cab8c4
  • Toni Beier's avatar
    f9ef485d
  • Toni Beier's avatar
    Handling if timetable code is not available · 21393b02
    Toni Beier authored
    If the timetable code is not avaiabble the server send a null object instat a course list.
    The app handle the null value and display a hint for the user.
    21393b02
......@@ -47,7 +47,7 @@
</service>
<service android:name=".core.manager.push.FirebaseIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
......
......@@ -16,6 +16,8 @@ repositories {
android {
useLibrary 'org.apache.http.legacy'
publishNonDefault true
sourceSets {
main {
......@@ -31,10 +33,10 @@ android {
androidTest.setRoot('tests')
}
compileSdkVersion 28
buildToolsVersion '25.0.3'
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
minSdkVersion 21
targetSdkVersion 26
useLibrary 'org.apache.http.legacy'
versionCode 1
versionName '1.0'
......@@ -128,34 +130,38 @@ def parseFile(name) {
}
dependencies {
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'me.dm7.barcodescanner:zxing:1.9.8'
implementation 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.4'
//compile 'com.j256.ormlite:ormlite-core:4.48'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.4'
//android support libraries
//simply compile google maps only
//compile 'com.google.android.gms:play-services:11.8.0'
compile 'com.google.android.gms:play-services-maps:12.0.1'
compile 'com.google.android.gms:play-services-location:12.0.1'
compile 'com.google.firebase:firebase-core:12.0.1'
compile 'com.google.firebase:firebase-messaging:12.0.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.jjoe64:graphview:3.1.3'
compile 'com.github.machinarius:preferencefragment:0.1.2'
compile 'com.loopj.android:android-async-http:1.4.5'
compile 'org.greenrobot:eventbus:3.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support.constraint:constraint-layout:1.1.3'
compile 'com.android.support:preference-v7:28.0.0'
//compile 'com.google.android.gms:play-services:12.0.1'
compile 'com.google.android.gms:play-services-maps:17.0.0'
compile 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.jjoe64:graphview:3.1.3'
implementation 'com.github.machinarius:preferencefragment:0.1.2'
implementation 'com.loopj.android:android-async-http:1.4.5'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha4'
implementation 'androidx.preference:preference:1.0.0'
// AndroidX Libraries
implementation 'androidx.work:work-runtime:2.0.0'
implementation 'androidx.work:work-runtime:2.1.0'
implementation group: 'androidx.appcompat', name: 'appcompat', version: '1.0.2'
// Material Design Libraries
implementation 'com.google.android.material:material:1.0.0'
//HTTP Library
implementation 'com.android.volley:volley:1.1.1'
}
allprojects {
......
......@@ -2,6 +2,7 @@ package de.bps.asist.core.manager.parser;
import android.content.res.Resources;
import android.os.Build;
import android.util.Log;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper;
......@@ -43,6 +44,7 @@ public class ASiSTParser {
public <T extends Serializable> void parseWithTask(final String url, final Class<T> cl, final ParserCallback<T> callback){
final BackgroundParserTask<T> parser = new BackgroundParserTask<>(url, cl, callback, createStandartClientHttpRequestFactory());
parser.execute();
}
/**
......
......@@ -4,7 +4,9 @@ import android.content.Context;
import android.util.Log;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService;
//import com.google.firebase.iid.FirebaseInstanceIdService;
import com.google.firebase.messaging.FirebaseMessagingService;
import de.bps.asist.core.manager.environment.EnvironmentManager;
......@@ -12,7 +14,7 @@ import de.bps.asist.core.manager.environment.EnvironmentManager;
* Created by EPereira on 06.02.2017.
*/
public class FirebaseIDService extends FirebaseInstanceIdService {
public class FirebaseIDService extends FirebaseMessagingService {
private static final String TAG = "FirebaseIDService";
private EnvironmentManager environment;
......@@ -26,18 +28,23 @@ public class FirebaseIDService extends FirebaseInstanceIdService {
environment = EnvironmentManager.getInstance();
pnm = PushNotificationManager.getInstance();
}
@Override
public void onTokenRefresh() {
public void onNewToken(String token) {
Log.d(TAG, "Refreshed token: " + token);
// Get updated InstanceID token.
String refreshedToken = FirebaseInstanceId.getInstance().getToken();
//String refreshedToken = FirebaseInstanceId.getInstance().getToken();
//Log.d(TAG, "Refreshed token: " + refreshedToken);
// If you want to send messages to this application instance or
// manage this apps subscriptions on the server side, send the
// Instance ID token to your app server.
environment.setDeviceToken(context, refreshedToken);
pnm.registerDevice(context, refreshedToken);
sendRegistrationToServer(token);
}
private void sendRegistrationToServer(String token) {
//this method is to send token to your app server.
environment.setDeviceToken(context, token);
pnm.registerDevice(context, token);
}
}
\ No newline at end of file
package de.bps.asist.core.manager.push;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import com.google.firebase.iid.FirebaseInstanceId;
import java.util.UUID;
import org.json.JSONException;
import org.json.JSONObject;
import de.bps.asist.core.manager.environment.ASiSTCoreDataManager;
import de.bps.asist.core.manager.environment.EnvironmentManager;
import de.bps.asist.core.util.ASiSTPostSender;
public class PushNotificationManager {
......@@ -22,7 +27,8 @@ public class PushNotificationManager {
private static final String REGISTER_FOR_C2DM = "com.google.android.c2dm.intent.REGISTER";
private static final PushNotificationManager INSTANCE = new PushNotificationManager();
private static final String TAG = "PushNotificationManager";
private static final String REQUEST_TAG = "DeviceTokenRequest";
private PushNotificationManager() {
//
}
......@@ -34,27 +40,20 @@ public class PushNotificationManager {
public void registerDevice(Context context, String token) {
EnvironmentManager.getInstance().setDeviceToken(context, token);
ASiSTCoreDataManager.getInstance().init(context);
final String rootUrl = ASiSTCoreDataManager.getInstance().getRootUrl();
final StringBuilder url = new StringBuilder(rootUrl);
url.append("/device/");
url.append(ASiSTCoreDataManager.getInstance().getInstitutionName());
url.append("/register/ANDROID");
ASiSTPostSender sender = new ASiSTPostSender();
sender.execute(url.toString(), token);
sendDeviceToken(context, token);
}
public void tryRegisterDevice(Context context) {
String token = EnvironmentManager.getInstance().getDeviceToken(context);
if (token.equalsIgnoreCase(C2DM_ID_NOT_SET)) {
token = FirebaseInstanceId.getInstance().getToken();
if (token == null) {
//Log.w(TAG, "Firebase Device ID is not available. Creation is still running, FirebaseIDService.onTokenRefresh should be called later by the system.");
} else {
EnvironmentManager.getInstance().setDeviceToken(context, token);
registerDevice(context, token);
}
sendDeviceToken(context, token);
}
}
//do nothing if getDeviceToken is already a real token. If this happens, the token should
......@@ -62,7 +61,7 @@ public class PushNotificationManager {
}
public void registerPushUID(Context context, String pushUid){
public void registerPushUID(Context context, String pushUid) {
String token = EnvironmentManager.getInstance().getDeviceToken(context);
if (token == null || token.equalsIgnoreCase(C2DM_ID_NOT_SET)) {
......@@ -70,14 +69,58 @@ public class PushNotificationManager {
} else {
EnvironmentManager.getInstance().setDeviceToken(context, token);
ASiSTCoreDataManager.getInstance().init(context);
final String rootUrl = ASiSTCoreDataManager.getInstance().getRootUrl();
final StringBuilder url = new StringBuilder(rootUrl);
url.append("/device/");
url.append(ASiSTCoreDataManager.getInstance().getInstitutionName());
url.append("/lms/");
url.append(pushUid);
ASiSTPostSender sender = new ASiSTPostSender();
sender.execute(url.toString(), token);
Uri pushUidRequestUrl = Uri.parse(ASiSTCoreDataManager.getInstance().getRootUrl())
.buildUpon()
.appendPath("device")
.appendPath(ASiSTCoreDataManager.getInstance().getInstitutionName())
.appendPath("lms")
.appendPath(pushUid)
.build();
sendDeviceToken(context, token, pushUidRequestUrl);
}
}
public void sendDeviceToken(Context context, final String deviceToken) {
//Build POST-Uri
Uri pushNotificationTokenRequestUrl = Uri.parse(ASiSTCoreDataManager.getInstance().getRootUrl())
.buildUpon()
.appendPath("device")
.appendPath(ASiSTCoreDataManager.getInstance().getInstitutionName())
.appendPath("register")
.appendPath("ANDROID")
.build();
sendDeviceToken(context, deviceToken, pushNotificationTokenRequestUrl);
}
public void sendDeviceToken(Context context, final String deviceToken, final Uri postUri) {
try {
JSONObject content = new JSONObject();
content.put("token", deviceToken);
JsonObjectRequest pushNotifikationTokenRequest = new JsonObjectRequest(Request.Method.POST, postUri.toString(), content,
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
Log.d(REQUEST_TAG, "Device Token(" + deviceToken + ") sendet.");
}
},
new Response.ErrorListener() {
public void onErrorResponse(VolleyError error) {
Log.d(REQUEST_TAG, "DeviceToken not send", error);
}
});
pushNotifikationTokenRequest.setShouldRetryServerErrors(true);
pushNotifikationTokenRequest.setTag("PushNotificationTokenRequest");
RequestQueue pushNotificationTokenRequestQueue = Volley.newRequestQueue(context);
pushNotificationTokenRequestQueue.add(pushNotifikationTokenRequest);
EnvironmentManager.getInstance().setDeviceToken(context, deviceToken);
} catch (JSONException e) {
Log.e(REQUEST_TAG, "Can't create Request", e);
}
}
}
}
\ No newline at end of file
......@@ -26,8 +26,8 @@ public class CanteenFragment extends AbstractASiSTFragment {
private ListView menus;
/**
* @see android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater,
/*
* @see androidx.core.app.Fragment#onCreateView(android.view.LayoutInflater,
* android.view.ViewGroup, android.os.Bundle)
*/
@Override
......
......@@ -22,8 +22,8 @@ public class FeedFragment extends AbstractASiSTFragment {
private ListView listView;
/**
* @see android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater,
/*
* @see androidx.core.app.Fragment#onCreateView(android.view.LayoutInflater,
* android.view.ViewGroup, android.os.Bundle)
*/
@Override
......
......@@ -124,7 +124,20 @@ public class TimetableFragment extends AbstractASiSTFragment {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
drawTable(parsedCourses.getCourse());
if( parsedCourses != null ) {
List<Course> courses = parsedCourses.getCourse();
if (courses != null) {
drawTable(parsedCourses.getCourse());
} else {
Toast.makeText(
getContext()
,getString(R.string.module_timetable_course_update_failure) + ' ' + getString(R.string.module_timetable_course_control_timetable_code)
,Toast.LENGTH_LONG
).show();
}
} else {
Toast.makeText(getContext(), R.string.module_timetable_course_update_failure, Toast.LENGTH_LONG).show();
}
}
});
refreshTimeTableSwipeLayout.setRefreshing(false);
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF">
<path
android:fillColor="#FF000000"
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
</vector>
<vector android:height="24dp" android:viewportHeight="53.867"
android:viewportWidth="53.867" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#EFCE4A" android:pathData="M26.934,1.318l8.322,16.864l18.611,2.705l-13.467,13.126l3.179,18.536l-16.645,-8.751l-16.646,8.751l3.179,-18.536l-13.467,-13.126l18.611,-2.705z"/>
</vector>
<vector android:height="24dp" android:viewportHeight="55.867"
android:viewportWidth="55.867" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M11.287,54.548c-0.207,0 -0.414,-0.064 -0.588,-0.191c-0.308,-0.224 -0.462,-0.603 -0.397,-0.978l3.091,-18.018L0.302,22.602c-0.272,-0.266 -0.37,-0.663 -0.253,-1.024c0.118,-0.362 0.431,-0.626 0.808,-0.681l18.09,-2.629l8.091,-16.393c0.168,-0.342 0.516,-0.558 0.896,-0.558l0,0c0.381,0 0.729,0.216 0.896,0.558l8.09,16.393l18.091,2.629c0.377,0.055 0.689,0.318 0.808,0.681c0.117,0.361 0.02,0.759 -0.253,1.024L42.475,35.363l3.09,18.017c0.064,0.375 -0.09,0.754 -0.397,0.978c-0.308,0.226 -0.717,0.255 -1.054,0.076l-16.18,-8.506l-16.182,8.506C11.606,54.51 11.446,54.548 11.287,54.548zM3.149,22.584l12.016,11.713c0.235,0.229 0.343,0.561 0.287,0.885L12.615,51.72l14.854,-7.808c0.291,-0.154 0.638,-0.154 0.931,0l14.852,7.808l-2.836,-16.538c-0.056,-0.324 0.052,-0.655 0.287,-0.885l12.016,-11.713l-16.605,-2.413c-0.326,-0.047 -0.607,-0.252 -0.753,-0.547L27.934,4.578l-7.427,15.047c-0.146,0.295 -0.427,0.5 -0.753,0.547L3.149,22.584z"/>
</vector>
......@@ -3,12 +3,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/swipeRefreshLayout">
<ListView
android:id="@+id/dep_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="10dp"
/>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
android:background="@color/white"
android:paddingStart="10dp"
android:paddingLeft="10dp"
android:paddingEnd="5dp"
android:paddingRight="5dp"
android:baselineAligned="false">
<TextView
android:id="@+id/emptyStationList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="@color/descColor"
style="@style/TitleTextField"
android:visibility="gone"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pts_list_item"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:layout_gravity="center_vertical"
android:textColor="@color/defaultTitleColor"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingTop="5dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/defaultTitleColor"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:id="@+id/constraintLayoutHeader"
>
<androidx.constraintlayout.widget.Guideline
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/guideline"
app:layout_constraintGuide_begin="0dp"
app:layout_constraintGuide_percent="0.6"
android:orientation="vertical"
/>
<TextView
android:id="@+id/stationName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/defaultTitleColor"
style="@style/TitleTextField"
android:lines= "1"
android:singleLine="true"
android:ellipsize="end"
android:maxLines="1"
android:ems="6"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:autoSizeTextType="uniform"
app:autoSizeMinTextSize="16sp"
app:autoSizeMaxTextSize="100sp"
app:autoSizeStepGranularity="1sp"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<ListView
android:id="@+id/dep_list"
android:layout_width="0dp"
android:layout_height="0dp"
android:divider="@null"
android:dividerHeight="0dp"
app:layout_constraintTop_toBottomOf="@id/constraintLayoutHeader"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
\ No newline at end of file
......@@ -15,19 +15,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/defaultTitleColor"
android:orientation="horizontal"
>
<RelativeLayout
android:id="@+id/ptsspinner"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
android:orientation="horizontal">
<TextView
android:id="@+id/ptsupdate"
android:layout_width="match_parent"
......@@ -37,23 +25,71 @@
android:textAlignment="gravity"
android:textSize="@dimen/descTextSize"
android:paddingLeft="10dp"
style="@style/TitleTextField"
/>
style="@style/TitleTextField"/>
</LinearLayout>
<TextView
android:id="@+id/emptyStationList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="@color/descColor"
style="@style/TitleTextField"
android:visibility="gone"
android:paddingLeft="10dp"
/>
<ListView
android:id="@+id/pts_list"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/swipeRefreshLayout">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/module_publictransport_favorites"/>
<TextView
android:id="@+id/emptyFavStationList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="@color/descColor"
style="@style/TitleTextField"
android:visibility="gone"
android:paddingLeft="10dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/emptyFavStationsTV"
android:visibility="gone"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/pts_fav_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nearby_stations"/>
<TextView
android:id="@+id/emptyStationList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="@color/descColor"
style="@style/TitleTextField"
android:visibility="gone"
android:paddingLeft="10dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/emptyNearStationsTV"
android:visibility="gone"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/pts_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
......@@ -3,7 +3,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white">
android:background="@color/white"
android:padding="15dp">
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
......@@ -15,7 +16,7 @@
android:orientation="horizontal">
<ImageView
android:id="@+id/ptstype"
android:layout_height="@dimen/descTextSize"
android:layout_height="@dimen/defaultTitleSize"
android:layout_gravity="left|center_vertical"
android:scaleType="fitCenter"
/>
......@@ -24,7 +25,7 @@
android:id="@+id/number"
android:layout_gravity="center_horizontal"
android:textColor="@color/descColor"
android:textSize="@dimen/descTextSize"
android:textSize="@dimen/defaultTitleSize"
android:textStyle="bold"
style="@style/TitleTextField"
/>
......@@ -32,7 +33,12 @@
android:id="@+id/direction"
android:layout_gravity="center_horizontal"
android:textColor="@color/descColor"
android:textSize="@dimen/descTextSize"
android:lines= "1"
android:singleLine="true"
android:ellipsize="end"
android:maxLines="1"
android:ems="9"
android:textSize="@dimen/defaultTitleSize"
android:paddingLeft="10dp"
style="@style/TitleTextField"
/>
......@@ -40,7 +46,7 @@
android:id="@+id/ptstime"
android:layout_gravity="right"
android:textColor="@color/descColor"
android:textSize="@dimen/descTextSize"
android:textSize="@dimen/defaultTitleSize"
android:textStyle="bold"
android:paddingRight="2dp"
style="@style/TitleTextField"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white">
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/GridLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="4"
android:rowCount="1"
android:orientation="horizontal">
<ImageView
android:id="@+id/ptstype"
android:layout_height="@dimen/defaultTitleSize"
android:layout_gravity="left|center_vertical"
android:scaleType="fitCenter"
/>
<TextView
android:id="@+id/number"
android:layout_gravity="center_horizontal"
android:textColor="@color/descColor"
android:textSize="@dimen/descTextSize"
android:textStyle="bold"
style="@style/TitleTextField"
/>
<TextView
android:id="@+id/direction"
android:layout_gravity="center_horizontal"
android:textColor="@color/descColor"
android:lines= "1"
android:singleLine="true"
android:ellipsize="end"
android:maxLines="1"
android:ems="9"
android:textSize="@dimen/descTextSize"
android:paddingLeft="10dp"
style="@style/TitleTextField"
/>
<TextView
android:id="@+id/ptstime"
android:layout_gravity="right"
android:textColor="@color/descColor"
android:textSize="@dimen/descTextSize"
android:textStyle="bold"
android:paddingRight="2dp"
style="@style/TitleTextField"
/>
</GridLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
android:background="@color/white"
android:paddingStart="10dp"
......@@ -20,9 +21,9 @@
android:visibility="gone"
/>
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pts_list_item"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:layout_gravity="center_vertical"
......@@ -30,38 +31,86 @@
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingTop="5dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
>
<LinearLayout
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/defaultTitleColor"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:id="@+id/constraintLayoutHeader"
>
<androidx.constraintlayout.widget.Guideline
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/guideline"
app:layout_constraintGuide_begin="0dp"
app:layout_constraintGuide_percent="0.6"
android:orientation="vertical"
/>
<TextView
android:id="@+id/stationName"
android:layout_width="fill_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/defaultTitleColor"
style="@style/TitleTextField"
style="@style/TitleTextField"
android:lines= "1"
android:singleLine="true"
android:ellipsize="end"
android:maxLines="1"
android:ems="6"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:autoSizeTextType="uniform"
app:autoSizeMinTextSize="16sp"
app:autoSizeMaxTextSize="100sp"
app:autoSizeStepGranularity="1sp"
/>
<TextView
android:id="@+id/distance"
android:layout_width="fill_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/descColor"
android:textSize="@dimen/descTextSize"
android:paddingLeft="7dp"
style="@style/TitleTextField"
app:layout_constraintLeft_toRightOf="@id/stationName"
app:layout_constraintRight_toLeftOf="@id/favStation"
app:layout_constraintTop_toTopOf="parent"
/>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/favStation"
app:srcCompat="@drawable/ic_fav_unselected"
android:paddingLeft="7dp"
android:paddingBottom="10dp"
android:paddingTop="5dp"
android:layout_marginRight="5dp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<ListView
android:id="@+id/dep_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_height="0dp"
android:divider="@null"
android:dividerHeight="0dp"
app:layout_constraintTop_toBottomOf="@id/constraintLayoutHeader"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
</menu>
\ No newline at end of file
......@@ -229,6 +229,7 @@
<!-- Public Transport Module -->
<string name="module_publictransport_name">Public transport</string>
<string name="module_publictransport_favorites">Favorites</string>
<!-- Telephone Directory Module -->
<string name="module_telephonedirectory_name">Directory</string>
......@@ -297,6 +298,7 @@
<string name="module_pts_update_extended">updated</string>
<string name="module_pts_error_location">No geocoordinates could be found.</string>
<string name="module_pts_empty_station_list">No stations could be found nearby.</string>
<string name="module_pts_empty_fav_station_list">No favorite stations</string>
<string name="module_pts_api_not_available">Google Play services not usable.</string>
<string name="module_pts_location_permission_request_failed">GPS disabled, because no permission to activate GPS</string>
<string name="module_pts_location_permission_request_dialog_titel">Grand GPS access</string>
......@@ -334,4 +336,5 @@
<p style="text-align: justify;">Wir erlauben ausdrücklich und begrüßen das Zitieren unserer Dokumente und Webseiten sowie das Setzen von Links auf unsere Website.</p>
<p style="text-align: justify;">Alle innerhalb des Internetangebotes genannten und ggf. durch Dritte geschützten Marken und Warenzeichen unterliegen uneingeschränkt den Bestimmungen des jeweils gültigen Kennzeichenrechts und den Besitzrechten der jeweiligen eingetragenen Eigentümer. Allein aufgrund der bloßen Nennung ist nicht der Schluss zu ziehen, dass Markenzeichen nicht durch Rechte Dritter geschützt sind.</p>]]>
</string>
<string name="nearby_stations">Nearby Stations</string>
</resources>
......@@ -5,7 +5,7 @@
<color name="black">#000000</color>
<color name="red">#FF0000</color>
<color name="blue">#0000FF</color>
<color name="green">#4ca64c</color>
<color name="green">#FF4ca64c</color>
<color name="grey">#BBB</color>
<color name="dark_grey">#333333</color>
<color name="yellow">#f1bb00</color>
......@@ -51,4 +51,4 @@
<color name="zxinglib_result_image_border">#ffffffff</color>
<color name="zxinglib_result_points">#c000ff00</color>
</resources>
\ No newline at end of file
</resources>
......@@ -199,7 +199,8 @@
<!-- timetable -->
<string name="module_timetable_course_code_not_found" formatted="false">Aktualisierung konnte nicht durchgeführt werden.\nImportieren Sie zuerst Ihren Stundenplan.</string>
<string name="module_timetable_course_update_failure" formatted="false">Während der Aktualisierung des Stundplanes ist ein Fehler aufgetreten</string>
<string name="module_timetable_course_update_failure" formatted="false">Während der Aktualisierung des Stundplanes ist ein Fehler aufgetreten.</string>
<string name="module_timetable_course_control_timetable_code" formatted="false">Überprüfen Sie Ihren Stundenplan-Codes.</string>
<string name="module_timetable_course_type_other">Sonstiges</string>
<string name="module_timetable_course_type_lecture">Vorlesung</string>
<string name="module_timetable_course_type_tutorial">Tutorium</string>
......@@ -239,6 +240,7 @@
<!-- Public Transport Module -->
<string name="module_publictransport_name">ÖPNV</string>
<string name="module_publictransport_favorites">Favoriten</string>
<!-- Telephone Directory Module -->
<string name="module_telephonedirectory_name">Personensuche</string>
......@@ -319,6 +321,7 @@
<string name="module_pts_update_extended">Uhr aktualisiert</string>
<string name="module_pts_error_location">Es konnten keine Geokoordinaten gefunden werden.</string>
<string name="module_pts_empty_station_list">Es konnten keine Stationen in der Nähe gefunden werden.</string>
<string name="module_pts_empty_fav_station_list">Keine favorisierten haltestellen</string>
<string name="module_pts_api_not_available">Google Play Services sind nicht verwendbar.</string>
<string name="module_pts_location_permission_request_failed">GPS deaktiviert mangels fehlender Berechtigung</string>
<string name="module_pts_location_permission_request_dialog_titel">GPS-Berechtigung erteilen</string>
......@@ -329,13 +332,15 @@
<string name="app_name">OpenASiST</string>
<!-- standart Config Properties -->
<string name="rootUrl">https://your-openasistserver.net/asist/rest/app</string>
<!--<string name="rootUrl">https://your-openasistserver.net/asist/rest/app</string>-->
<string name="rootUrl">https://urz-asist.hrz.tu-chemnitz.de/asist/rest/app</string>
<string name="imageRootPath">https://your-openasistserver.net/asist</string>
<string name="appHeaderValue">example_value</string>
<string name="olat_url">https://bildungsportal.sachsen.de/opal</string>
<string name="portfolio_login">http://your-openasistserver.net/OLATCE/restapi/auth/app/header</string>
<string name="portfolio_send">http://your-openasistserver.net/OLATCE/restapi/repo/portfolio/create</string>
<string name="pictureProxyUrl">https://your-openasistserver.net/asist/imageproxy/iproxy.cgi?imgurl=</string>
<string name="favoritesUrl">https://sammler.hrz.tu-chemnitz.de/pts/station?</string>
<!-- standart impressum text -->
<string name="impressumText">
......@@ -442,5 +447,8 @@
<string name="pref_title_vibrate">Vibrate</string>
<string name="title_activity_canteen_settings2">Settings</string>
<string name="title_activity_settings2">Settings</string>
<string name="nearby_stations">Haltestellen in der Nähe</string>
<string name="snack_bar_undo">Löschung wiederufen?</string>
<string name="snack_bar_text">Soll der Eintrag entgültig gelöscht werden?</string>
</resources>
\ No newline at end of file
......@@ -13,7 +13,7 @@
<color name="focusColor">#eee0dc</color> -->
<!-- standart Colors -->
<color name="defaultColor">#003e2f</color>
<color name="defaultColor">#FF003E2F</color>
<color name="tintColor">#5b7d96</color>
<color name="defaultTitleColor">#003e2f</color>
<color name="categoryTitleColor">#585858</color>
......@@ -163,4 +163,4 @@
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
</style>
</resources>
\ No newline at end of file
</resources>