Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions org.envirocar.app/res/layout/layout_general_info_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
with the enviroCar app. If not, see http://www.gnu.org/licenses/.

-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">

<LinearLayout
android:layout_width="wrap_content"
Expand Down Expand Up @@ -57,5 +57,33 @@
android:alpha="0.54"
android:gravity="center"/>

<androidx.cardview.widget.CardView
android:id="@+id/logbook_login_register_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="40dp"
android:layout_marginTop="20dp"
android:clickable="true"
app:cardBackgroundColor="@color/dashboard_button_selector"
app:cardCornerRadius="25dp"
app:cardElevation="10dp">

<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="40dp"
android:layout_marginTop="12dp"
android:layout_marginRight="40dp"
android:layout_marginBottom="12dp"
android:gravity="center"
android:maxLines="1"
android:text="@string/logbook_login_register"
android:textColor="@color/white_cario"
android:textSize="18sp"/>

</androidx.cardview.widget.CardView>

</LinearLayout>
</RelativeLayout>
3 changes: 2 additions & 1 deletion org.envirocar.app/res/values/strings_fragment_dashboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
with the enviroCar app. If not, see http://www.gnu.org/licenses/.

-->
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="dashboard_mode_obd_and_gps">OBD Track</string>
<string name="dashboard_mode_gps_only">GPS Track</string>

<string name="dashboard_start_track">START TRACK</string>
<string name="logbook_login_register" tools:ignore="MissingTranslation">Login/ Register</string>
<string name="dashboard_goto_track">Go to Track Recording Screen</string>
<string name="dashboard_track_is_starting">TRACK IS STARTING...</string>
<string name="dashboard_track_is_stopping">TRACK IS STOPPING...</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.snackbar.Snackbar;
import androidx.appcompat.widget.Toolbar;
import androidx.cardview.widget.CardView;

import android.view.View;
import android.widget.AdapterView;
Expand All @@ -40,6 +41,7 @@
import org.envirocar.app.BaseApplicationComponent;
import org.envirocar.app.R;
import org.envirocar.app.handler.preferences.CarPreferenceHandler;
import org.envirocar.app.views.login.SigninActivity;
import org.envirocar.app.views.utils.ECAnimationUtils;
import org.envirocar.core.ContextInternetAccessProvider;
import org.envirocar.core.InternetAccessProvider;
Expand Down Expand Up @@ -99,6 +101,8 @@ public class LogbookActivity extends BaseInjectorActivity implements LogbookUiLi
protected TextView infoBackgroundFirst;
@BindView(R.id.layout_general_info_background_secondline)
protected TextView infoBackgroundSecond;
@BindView(R.id.logbook_login_register_button)
protected CardView logbookLoginRegisterButton;

// @BindView(R.id.activity_logbook_not_logged_in)
// protected View notLoggedInView;
Expand Down Expand Up @@ -187,6 +191,11 @@ public void onBackPressed() {
super.onBackPressed();
}

@OnClick(R.id.logbook_login_register_button)
protected void onClickLoginRegisterButton(){
SigninActivity.startActivity(this);
}

@OnClick(R.id.activity_logbook_toolbar_new_fueling_fab)
protected void onClickNewFuelingFAB() {
if(carHandler.hasCars()) {
Expand Down