From 0480c15b221bd1ab597f034b9af347adf874fd99 Mon Sep 17 00:00:00 2001 From: kalyani Date: Mon, 22 Jul 2024 15:21:11 +0530 Subject: [PATCH 01/15] local commit for kalyani --- app/build.gradle | 6 + app/src/main/AndroidManifest.xml | 11 +- .../keyboard/bottomsheets/SheetOneFragment.kt | 65 ++ .../keyboard/bottomsheets/SheetTwoFragment.kt | 62 + .../bottomsheets/SheetthreeFragment.kt | 62 + .../latin/setup/KeyboardselectionActivity.kt | 80 ++ .../keyboard/latin/setup/MainActivity.kt | 49 + .../latin/setup/SetupWizardActivity.java | 18 +- .../main/res/drawable/background_buttons.xml | 4 + .../res/drawable/baseline_keyboard_24.xml | 11 + .../main/res/drawable/baseline_menu_24.xml | 5 + app/src/main/res/drawable/baseline_mic_24.xml | 5 + .../res/drawable/imagebuttonbackground.xml | 5 + app/src/main/res/drawable/img.png | Bin 0 -> 5920 bytes app/src/main/res/drawable/newimage_svg.xml | 1014 +++++++++++++++++ app/src/main/res/drawable/owel_background.xml | 5 + .../main/res/drawable/owel_backgrounds.xml | 7 + .../main/res/drawable/owel_backgroundss.xml | 7 + .../main/res/drawable/owel_backgroundsss.xml | 7 + ...hatsapp_image_2024_07_16_at_9_00_27_am.xml | 597 ++++++++++ ...hatsapp_image_2024_07_21_at_7_51_05_pm.xml | 18 + ...atsapp_image_2024_07_22_at_10_43_53_am.xml | 10 + ...pp_image_2024_07_22_at_12_28_06_pm__1_.xml | 9 + ...hatsapp_image_2024_07_22_at_1_42_59_pm.xml | 15 + app/src/main/res/font/edium.ttf | Bin 0 -> 44084 bytes app/src/main/res/font/karla_extralight.ttf | Bin 0 -> 44088 bytes app/src/main/res/font/karla_semibold.ttf | Bin 0 -> 44132 bytes app/src/main/res/font/spectral_semibold.ttf | Bin 0 -> 276080 bytes .../res/layout/activity_keyboardselection.xml | 69 ++ app/src/main/res/layout/activity_main.xml | 40 + app/src/main/res/layout/fragment_sheet1.xml | 51 + app/src/main/res/layout/fragment_sheet2.xml | 50 + app/src/main/res/layout/fragment_sheet3.xml | 52 + .../main/res/layout/setup_welcome_image.xml | 121 +- .../main/res/layout/setup_welcome_screen.xml | 3 +- .../main/res/layout/setup_welcome_title.xml | 18 +- app/src/main/res/layout/setup_wizard.xml | 6 +- app/src/main/res/values/setup-dimens.xml | 2 + app/src/main/res/values/setup-styles.xml | 3 +- app/src/main/res/values/strings.xml | 63 +- app/src/main/res/values/themes-common.xml | 9 + build.gradle | 3 + 42 files changed, 2482 insertions(+), 80 deletions(-) create mode 100644 app/src/main/java/helium314/keyboard/bottomsheets/SheetOneFragment.kt create mode 100644 app/src/main/java/helium314/keyboard/bottomsheets/SheetTwoFragment.kt create mode 100644 app/src/main/java/helium314/keyboard/bottomsheets/SheetthreeFragment.kt create mode 100644 app/src/main/java/helium314/keyboard/latin/setup/KeyboardselectionActivity.kt create mode 100644 app/src/main/java/helium314/keyboard/latin/setup/MainActivity.kt create mode 100644 app/src/main/res/drawable/background_buttons.xml create mode 100644 app/src/main/res/drawable/baseline_keyboard_24.xml create mode 100644 app/src/main/res/drawable/baseline_menu_24.xml create mode 100644 app/src/main/res/drawable/baseline_mic_24.xml create mode 100644 app/src/main/res/drawable/imagebuttonbackground.xml create mode 100644 app/src/main/res/drawable/img.png create mode 100644 app/src/main/res/drawable/newimage_svg.xml create mode 100644 app/src/main/res/drawable/owel_background.xml create mode 100644 app/src/main/res/drawable/owel_backgrounds.xml create mode 100644 app/src/main/res/drawable/owel_backgroundss.xml create mode 100644 app/src/main/res/drawable/owel_backgroundsss.xml create mode 100644 app/src/main/res/drawable/whatsapp_image_2024_07_16_at_9_00_27_am.xml create mode 100644 app/src/main/res/drawable/whatsapp_image_2024_07_21_at_7_51_05_pm.xml create mode 100644 app/src/main/res/drawable/whatsapp_image_2024_07_22_at_10_43_53_am.xml create mode 100644 app/src/main/res/drawable/whatsapp_image_2024_07_22_at_12_28_06_pm__1_.xml create mode 100644 app/src/main/res/drawable/whatsapp_image_2024_07_22_at_1_42_59_pm.xml create mode 100644 app/src/main/res/font/edium.ttf create mode 100644 app/src/main/res/font/karla_extralight.ttf create mode 100644 app/src/main/res/font/karla_semibold.ttf create mode 100644 app/src/main/res/font/spectral_semibold.ttf create mode 100644 app/src/main/res/layout/activity_keyboardselection.xml create mode 100644 app/src/main/res/layout/activity_main.xml create mode 100644 app/src/main/res/layout/fragment_sheet1.xml create mode 100644 app/src/main/res/layout/fragment_sheet2.xml create mode 100644 app/src/main/res/layout/fragment_sheet3.xml diff --git a/app/build.gradle b/app/build.gradle index 366f98b87..37ce7cda8 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -107,6 +107,8 @@ dependencies { // color picker for user-defined colors implementation 'com.github.martin-stone:hsv-alpha-color-picker-android:3.1.0' + implementation 'androidx.activity:activity:1.9.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' // test testImplementation 'junit:junit:4.13.2' @@ -115,4 +117,8 @@ dependencies { testImplementation 'org.robolectric:robolectric:4.12.1' testImplementation 'androidx.test:runner:1.5.2' testImplementation 'androidx.test:core:1.5.0' + + //multiple bottom sheets + implementation ("com.roshaan.multiplebottomsheets:multiplebottomsheets:1.0.1") + implementation ("com.google.android.material:material:1.12.0") } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f0cee5671..1e33ddaff 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -99,7 +99,16 @@ SPDX-License-Identifier: Apache-2.0 AND GPL-3.0-only - + + diff --git a/app/src/main/java/helium314/keyboard/bottomsheets/SheetOneFragment.kt b/app/src/main/java/helium314/keyboard/bottomsheets/SheetOneFragment.kt new file mode 100644 index 000000000..737f9233b --- /dev/null +++ b/app/src/main/java/helium314/keyboard/bottomsheets/SheetOneFragment.kt @@ -0,0 +1,65 @@ +package helium314.keyboard.bottomsheets + + +import android.content.Intent +import android.graphics.Color +import android.graphics.Typeface +import android.os.Bundle +import android.text.SpannableString +import android.text.Spanned +import android.text.style.ForegroundColorSpan +import android.text.style.StyleSpan +import androidx.fragment.app.Fragment +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.Button +import android.widget.TextView +import helium314.keyboard.latin.R +import android.provider.Settings + +class SheetOneFragment : Fragment() { + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // Inflate the layout for this fragment + var view = inflater.inflate(R.layout.fragment_sheet1, container, false) + + val instructionText = + "Tap the toggle to enable Oscar Keyboard in \n your keyboard list" + val spannableString = SpannableString(instructionText) + + val startIndex = instructionText.indexOf("Oscar Keyboard") + val endIndex = startIndex + "Oscar Keyboard".length + + if (startIndex >= 0) { + spannableString.setSpan( + ForegroundColorSpan(Color.BLACK), // Set color to black + startIndex, + endIndex, + Spanned.SPAN_EXCLUSIVE_EXCLUSIVE + ) + + spannableString.setSpan( + StyleSpan(Typeface.BOLD), // Set style to bold + startIndex, + endIndex, + Spanned.SPAN_EXCLUSIVE_EXCLUSIVE + ) + } + + val textViewInstruction = view.findViewById(R.id.text_view_instruction) + textViewInstruction.text = spannableString + + val buttonEnable = view.findViewById