Ü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"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.cyb3rko.techniklogger"> 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 <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/DarkActionbar"
<activity android:name=".MainActivity" tools:ignore="AllowBackup">
<activity android:name="com.cyb3rko.techniklogger.MainActivity"
android:screenOrientation="portrait"> android:screenOrientation="portrait">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@ -17,12 +23,21 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".ProjectActivity" <activity android:name="com.cyb3rko.techniklogger.ProjectActivity"
android:screenOrientation="portrait" /> 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> </application>
<meta-data
android:name="firebase_analytics_collection_enabled"
android:value="false" />
</manifest> </manifest>

@ -141,8 +141,8 @@ class MainActivity : AppCompatActivity() {
// as you specify a parent activity in AndroidManifest.xml. // as you specify a parent activity in AndroidManifest.xml.
when (item.itemId) { when (item.itemId) {
R.id.action_rename -> showNameDialog() R.id.action_rename -> showNameDialog()
// R.id.action_icons -> setContentView(AboutIcons(applicationContext, R.drawable::class.java).setTitle("Benutzte Icons").get()) R.id.action_admin -> toggleAdminMode()
// R.id.action_libraries -> LibsBuilder().start(this) R.id.action_about -> startActivity(Intent(applicationContext, About::class.java))
// R.id.action_privacy_policy -> // R.id.action_privacy_policy ->
// R.id.action_terms_of_use -> // 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"?> <?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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -10,35 +11,47 @@
android:id="@+id/title" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" 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:layout_marginTop="12dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="Einsätze" android:text="Einsätze"
android:textSize="26sp" android:textSize="26sp"
android:textStyle="bold" android:textStyle="bold"
android:fontFamily="sans-serif-black" /> android:fontFamily="sans-serif-black"
tools:ignore="HardcodedText" />
<ProgressBar <ProgressBar
android:id="@+id/progress_bar" android:id="@+id/progress_bar"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="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_marginTop="48dp"
android:layout_gravity="center_horizontal"/> android:layout_gravity="center_horizontal"/>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="0dp"
android:layout_marginTop="12dp" 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 <com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="match_parent" android:id="@+id/floatingActionButton"
android:layout_height="match_parent"> 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 </androidx.constraintlayout.widget.ConstraintLayout>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</ScrollView>
</LinearLayout>

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

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

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

Loading…
Cancel
Save