This repository has been archived by the owner on Aug 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from Team-Ladefuchs/42-acknowledgement-screen
Add Third Party Notice
- Loading branch information
Showing
7 changed files
with
162 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
Ladefuchs/app/src/main/java/app/ladefuchs/android/ui/acknowledgement/Acknowledgement.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package app.ladefuchs.android.ui.acknowledgement | ||
|
||
import android.os.Bundle | ||
import android.text.method.LinkMovementMethod | ||
import androidx.fragment.app.Fragment | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import android.widget.ImageButton | ||
import android.widget.TextView | ||
import androidx.navigation.fragment.findNavController | ||
import app.ladefuchs.android.R | ||
|
||
|
||
class Acknowledgement : Fragment() { | ||
companion object { | ||
fun newInstance() = Acknowledgement() | ||
} | ||
|
||
private lateinit var viewModel: AcknowledgementViewModel | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
savedInstanceState: Bundle? | ||
): View? { | ||
|
||
return inflater.inflate(R.layout.fragment_acknowledgement, container, false) | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
val acknowledgementText = view.findViewById(R.id.acknowledgement_text) as TextView | ||
acknowledgementText.movementMethod = LinkMovementMethod.getInstance() | ||
|
||
view.findViewById<ImageButton>(app.ladefuchs.android.R.id.back_button).setOnClickListener { | ||
findNavController().navigate(app.ladefuchs.android.R.id.action_acknowledgement_to_navigation_about) | ||
} | ||
|
||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...hs/app/src/main/java/app/ladefuchs/android/ui/acknowledgement/AcknowledgementViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package app.ladefuchs.android.ui.acknowledgement | ||
|
||
import androidx.lifecycle.ViewModel | ||
|
||
class AcknowledgementViewModel : ViewModel() { | ||
// TODO: Implement the ViewModel | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
Ladefuchs/app/src/main/res/layout/fragment_acknowledgement.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/PrimaryBackground" | ||
tools:context=".Acknowledgement"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<ImageView | ||
android:id="@+id/ladefuchs_logo" | ||
android:layout_width="84dp" | ||
android:layout_height="78dp" | ||
android:layout_marginTop="8dp" | ||
android:contentDescription="@string/ladefuchs_logo_description" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:srcCompat="@drawable/ic_ladefuchs_logo" /> | ||
|
||
<ImageButton | ||
android:id="@+id/back_button" | ||
android:layout_width="32dp" | ||
android:layout_height="0dp" | ||
android:layout_marginStart="8dp" | ||
android:background="@color/PrimaryBackground" | ||
app:srcCompat="@drawable/abc_vector_test" | ||
android:tint="@color/TextColorDark" | ||
app:layout_constraintBottom_toTopOf="@+id/acknowledgement_header" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/acknowledgement_header" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:background="@color/TableColorDark" | ||
android:fontFamily="sans-serif-black" | ||
android:text="@string/acknowledgement_header" | ||
android:textAlignment="center" | ||
android:textAllCaps="true" | ||
android:textColor="@color/colorAccent" | ||
android:textSize="30sp" | ||
app:layout_constraintBottom_toTopOf="@+id/acknowledgement_text" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/ladefuchs_logo" /> | ||
|
||
<TextView | ||
android:id="@+id/acknowledgement_text" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_margin="20dp" | ||
android:layout_marginStart="20dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginEnd="20dp" | ||
android:layout_marginBottom="20dp" | ||
android:text="@string/acknowledgement_text" | ||
android:textAlignment="textStart" | ||
android:textSize="18sp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/acknowledgement_header" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,16 @@ | |
<string name="twitter_roddi"><a href="https://twitter.com/roddi">@roddi</a></string> | ||
<string name="handcrafted">Handgefertigt aus ♥️ zur Elektromobilität in \n👑 Aachen, 🥨 Fürstenfeldbruck, 🏰 Ludwigsburg, \n⚒️ Ahlen und 🐻 Berlin.</string> | ||
<string name="imprint_header">Impressum</string> | ||
<string name="acknowledgement_header">Third-Party Notices</string> | ||
<string name="imprint_text">Angaben gemäß § 5 TMG:\nBastian Wölfle\nSchwabenstraße 11\n82256 Fürstenfeldbruck\n\nKontakt:\nTelefon: +49-8141-5092502\nE-Mail: [email protected]\n\nVerantwortlich für den Inhalt nach § 55 Abs. 2 RStV:\nBastian Wölfle\nSchwabenstraße 11\n82256 Fürstenfeldbruck\n\n\nQuelle: Impressum-Generator von anwalt.de</string> | ||
<string name="acknowledgement_text"> | ||
\t• <a href="https://github.com/cbeust/klaxon/blob/master/LICENSE.txt">Klaxon: 5.0.1</a>\n | ||
\t• <a href="https://github.com/takisoft/preferencex-android/blob/master/LICENSE">AndroidX Preference eXtended: 1.1.0</a>\n | ||
\t• <a href="https://github.com/vinc3m1/RoundedImageView/blob/main/LICENSE">RoundedImageView: 2.3.0</a>\n | ||
\t• <a href="https://github.com/AigeStudio/WheelPicker/blob/master/LICENSE">WheelPicker: 1.1.3</a>\n | ||
\t• <a href="https://square.github.io/okhttp/#license">OkHttp: 4.9.0</a>\n | ||
\t• <a href="https://github.com/hdodenhof/CircleImageView/blob/master/LICENSE.txt">CircleImageView: 3.1.0</a>\n | ||
</string> | ||
<string name="impressum">Impressum</string> | ||
<string name="dialog_ok">OK</string> | ||
<string name="chargecard_title">Wähle Deine Karten</string> | ||
|