...
 
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
  • Rohan Sher Gill's avatar
    [ADD] Apache HTTP Legacy library · 46750361
    Rohan Sher Gill authored
    46750361
  • Rohan Sher Gill's avatar
    Merge branch 'fix/#38/google_maps/apache_http_legacy_library' into 'develop' · ee67a8e7
    Rohan Sher Gill authored
    [ADD] Apache HTTP Legacy library
    
    See merge request OpenASiST/openasist4android_core!30
    ee67a8e7
  • Toni Beier's avatar
    ASiSTModuleManager class use map to store modules instances · f5326a4d
    Toni Beier authored
    Module map is a LinkedHashMap to keep insertion order.
    Keys are the Class instance of the modules and the values are the module instances.
    f5326a4d
  • Toni Beier's avatar
    1f45a484
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
android:logo="@android:color/transparent" android:logo="@android:color/transparent"
android:theme="@style/ASiSTTheme"> android:theme="@style/ASiSTTheme">
<receiver android:name=".core.manager.update.UpdateAlarmReceiver" /> <receiver android:name=".core.manager.update.UpdateAlarmReceiver" />
<uses-library android:name="org.apache.http.legacy" android:required="false" />
<service android:name=".core.receiver.FirebaseReceiver"> <service android:name=".core.receiver.FirebaseReceiver">
<intent-filter> <intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" /> <action android:name="com.google.firebase.MESSAGING_EVENT" />
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</service> </service>
<service android:name=".core.manager.push.FirebaseIDService"> <service android:name=".core.manager.push.FirebaseIDService">
<intent-filter> <intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> <action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter> </intent-filter>
</service> </service>
......
...@@ -31,10 +31,10 @@ android { ...@@ -31,10 +31,10 @@ android {
androidTest.setRoot('tests') androidTest.setRoot('tests')
} }
compileSdkVersion 28 compileSdkVersion 28
buildToolsVersion '25.0.3' buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
minSdkVersion 14 minSdkVersion 21
targetSdkVersion 19 targetSdkVersion 26
useLibrary 'org.apache.http.legacy' useLibrary 'org.apache.http.legacy'
versionCode 1 versionCode 1
versionName '1.0' versionName '1.0'
...@@ -128,34 +128,37 @@ def parseFile(name) { ...@@ -128,34 +128,37 @@ def parseFile(name) {
} }
dependencies { dependencies {
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE' implementation 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'me.dm7.barcodescanner:zxing:1.9.8' implementation 'me.dm7.barcodescanner:zxing:1.9.8'
compile 'com.j256.ormlite:ormlite-android:4.48' 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 //android support libraries
//simply compile google maps only //simply compile google maps only
//compile 'com.google.android.gms:play-services:11.8.0' //compile 'com.google.android.gms:play-services:12.0.1'
compile 'com.google.android.gms:play-services-maps:12.0.1' compile 'com.google.android.gms:play-services-maps:17.0.0'
compile 'com.google.android.gms:play-services-location:12.0.1' compile 'com.google.android.gms:play-services-location:17.0.0'
compile 'com.google.firebase:firebase-core:12.0.1' implementation 'com.google.firebase:firebase-core:17.0.1'
compile 'com.google.firebase:firebase-messaging:12.0.1' implementation 'com.google.firebase:firebase-messaging:19.0.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.jjoe64:graphview:3.1.3' implementation 'com.jjoe64:graphview:3.1.3'
compile 'com.github.machinarius:preferencefragment:0.1.2' implementation 'com.github.machinarius:preferencefragment:0.1.2'
compile 'com.loopj.android:android-async-http:1.4.5' implementation 'com.loopj.android:android-async-http:1.4.5'
compile 'org.greenrobot:eventbus:3.0.0' implementation 'org.greenrobot:eventbus:3.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha4'
compile 'com.android.support:preference-v7:28.0.0' implementation 'androidx.preference:preference:1.0.0'
// AndroidX Libraries // 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' implementation group: 'androidx.appcompat', name: 'appcompat', version: '1.0.2'
// Material Design Libraries // Material Design Libraries
implementation 'com.google.android.material:material:1.0.0' implementation 'com.google.android.material:material:1.0.0'
} }
allprojects { allprojects {
......
package de.bps.asist.core.manager; package de.bps.asist.core.manager;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import de.bps.asist.module.AbstractAsistModule; import de.bps.asist.module.AbstractAsistModule;
...@@ -9,7 +12,7 @@ public class ASiSTModuleManager { ...@@ -9,7 +12,7 @@ public class ASiSTModuleManager {
private static final ASiSTModuleManager INSTANCE = new ASiSTModuleManager(); private static final ASiSTModuleManager INSTANCE = new ASiSTModuleManager();
private List<AbstractAsistModule> modules = new ArrayList<>(); private Map<Class<? extends AbstractAsistModule>, AbstractAsistModule> modules = Collections.synchronizedMap(new LinkedHashMap<Class<? extends AbstractAsistModule>, AbstractAsistModule>());
private ASiSTModuleManager(){ private ASiSTModuleManager(){
} }
...@@ -19,22 +22,19 @@ public class ASiSTModuleManager { ...@@ -19,22 +22,19 @@ public class ASiSTModuleManager {
} }
public void resetModuleList(){ public void resetModuleList(){
modules = new ArrayList<>(); this.modules.clear();
} }
public void register(AbstractAsistModule module){ public void register(AbstractAsistModule module){
modules.add(module); this.modules.put(module.getClass(), module);
} }
public <T extends AbstractAsistModule> T getModule( Class<T> moduleClass, T defaultValue ) { public <T extends AbstractAsistModule> T getModule(Class<T> moduleClass, T defaultValue ) {
T resultModule = defaultValue; T module = (T)this.modules.get(moduleClass);
for ( AbstractAsistModule registeredModule: this.modules ) { if(module == null) {
if( moduleClass.isInstance( registeredModule ) ) { module = defaultValue;
defaultValue = (T)registeredModule;
break;
}
} }
return resultModule; return module;
} }
public <T extends AbstractAsistModule> T getModule( Class<T> moduleClass) { public <T extends AbstractAsistModule> T getModule( Class<T> moduleClass) {
...@@ -42,7 +42,6 @@ public class ASiSTModuleManager { ...@@ -42,7 +42,6 @@ public class ASiSTModuleManager {
} }
public List<AbstractAsistModule> getModules() { public List<AbstractAsistModule> getModules() {
return modules; return new ArrayList<>(modules.values());
} }
}
} \ No newline at end of file
...@@ -2,6 +2,7 @@ package de.bps.asist.core.manager.parser; ...@@ -2,6 +2,7 @@ package de.bps.asist.core.manager.parser;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import android.util.Log;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper; import org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper;
...@@ -43,6 +44,7 @@ public class ASiSTParser { ...@@ -43,6 +44,7 @@ public class ASiSTParser {
public <T extends Serializable> void parseWithTask(final String url, final Class<T> cl, final ParserCallback<T> callback){ 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()); final BackgroundParserTask<T> parser = new BackgroundParserTask<>(url, cl, callback, createStandartClientHttpRequestFactory());
parser.execute(); parser.execute();
} }
/** /**
......
...@@ -4,7 +4,9 @@ import android.content.Context; ...@@ -4,7 +4,9 @@ import android.content.Context;
import android.util.Log; import android.util.Log;
import com.google.firebase.iid.FirebaseInstanceId; 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; import de.bps.asist.core.manager.environment.EnvironmentManager;
...@@ -12,7 +14,7 @@ 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. * Created by EPereira on 06.02.2017.
*/ */
public class FirebaseIDService extends FirebaseInstanceIdService { public class FirebaseIDService extends FirebaseMessagingService {
private static final String TAG = "FirebaseIDService"; private static final String TAG = "FirebaseIDService";
private EnvironmentManager environment; private EnvironmentManager environment;
...@@ -26,18 +28,23 @@ public class FirebaseIDService extends FirebaseInstanceIdService { ...@@ -26,18 +28,23 @@ public class FirebaseIDService extends FirebaseInstanceIdService {
environment = EnvironmentManager.getInstance(); environment = EnvironmentManager.getInstance();
pnm = PushNotificationManager.getInstance(); pnm = PushNotificationManager.getInstance();
} }
@Override @Override
public void onTokenRefresh() { public void onNewToken(String token) {
Log.d(TAG, "Refreshed token: " + token);
// Get updated InstanceID token. // Get updated InstanceID token.
String refreshedToken = FirebaseInstanceId.getInstance().getToken(); //String refreshedToken = FirebaseInstanceId.getInstance().getToken();
//Log.d(TAG, "Refreshed token: " + refreshedToken); //Log.d(TAG, "Refreshed token: " + refreshedToken);
// If you want to send messages to this application instance or // If you want to send messages to this application instance or
// manage this apps subscriptions on the server side, send the // manage this apps subscriptions on the server side, send the
// Instance ID token to your app server.
environment.setDeviceToken(context, refreshedToken); sendRegistrationToServer(token);
pnm.registerDevice(context, refreshedToken); }
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
...@@ -26,8 +26,8 @@ public class CanteenFragment extends AbstractASiSTFragment { ...@@ -26,8 +26,8 @@ public class CanteenFragment extends AbstractASiSTFragment {
private ListView menus; 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) * android.view.ViewGroup, android.os.Bundle)
*/ */
@Override @Override
......
...@@ -22,8 +22,8 @@ public class FeedFragment extends AbstractASiSTFragment { ...@@ -22,8 +22,8 @@ public class FeedFragment extends AbstractASiSTFragment {
private ListView listView; 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) * android.view.ViewGroup, android.os.Bundle)
*/ */
@Override @Override
......
<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 @@ ...@@ -3,12 +3,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" > android:orientation="vertical" >
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/swipeRefreshLayout">
<ListView <ListView
android:id="@+id/dep_list" android:id="@+id/dep_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingLeft="10dp" android:paddingLeft="10dp"
/> />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout> </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 @@ ...@@ -15,19 +15,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/defaultTitleColor" android:textColor="@color/defaultTitleColor"
android:orientation="horizontal" 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>
<TextView <TextView
android:id="@+id/ptsupdate" android:id="@+id/ptsupdate"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -37,23 +25,71 @@ ...@@ -37,23 +25,71 @@
android:textAlignment="gravity" android:textAlignment="gravity"
android:textSize="@dimen/descTextSize" android:textSize="@dimen/descTextSize"
android:paddingLeft="10dp" android:paddingLeft="10dp"
style="@style/TitleTextField" style="@style/TitleTextField"/>
/>
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/emptyStationList"
android:layout_width="fill_parent" <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:layout_height="wrap_content"
android:textColor="@color/descColor"
style="@style/TitleTextField"
android:visibility="gone"
android:paddingLeft="10dp"
/>
<ListView
android:id="@+id/pts_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="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" android:paddingLeft="10dp"
/> />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout> </LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:background="@color/white"> android:background="@color/white"
android:padding="15dp">
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" <GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
...@@ -15,7 +16,7 @@ ...@@ -15,7 +16,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:id="@+id/ptstype" android:id="@+id/ptstype"
android:layout_height="@dimen/descTextSize" android:layout_height="@dimen/defaultTitleSize"
android:layout_gravity="left|center_vertical" android:layout_gravity="left|center_vertical"
android:scaleType="fitCenter" android:scaleType="fitCenter"
/> />
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
android:id="@+id/number" android:id="@+id/number"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:textColor="@color/descColor" android:textColor="@color/descColor"
android:textSize="@dimen/descTextSize" android:textSize="@dimen/defaultTitleSize"
android:textStyle="bold" android:textStyle="bold"
style="@style/TitleTextField" style="@style/TitleTextField"
/> />
...@@ -32,7 +33,12 @@ ...@@ -32,7 +33,12 @@
android:id="@+id/direction" android:id="@+id/direction"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:textColor="@color/descColor" 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" android:paddingLeft="10dp"
style="@style/TitleTextField" style="@style/TitleTextField"
/> />
...@@ -40,7 +46,7 @@ ...@@ -40,7 +46,7 @@
android:id="@+id/ptstime" android:id="@+id/ptstime"
android:layout_gravity="right" android:layout_gravity="right"
android:textColor="@color/descColor" android:textColor="@color/descColor"
android:textSize="@dimen/descTextSize" android:textSize="@dimen/defaultTitleSize"
android:textStyle="bold" android:textStyle="bold"
android:paddingRight="2dp" android:paddingRight="2dp"
style="@style/TitleTextField" 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"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" 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:orientation="horizontal"
android:background="@color/white" android:background="@color/white"
android:paddingStart="10dp" android:paddingStart="10dp"
...@@ -20,9 +21,9 @@ ...@@ -20,9 +21,9 @@
android:visibility="gone" android:visibility="gone"
/> />
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pts_list_item" android:id="@+id/pts_list_item"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.0" android:layout_weight="1.0"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
...@@ -30,38 +31,86 @@ ...@@ -30,38 +31,86 @@
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="5dp" android:paddingBottom="5dp"
android:paddingTop="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 <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/defaultTitleColor" android:textColor="@color/defaultTitleColor"
android:orientation="horizontal" 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 <TextView
android:id="@+id/stationName" android:id="@+id/stationName"
android:layout_width="fill_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/defaultTitleColor" 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 <TextView
android:id="@+id/distance" android:id="@+id/distance"
android:layout_width="fill_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/descColor" android:textColor="@color/descColor"
android:textSize="@dimen/descTextSize" android:textSize="@dimen/descTextSize"
android:paddingLeft="7dp" android:paddingLeft="7dp"
style="@style/TitleTextField" 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 <ListView
android:id="@+id/dep_list" android:id="@+id/dep_list"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
android:divider="@null" android:divider="@null"
android:dividerHeight="0dp" 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> </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 @@ ...@@ -229,6 +229,7 @@
<!-- Public Transport Module --> <!-- Public Transport Module -->
<string name="module_publictransport_name">Public transport</string> <string name="module_publictransport_name">Public transport</string>
<string name="module_publictransport_favorites">Favorites</string>
<!-- Telephone Directory Module --> <!-- Telephone Directory Module -->
<string name="module_telephonedirectory_name">Directory</string> <string name="module_telephonedirectory_name">Directory</string>
...@@ -297,6 +298,7 @@ ...@@ -297,6 +298,7 @@
<string name="module_pts_update_extended">updated</string> <string name="module_pts_update_extended">updated</string>
<string name="module_pts_error_location">No geocoordinates could be found.</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_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_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_failed">GPS disabled, because no permission to activate GPS</string>
<string name="module_pts_location_permission_request_dialog_titel">Grand GPS access</string> <string name="module_pts_location_permission_request_dialog_titel">Grand GPS access</string>
...@@ -334,4 +336,5 @@ ...@@ -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;">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>]]> <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>
<string name="nearby_stations">Nearby Stations</string>
</resources> </resources>
...@@ -239,6 +239,7 @@ ...@@ -239,6 +239,7 @@
<!-- Public Transport Module --> <!-- Public Transport Module -->
<string name="module_publictransport_name">ÖPNV</string> <string name="module_publictransport_name">ÖPNV</string>
<string name="module_publictransport_favorites">Favoriten</string>
<!-- Telephone Directory Module --> <!-- Telephone Directory Module -->
<string name="module_telephonedirectory_name">Personensuche</string> <string name="module_telephonedirectory_name">Personensuche</string>
...@@ -319,6 +320,7 @@ ...@@ -319,6 +320,7 @@
<string name="module_pts_update_extended">Uhr aktualisiert</string> <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_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_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_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_failed">GPS deaktiviert mangels fehlender Berechtigung</string>
<string name="module_pts_location_permission_request_dialog_titel">GPS-Berechtigung erteilen</string> <string name="module_pts_location_permission_request_dialog_titel">GPS-Berechtigung erteilen</string>
...@@ -329,13 +331,15 @@ ...@@ -329,13 +331,15 @@
<string name="app_name">OpenASiST</string> <string name="app_name">OpenASiST</string>
<!-- standart Config Properties --> <!-- 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="imageRootPath">https://your-openasistserver.net/asist</string>
<string name="appHeaderValue">example_value</string> <string name="appHeaderValue">example_value</string>
<string name="olat_url">https://bildungsportal.sachsen.de/opal</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_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="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="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 --> <!-- standart impressum text -->
<string name="impressumText"> <string name="impressumText">
...@@ -442,5 +446,8 @@ ...@@ -442,5 +446,8 @@
<string name="pref_title_vibrate">Vibrate</string> <string name="pref_title_vibrate">Vibrate</string>
<string name="title_activity_canteen_settings2">Settings</string> <string name="title_activity_canteen_settings2">Settings</string>
<string name="title_activity_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> </resources>
\ No newline at end of file