diff options
| -rw-r--r-- | build.gradle | 6 | ||||
| -rw-r--r-- | src/main/java/com/anysoftkeyboard/ui/settings/MainFragment.java | 3 | ||||
| -rw-r--r-- | src/main/res/layout-w600dp/main_fragment.xml | 4 | ||||
| -rw-r--r-- | src/main/res/layout/main_fragment.xml | 4 | ||||
| -rw-r--r-- | src/main/res/layout/main_fragment_non_release_layout.xml | 13 |
5 files changed, 30 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle index 393663ef9..f5ffad9e4 100644 --- a/build.gradle +++ b/build.gradle @@ -125,6 +125,8 @@ android { minifyEnabled true proguardFiles 'proguard-android-optimize.txt', 'proguard-rules.txt' + + ext.enableCrashlytics = false } debug { @@ -134,6 +136,8 @@ android { testCoverageEnabled true useLibrary 'org.apache.http.legacy' + + ext.enableCrashlytics = false } canary { @@ -142,6 +146,8 @@ android { minifyEnabled true proguardFiles 'proguard-android-optimize.txt', 'proguard-rules.txt' + + ext.enableCrashlytics = true } } } diff --git a/src/main/java/com/anysoftkeyboard/ui/settings/MainFragment.java b/src/main/java/com/anysoftkeyboard/ui/settings/MainFragment.java index eefbaa135..5de05f119 100644 --- a/src/main/java/com/anysoftkeyboard/ui/settings/MainFragment.java +++ b/src/main/java/com/anysoftkeyboard/ui/settings/MainFragment.java @@ -32,6 +32,7 @@ import com.anysoftkeyboard.ui.settings.setup.SetUpKeyboardWizardFragment; import com.anysoftkeyboard.ui.settings.setup.SetupSupport; import com.anysoftkeyboard.ui.tutorials.ChangeLogFragment; import com.anysoftkeyboard.utils.Log; +import com.menny.android.anysoftkeyboard.BuildConfig; import com.menny.android.anysoftkeyboard.R; import net.evendanan.chauffeur.lib.FragmentChauffeurActivity; @@ -60,6 +61,8 @@ public class MainFragment extends Fragment { .replace(R.id.change_log_fragment, new ChangeLogFragment.CardedChangeLogFragment()) .commit(); } + View testingView = view.findViewById(R.id.testing_build_message); + testingView.setVisibility(BuildConfig.BUILD_TYPE.equals("release")? View.GONE : View.VISIBLE); } @Override diff --git a/src/main/res/layout-w600dp/main_fragment.xml b/src/main/res/layout-w600dp/main_fragment.xml index ad1fb7fc9..6d1afd261 100644 --- a/src/main/res/layout-w600dp/main_fragment.xml +++ b/src/main/res/layout-w600dp/main_fragment.xml @@ -27,6 +27,10 @@ <include layout="@layout/main_fragment_top_info_layout"/> <!-- this box will be should shown + only if the build type is not release --> + <include layout="@layout/main_fragment_non_release_layout" /> + + <!-- this box will be should shown only if the keyboard is not fully enabled in the system. --> <include layout="@layout/main_fragment_not_configured_info_layout" /> diff --git a/src/main/res/layout/main_fragment.xml b/src/main/res/layout/main_fragment.xml index 95676d35e..e4f06c4ff 100644 --- a/src/main/res/layout/main_fragment.xml +++ b/src/main/res/layout/main_fragment.xml @@ -31,6 +31,10 @@ <include layout="@layout/main_fragment_top_info_layout" /> <!-- this box will be should shown + only if the build type is not release --> + <include layout="@layout/main_fragment_non_release_layout" /> + + <!-- this box will be should shown only if the keyboard is not fully enabled in the system. --> <include layout="@layout/main_fragment_not_configured_info_layout" /> diff --git a/src/main/res/layout/main_fragment_non_release_layout.xml b/src/main/res/layout/main_fragment_non_release_layout.xml new file mode 100644 index 000000000..0ca914ce1 --- /dev/null +++ b/src/main/res/layout/main_fragment_non_release_layout.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + style="@style/Ask.Card" + android:id="@+id/testing_build_message" + android:layout_marginTop="12dp" + android:layout_marginBottom="8dp" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/beta_tester_message" + android:textColor="?android:textColorSecondary" + android:autoLink="web" + android:layout_gravity="center_horizontal" + android:visibility="gone"/>
\ No newline at end of file |
