Über-Seite hinzugefügt

master
Niko Diamadis 6 years ago
parent 1ad9add4f0
commit ce1b9fab0b

@ -1,15 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.cyb3rko.techniklogger">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:theme="@style/DarkActionbar"
tools:ignore="AllowBackup">
<activity android:name="com.cyb3rko.techniklogger.MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -17,12 +23,21 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ProjectActivity"
<activity android:name="com.cyb3rko.techniklogger.ProjectActivity"
android:screenOrientation="portrait" />
<activity android:name="com.cyb3rko.techniklogger.utils.About"
android:screenOrientation="portrait" />
<activity android:name="com.cyb3rko.techniklogger.utils.IconCredits"
android:screenOrientation="portrait" />
<activity android:name="com.cyb3rko.techniklogger.EinsatzPusher"
android:screenOrientation="portrait" />
<activity android:name="com.mikepenz.aboutlibraries.ui.LibsActivity"
android:theme="@style/NoActionBar"
android:screenOrientation="portrait" />
<meta-data
android:name="firebase_analytics_collection_enabled"
android:value="false" />
</application>
<meta-data
android:name="firebase_analytics_collection_enabled"
android:value="false" />
</manifest>

@ -141,8 +141,8 @@ class MainActivity : AppCompatActivity() {
// as you specify a parent activity in AndroidManifest.xml.
when (item.itemId) {
R.id.action_rename -> showNameDialog()
// R.id.action_icons -> setContentView(AboutIcons(applicationContext, R.drawable::class.java).setTitle("Benutzte Icons").get())
// R.id.action_libraries -> LibsBuilder().start(this)
R.id.action_admin -> toggleAdminMode()
R.id.action_about -> startActivity(Intent(applicationContext, About::class.java))
// R.id.action_privacy_policy ->
// R.id.action_terms_of_use ->
}

@ -0,0 +1,68 @@
package com.cyb3rko.techniklogger.utils
import android.os.Bundle
import android.view.MenuItem
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.cyb3rko.techniklogger.BuildConfig
import com.cyb3rko.techniklogger.R
import com.mikepenz.aboutlibraries.LibsBuilder
import mehdi.sakout.aboutpage.AboutPage
import mehdi.sakout.aboutpage.Element
class About : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
val aboutPage: View = AboutPage(this)
.setImage(R.mipmap.ic_launcher_foreground)
.setDescription("App zur Vereinfachung des Protokollierens aller Technik-Einsätze")
.addItem(Element().setTitle("Version ${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})")
.setIconDrawable(R.drawable.about_icon_github))
.addGroup("Credits")
.addItem(Element().setTitle("Benutzte Libraries").setIconDrawable(R.drawable._icon_libraries).setOnClickListener(showLibraries()))
// .addItem(Element().setTitle("Benutzte Icons").setIconDrawable(R.drawable._icon_question).setOnClickListener(showIcons()))
.create()
setContentView(aboutPage)
}
private fun showLibraries() : View.OnClickListener {
return View.OnClickListener {
LibsBuilder()
.withShowLoadingProgress(true)
.withAboutVersionShownCode(false)
.withAboutVersionShownName(false)
.withFields(R.string::class.java.fields)
.withAutoDetect(true)
.withAboutIconShown(false)
.withAboutVersionShown(false)
.withVersionShown(true)
.withLicenseDialog(true)
.withLicenseShown(true)
.withCheckCachedDetection(true)
.withSortEnabled(true)
.start(application)
}
}
// private fun showIcons() : View.OnClickListener {
// return View.OnClickListener {
// startActivity(Intent(applicationContext, IconCredits::class.java))
// }
// }
override fun onOptionsItemSelected(item: MenuItem): Boolean {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
when (item.itemId) {
android.R.id.home -> finish()
}
return super.onOptionsItemSelected(item)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout 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"
@ -10,35 +11,47 @@
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="12dp"
android:gravity="center_horizontal"
android:text="Einsätze"
android:textSize="26sp"
android:textStyle="bold"
android:fontFamily="sans-serif-black" />
android:fontFamily="sans-serif-black"
tools:ignore="HardcodedText" />
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="60dp"
android:layout_height="60dp"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="48dp"
android:layout_gravity="center_horizontal"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="0dp"
android:layout_marginTop="12dp"
android:layoutAnimation="@anim/recycler_animation" />
android:layoutAnimation="@anim/recycler_animation"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/floatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
android:src="@drawable/_icon_add"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</ScrollView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -16,13 +16,13 @@
android:id="@+id/title_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:fontFamily="sans-serif-black"
android:layout_marginTop="5dp"
android:layout_marginStart="15dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="5dp"
android:fontFamily="sans-serif-black"
android:gravity="center_horizontal"
android:textSize="20sp"
tools:text="Beispiel-Einsatz" />
</androidx.cardview.widget.CardView>
@ -31,33 +31,33 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginEnd="25dp"
android:layout_marginTop="20dp">
android:layout_marginTop="20dp"
android:layout_marginEnd="25dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="4dp"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="6dp"
android:contentDescription="Date Icon"
android:padding="6dp"
android:src="@drawable/_icon_date" />
<TextView
android:id="@+id/date_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:paddingVertical="16dp"
android:paddingHorizontal="12dp"
android:fontFamily="sans-serif-black"
tools:text="01.01.1900"/>
android:paddingHorizontal="12dp"
android:paddingVertical="16dp"
android:textSize="16sp"
tools:text="01.01.1900" />
</LinearLayout>
@ -67,32 +67,32 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginEnd="25dp"
android:layout_marginTop="15dp">
android:layout_marginTop="15dp"
android:layout_marginEnd="25dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="4dp"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="6dp"
android:contentDescription="Location Icon"
android:src="@drawable/_icon_location"/>
android:padding="6dp"
android:src="@drawable/_icon_location" />
<TextView
android:id="@+id/location_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:paddingVertical="16dp"
android:paddingHorizontal="12dp"
android:fontFamily="sans-serif-black"
android:paddingHorizontal="12dp"
android:paddingVertical="16dp"
android:textSize="16sp"
tools:text="Forum Daun" />
</LinearLayout>
@ -103,8 +103,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginEnd="25dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="25dp"
android:layout_marginBottom="20dp">
<LinearLayout
@ -123,19 +123,19 @@
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="6dp"
android:contentDescription="Location Icon"
android:src="@drawable/_icon_techniker2"/>
android:padding="6dp"
android:src="@drawable/_icon_techniker2" />
<TextView
android:id="@+id/techniker"
android:id="@+id/techniker_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:paddingVertical="16dp"
android:paddingHorizontal="12dp"
android:fontFamily="sans-serif-black"
android:text="Techniker" />
android:paddingHorizontal="12dp"
android:paddingVertical="16dp"
android:text="Techniker: 0"
android:textSize="16sp" />
<LinearLayout
android:layout_width="match_parent"
@ -145,13 +145,13 @@
<ImageButton
android:id="@+id/add_button"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="45dp"
android:layout_height="40dp"
android:src="@drawable/_icon_add"
style="@style/Widget.AppCompat.Button.Borderless"
android:scaleType="fitEnd"
android:layout_gravity="end"
android:contentDescription="Add Icon" />
android:contentDescription="Add Icon"
android:scaleType="fitEnd"
android:src="@drawable/_icon_add" />
</LinearLayout>
@ -161,14 +161,14 @@
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#808080"/>
android:background="#808080" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:layoutAnimation="@anim/recycler_animation" />

@ -4,7 +4,6 @@
tools:context="com.cyb3rko.techniklogger.MainActivity">
<item
android:id="@+id/action_rename"
android:orderInCategory="100"
android:title="Namen ändern"
app:showAsAction="never" />
@ -14,11 +13,10 @@
<!-- android:title="Icon Credits"-->
<!-- app:showAsAction="never" />-->
<!-- <item-->
<!-- android:id="@+id/action_libraries"-->
<!-- android:orderInCategory="100"-->
<!-- android:title="Library Credits"-->
<!-- app:showAsAction="never" />-->
<item
android:id="@+id/action_about"
android:title="Über"
app:showAsAction="never" />
<!-- <item-->
<!-- android:id="@+id/action_privacy_policy"-->

@ -1,13 +1,18 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="DarkActionbar" parent="Theme.MaterialComponents.Light.DarkActionBar.Bridge">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="materialCalendarTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>
</style>
<style name="AppTheme.NoActionBar">
<style name="NoActionBar" parent="Theme.MaterialComponents.Light.DarkActionBar.Bridge">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

Loading…
Cancel
Save