mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-19 23:07:42 +00:00
following PR suggestion on whitespace changes and revert
This commit is contained in:
parent
3a817e9abf
commit
a2016ce6d8
6 changed files with 27 additions and 112 deletions
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.keyman.android;
|
||||
|
||||
import com.keyman.engine.util.DownloadFileUtils;
|
||||
|
|
@ -36,12 +40,7 @@ import android.content.Intent;
|
|||
import io.sentry.android.core.SentryAndroid;
|
||||
import io.sentry.Sentry;
|
||||
|
||||
|
||||
/**
|
||||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
public class SystemKeyboard extends InputMethodService implements OnKeyboardEventListener {
|
||||
public class SystemKeyboard extends InputMethodService implements OnKeyboardEventListener {
|
||||
|
||||
private static View inputView = null;
|
||||
private KMHardwareKeyboardInterpreter interpreter = null;
|
||||
|
|
|
|||
|
|
@ -97,8 +97,6 @@ import androidx.core.view.WindowCompat;
|
|||
import androidx.core.view.WindowInsetsControllerCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import android.provider.Settings;
|
||||
|
|
@ -125,15 +123,10 @@ import android.widget.LinearLayout;
|
|||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import androidx.core.view.GravityCompat;
|
||||
|
||||
import android.view.Gravity;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import android.view.MenuItem;
|
||||
import androidx.appcompat.widget.AppCompatCheckBox;
|
||||
|
||||
import io.sentry.android.core.SentryAndroid;
|
||||
|
|
@ -187,7 +180,6 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
AppCompatDelegate.setDefaultNightMode(savedMode);
|
||||
getDelegate().applyDayNight();
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
context = this;
|
||||
|
||||
checkSendCrashReport();
|
||||
|
|
@ -255,14 +247,6 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setTitle(null);
|
||||
|
||||
getSupportActionBar().setDisplayUseLogoEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
getSupportActionBar().setDisplayShowTitleEnabled(true);
|
||||
getSupportActionBar().setLogo(R.drawable.keyman_logo);
|
||||
|
||||
getSupportActionBar().setDisplayUseLogoEnabled(false);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(false);
|
||||
|
||||
getSupportActionBar().setDisplayUseLogoEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
getSupportActionBar().setLogo(R.drawable.keyman_logo_mode);
|
||||
|
|
@ -404,6 +388,10 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
return;
|
||||
} else {
|
||||
ClipData userdata = returnIntent.getClipData();
|
||||
if (userdata == null) {
|
||||
checkGetStarted();
|
||||
return;
|
||||
}
|
||||
int len = userdata.getItemCount();
|
||||
for (int i = 0; i < len; i++) {
|
||||
Uri fileUri = userdata.getItemAt(i).getUri();
|
||||
|
|
@ -554,7 +542,7 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putString(userTextKey, textView.getText().toString());
|
||||
editor.putInt(userTextSizeKey, textSize);
|
||||
editor.commit();
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -1353,6 +1341,8 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
openThemeDialog();
|
||||
} else if (id == R.id.nav_about_current_keyboard || id == R.id.nav_help_active_keyboard) {
|
||||
showCurrentKeyboardSettings();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -1774,7 +1764,6 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
if (progressDialog != null && progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
;
|
||||
progressDialog = null;
|
||||
}
|
||||
|
||||
|
|
@ -1931,4 +1920,4 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
outStream.flush();
|
||||
outStream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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"
|
||||
android:orientation="vertical"
|
||||
|
||||
tools:context=".SelectLanguageFragment" >
|
||||
|
||||
<include layout="@layout/activity_list_layout"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".SelectLanguageFragment" >
|
||||
|
||||
<include layout="@layout/activity_list_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -4,81 +4,10 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<!-- <item android:id="@+id/action_share"-->
|
||||
<!-- app:showAsAction="always"-->
|
||||
<!-- android:title="@string/action_share"-->
|
||||
<!-- android:icon="@drawable/ic_action_share_mode"
|
||||
/>-->
|
||||
|
||||
<!-- Disable Web Browser to investigate Google sign-in -->
|
||||
<!--<item
|
||||
android:id="@+id/action_web"
|
||||
app:showAsAction="always"
|
||||
android:title="@string/action_web"
|
||||
android:icon="@drawable/ic_light_action_web" /> -->
|
||||
|
||||
<!-- <item android:id="@+id/action_share"-->
|
||||
<!-- app:showAsAction="always"-->
|
||||
<!-- android:title="@string/action_share"-->
|
||||
<!-- android:icon="@drawable/ic_light_action_share" />-->
|
||||
<!-- Set showAsAction="never" for overflow -->
|
||||
<!-- <item-->
|
||||
<!-- android:id="@+id/action_overflow"-->
|
||||
<!-- app:showAsAction="ifRoom"-->
|
||||
<!-- android:title="@string/action_overflow"-->
|
||||
<!-- android:icon="@drawable/ic_light_action_overflow" >-->
|
||||
|
||||
<!-- <menu>-->
|
||||
<!-- <item android:id="@+id/action_share"-->
|
||||
<!-- app:showAsAction="always"-->
|
||||
<!-- android:title="@string/action_share"-->
|
||||
<!-- android:icon="@drawable/ic_light_action_share" />-->
|
||||
|
||||
<!-- <item-->
|
||||
<!-- android:id="@+id/action_text_size"-->
|
||||
<!-- android:title="@string/action_text_size"-->
|
||||
<!-- app:showAsAction="always"-->
|
||||
<!-- android:icon="@drawable/ic_light_action_textsize" />-->
|
||||
|
||||
<!-- <item-->
|
||||
<!-- android:id="@+id/action_clear_text"-->
|
||||
<!-- android:title="@string/action_clear_text"-->
|
||||
<!-- app:showAsAction="always"-->
|
||||
<!-- android:icon="@drawable/ic_light_action_trash" />-->
|
||||
|
||||
<!-- <item-->
|
||||
<!-- android:id="@+id/action_info"-->
|
||||
<!-- android:title="@string/action_info"-->
|
||||
<!-- app:showAsAction="always"-->
|
||||
<!-- android:icon="@drawable/ic_light_action_info" />-->
|
||||
|
||||
<!-- <item-->
|
||||
<!-- android:id="@+id/action_get_started"-->
|
||||
<!-- android:title="@string/get_started"-->
|
||||
<!-- app:showAsAction="always"-->
|
||||
<!-- android:icon="@drawable/ic_action_get_started" />-->
|
||||
|
||||
<!-- <item-->
|
||||
<!-- android:id="@+id/action_settings"-->
|
||||
<!-- android:title="@string/action_settings"-->
|
||||
<!-- app:showAsAction="always"-->
|
||||
<!-- android:icon="@drawable/ic_settings" />-->
|
||||
|
||||
<!-- <item-->
|
||||
<!-- android:id="@+id/action_update_keyboards"-->
|
||||
<!-- android:title="@string/action_install_updates"-->
|
||||
<!-- app:showAsAction="always"-->
|
||||
<!-- android:icon="@drawable/ic_cloud_download"-->
|
||||
<!-- app:actionLayout="@layout/update_count_view"/>-->
|
||||
|
||||
<!-- </menu>-->
|
||||
<!-- </item>-->
|
||||
|
||||
<item
|
||||
android:id="@+id/action_sidebar"
|
||||
android:icon="@drawable/ic_action_overflow_mode_small"
|
||||
android:title="Menu"
|
||||
android:title="@string/menu_title"
|
||||
app:showAsAction="always" />
|
||||
|
||||
|
||||
</menu>
|
||||
|
|
@ -43,10 +43,6 @@
|
|||
<item name="android:windowBackground">#424242</item>
|
||||
</style>
|
||||
|
||||
<!-- <style name="AppTheme.BrandedLaunch" parent="Theme.AppCompat.NoActionBar">-->
|
||||
<!-- <item name="android:windowBackground">@drawable/branded_logo_dark_mode</item>-->
|
||||
<!-- </style>-->
|
||||
|
||||
<style name="Theme.App.Starting" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="android:windowBackground">@drawable/branded_logo_dark_mode</item>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -309,4 +309,7 @@
|
|||
|
||||
<!-- Context: anywhere -->
|
||||
<string name="unable_to_open_browser" comment="Notification when a browser activity cannot be launched">Unable to launch web browser</string>
|
||||
|
||||
<!-- Context: Menu title -->
|
||||
<string name="menu_title" comment="Title for overflow/menu button">Menu</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue