mirror of
https://github.com/jrpie/Launcher.git
synced 2025-04-19 02:10:54 +02:00
Fix/fast appmenu (#20)
* Preload list of Apps when starting the App In OnCreate, the variable `appsList` is used globally * Improve ChooseActivity layout Match it to the style of settings * Reload appList continuously Every 30 Seconds or when a app gets removed * Create a `Install Apps` button On click the PlayStore will be opened. * Add missing translations * Move global variables to `Functions.kt` Anyone thinking global vars should not be used? I don't care haha... unless ... feel free to fork this repository and provide a better way of doing this ^^
This commit is contained in:
parent
61fd660195
commit
f6c20098b5
10 changed files with 123 additions and 71 deletions
|
@ -1,5 +1,6 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -7,45 +8,70 @@
|
|||
android:background="?attr/colorPrimaryDark"
|
||||
tools:context=".ChooseActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/heading"
|
||||
android:layout_width="wrap_content"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/choose_title"
|
||||
android:textColor="#cccccc"
|
||||
android:textSize="36sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:gravity="center"
|
||||
android:theme="@style/AppTheme.AppBarOverlay"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.100000024" />
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subheading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.17000002" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/heading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:minHeight="?actionBarSize"
|
||||
android:padding="@dimen/appbar_padding"
|
||||
android:text="@string/choose_title"
|
||||
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.finnmglas.launcher.FontAwesome
|
||||
android:id="@+id/close_settings"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="true"
|
||||
android:onClick="backHome"
|
||||
android:paddingLeft="16sp"
|
||||
android:paddingRight="16sp"
|
||||
android:text="@string/fa_close_window"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
custom:type="solid" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="86dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="128dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/heading">
|
||||
app:layout_constraintTop_toBottomOf="@id/app_bar">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/apps_list"
|
||||
|
@ -54,14 +80,4 @@
|
|||
android:orientation="vertical" />
|
||||
</ScrollView>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="backHome"
|
||||
android:text="@string/choose_back_settings"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/scrollView3" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -19,7 +19,7 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:id="@+id/heading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
|
|
|
@ -178,6 +178,14 @@
|
|||
android:text="@string/settings_launch"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<Button
|
||||
style="@style/Widget.AppCompat.Button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="chooseInstallApp"
|
||||
android:text="@string/settings_install"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<Button
|
||||
style="@style/Widget.AppCompat.Button"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
|
||||
<!-- Settings -->
|
||||
<string name="settings_title">Einstellungen</string>
|
||||
<string name="settings_sub_title1">Anwendungen</string>
|
||||
<string name="settings_sub_title2">Aktionen</string>
|
||||
|
||||
<string name="settings_show_tutorial">Zum Launcher Tutorial</string>
|
||||
<string name="settings_feedback">Feedback geben</string>
|
||||
|
||||
<string name="settings_choose_up">Hochwischen</string>
|
||||
<string name="settings_choose_down">Runterwischen</string>
|
||||
|
@ -27,8 +28,11 @@
|
|||
<string name="settings_reset_message">All deine Einstellungen gehen verloren. Weitermachen?</string>
|
||||
<string name="settings_launch">Apps öffnen</string>
|
||||
<string name="settings_uninstall">Apps entfernen</string>
|
||||
<string name="settings_install">Apps installieren</string>
|
||||
<string name="settings_home">Zurück</string>
|
||||
|
||||
<string name="settings_toast_store_not_found">PlayStore nicht gefunden</string>
|
||||
|
||||
<string name="settings_footer_by">Von</string>
|
||||
<string name="settings_footer_repo">https://github.com/finnmglas/Launcher#de</string>
|
||||
<string name="settings_footer_web">https://www.finnmglas.com/de/</string>
|
||||
|
@ -59,4 +63,5 @@
|
|||
<item>Einrichtung|Du kannst auch eigene Apps auswählen:\n\nÖffne die Einstellungen durch langes tippen auf den Startbildschirm.|— Zurück = Lautstärke Runter —|36F|0</item>
|
||||
<item>|Du bist bereit loszulegen!\n\nIch hoffe diese App ist sehr wertvoll für dich!\n\n- Finn M Glas\n\n|— Launcher von Finn M Glas —|36F|0</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
|
@ -11,8 +11,9 @@
|
|||
|
||||
<!-- Settings -->
|
||||
<string name="settings_title">Réglages</string>
|
||||
<string name="settings_sub_title1">Applications</string>
|
||||
<string name="settings_sub_title2">Actions</string>
|
||||
|
||||
<string name="settings_feedback">Donner une rétroaction</string>
|
||||
<string name="settings_show_tutorial">Regardez le tutoriel</string>
|
||||
|
||||
<string name="settings_choose_up">Balayez haut</string>
|
||||
<string name="settings_choose_down">Balayez bas</string>
|
||||
|
@ -27,8 +28,11 @@
|
|||
<string name="settings_reset_message">Vous allez supprimer toutes vos préférences. Continuer?</string>
|
||||
<string name="settings_launch">Lancer apps</string>
|
||||
<string name="settings_uninstall">Désinstaller apps</string>
|
||||
<string name="settings_install">Installer apps</string>
|
||||
<string name="settings_home">Retourner</string>
|
||||
|
||||
<string name="settings_toast_store_not_found">Pas trouvé le PlayStore</string>
|
||||
|
||||
<string name="settings_footer_by">Par</string>
|
||||
<string name="settings_footer_web">https://www.finnmglas.com/fr/</string>
|
||||
<string name="settings_footer_repo">https://github.com/finnmglas/Launcher</string>
|
||||
|
|
|
@ -15,15 +15,13 @@
|
|||
|
||||
<!-- Settings -->
|
||||
<string name="settings_title">Settings</string>
|
||||
<string name="settings_sub_title1">Applications</string>
|
||||
<string name="settings_sub_title2">Actions</string>
|
||||
|
||||
<string name="settings_tab_app" translatable="false">Apps</string>
|
||||
<string name="settings_tab_theme" translatable="false">Theme</string>
|
||||
<string name="settings_tab_launcher" translatable="false">Launcher</string>
|
||||
|
||||
<string name="settings_feedback" translatable="false">Give some feedback</string>
|
||||
<string name="settings_show_tutorial" translatable="false">View Launcher Tutorial</string>
|
||||
<string name="settings_feedback">Give some feedback</string>
|
||||
<string name="settings_show_tutorial">View Launcher Tutorial</string>
|
||||
|
||||
<string name="settings_choose_up">Swipe Up</string>
|
||||
<string name="settings_choose_down">Swipe Down</string>
|
||||
|
@ -38,8 +36,11 @@
|
|||
<string name="settings_reset_message">You are going to discard all your preferences. Continue?</string>
|
||||
<string name="settings_launch">Launch Apps</string>
|
||||
<string name="settings_uninstall">Uninstall Apps</string>
|
||||
<string name="settings_install">Install Apps</string>
|
||||
<string name="settings_home">Back Home</string>
|
||||
|
||||
<string name="settings_toast_store_not_found">PlayStore not found</string>
|
||||
|
||||
<string name="settings_footer_by">By</string>
|
||||
<string name="settings_footer_repo">https://github.com/finnmglas/Launcher#en</string>
|
||||
<string name="settings_footer_web">https://www.finnmglas.com</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue