Skip to content

Commit

Permalink
Kontakt Button hinzugefügt
Browse files Browse the repository at this point in the history
About Layout bearbeitet
  • Loading branch information
DonMarv00 committed Aug 8, 2023
1 parent f501885 commit eafb186
Show file tree
Hide file tree
Showing 7 changed files with 249 additions and 77 deletions.
123 changes: 123 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion app/src/main/java/de/msdevs/einschlafhilfe/AboutActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.net.Uri
import android.os.Bundle
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import de.msdevs.einschlafhilfe.databinding.ActivityAboutBinding
import net.cachapa.expandablelayout.ExpandableLayout

Expand All @@ -16,6 +15,7 @@ class AboutActivity : AppCompatActivity() {
private lateinit var btnPrivacy : Button
private lateinit var btnSource : Button
private lateinit var btnLicenses : Button
private lateinit var btnContact : Button
private lateinit var expandableLayout : ExpandableLayout

//TODO: RecyclerView für die Libraries nutzen -> Neue Libraries können besser hinzugefügt werden
Expand All @@ -37,6 +37,7 @@ class AboutActivity : AppCompatActivity() {
btnSource = binding.btnQuellcode
btnLicenses = binding.btnLicense
expandableLayout = binding.expandableLayout
btnContact = binding.btnContact

//TODO: RecyclerView für die Libraries nutzen -> Neue Libraries können besser hinzugefügt werden
btnCoOkHttp = binding.included.btnCoroutinesOkhttp
Expand Down Expand Up @@ -74,6 +75,14 @@ class AboutActivity : AppCompatActivity() {
btnAppIntro.setOnClickListener{
opennUrl("https://github.com/AppIntro/AppIntro")
}
btnGlide.setOnClickListener {
val intent = Intent(Intent.ACTION_SENDTO)
intent.setData(Uri.parse("mailto:"))
intent.putExtra(Intent.EXTRA_EMAIL, arrayOf("[email protected]"))
intent.putExtra(Intent.EXTRA_SUBJECT, "Kontaktanfrage: DDF Folgenauswahl")
intent.putExtra(Intent.EXTRA_TEXT, "Deine Nachricht hier...")
startActivity(intent)
}
}
override fun onSupportNavigateUp(): Boolean {
onBackPressed()
Expand Down
170 changes: 94 additions & 76 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,89 +5,107 @@
android:background="@color/black"
android:layout_height="match_parent">

<TextView
android:layout_width="wrap_content"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="25sp"
android:layout_marginTop="100dp"
android:layout_marginStart="20dp"
android:id="@+id/tv_name_header"
android:layout_alignParentStart="true"
android:text="@string/app_name_long"
android:layout_height="wrap_content"/>

<View
android:layout_width="200dp"
android:layout_height="5dp"
android:layout_marginStart="20sp"
android:background="@color/white"
android:layout_below="@id/tv_name_header"/>

<LinearLayout
android:orientation="vertical"
android:layout_below="@id/tv_name_header"
android:layout_marginTop="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/abt_long"
android:textColor="@color/white" />
<TextView
android:layout_width="wrap_content"
android:text="@string/copyright_notice_abt"
android:textColor="@color/white"
android:layout_height="wrap_content"/>

<Button
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_marginTop="20dp"
android:text="@string/privacy"
android:id="@+id/btn_privacy"
android:textColor="@color/black"
android:backgroundTint="@color/white"
android:layout_height="wrap_content"/>

<Button
android:layout_width="match_parent"
android:layout_marginTop="0dp"
android:text="@string/quellcode"
android:textColor="@color/black"
android:id="@+id/btn_quellcode"
android:backgroundTint="@color/white"
android:layout_height="wrap_content"/>

<Button
android:layout_width="match_parent"
android:layout_marginTop="0dp"
android:text="@string/license"
android:textColor="@color/black"
android:id="@+id/btn_license"
android:backgroundTint="@color/white"
android:layout_height="wrap_content"/>
android:layout_height="match_parent">

<TextView
android:layout_width="wrap_content"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="25sp"
android:layout_marginTop="100dp"
android:layout_marginStart="20dp"
android:id="@+id/tv_name_header"
android:layout_alignParentStart="true"
android:text="@string/app_name_long"
android:layout_height="wrap_content"/>

<net.cachapa.expandablelayout.ExpandableLayout
android:id="@+id/expandable_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:el_duration="1000"
app:el_expanded="false"
android:layout_marginBottom="5dp"
app:el_parallax="0.5">
<View
android:layout_width="200dp"
android:layout_height="5dp"
android:layout_marginStart="20sp"
android:background="@color/white"
android:layout_below="@id/tv_name_header"/>

<LinearLayout
android:orientation="vertical"
android:layout_below="@id/tv_name_header"
android:layout_marginTop="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/abt_long"
android:textColor="@color/white" />
<TextView
android:layout_width="wrap_content"
android:text="@string/copyright_notice_abt"
android:textColor="@color/white"
android:layout_height="wrap_content"/>

<Button
android:layout_width="match_parent"
android:layout_marginTop="20dp"
android:text="@string/privacy"
android:id="@+id/btn_privacy"
android:textColor="@color/black"
android:backgroundTint="@color/white"
android:layout_height="wrap_content"/>

<Button
android:layout_width="match_parent"
android:layout_marginTop="0dp"
android:text="@string/quellcode"
android:textColor="@color/black"
android:id="@+id/btn_quellcode"
android:backgroundTint="@color/white"
android:layout_height="wrap_content"/>

<Button
android:layout_width="match_parent"
android:layout_marginTop="0dp"
android:text="@string/kontakt"
android:textColor="@color/black"
android:id="@+id/btn_contact"
android:backgroundTint="@color/white"
android:layout_height="wrap_content"/>

<Button
android:layout_width="match_parent"
android:layout_marginTop="0dp"
android:text="@string/license"
android:textColor="@color/black"
android:id="@+id/btn_license"
android:backgroundTint="@color/white"
android:layout_height="wrap_content"/>


<net.cachapa.expandablelayout.ExpandableLayout
android:id="@+id/expandable_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:el_duration="1000"
app:el_expanded="false"
android:layout_marginBottom="5dp"
app:el_parallax="0.5">

<include
android:id="@+id/included"
layout="@layout/layout_libraries"/>
<include
android:id="@+id/included"
layout="@layout/layout_libraries"/>

</net.cachapa.expandablelayout.ExpandableLayout>
</net.cachapa.expandablelayout.ExpandableLayout>


</LinearLayout>
</LinearLayout>

</RelativeLayout>
</ScrollView>
</RelativeLayout>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@
<string name="okhttp">OkHttp</string>
<string name="kotlin_coroutines_okhttp">Coroutines OkHttp</string>
<string name="by_gildor">von Andrey Mischenko</string>
<string name="kontakt">Kontakt</string>
</resources>

0 comments on commit eafb186

Please sign in to comment.