<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unexpected-keyboard/srcs/juloo.keyboard2/SettingsActivity.java, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/'/>
<entry>
<title>Better support for foldable devices (#982)</title>
<updated>2025-05-22T21:54:13+00:00</updated>
<author>
<name>Matej Drobnič</name>
</author>
<published>2025-05-22T21:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/commit/?id=97355881a855c5d2503f7e518c1e30fc03f88d4e'/>
<id>97355881a855c5d2503f7e518c1e30fc03f88d4e</id>
<content type='text'>
* Add AndroidX WindowManager

unfortunately, this seems to be the only way to get fold state, native Android APIs are internal. To add this, we need to update some dependencies, raise java version and raise compile SDK.

* adds separate layouts and separate layout settings for folded and unfolded state of the device.

The affected settings are:
+ the margin bottom settings
+ the horizontal margin settings
+ the keyboard height settings

* Update shell.nix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add AndroidX WindowManager

unfortunately, this seems to be the only way to get fold state, native Android APIs are internal. To add this, we need to update some dependencies, raise java version and raise compile SDK.

* adds separate layouts and separate layout settings for folded and unfolded state of the device.

The affected settings are:
+ the margin bottom settings
+ the horizontal margin settings
+ the keyboard height settings

* Update shell.nix
</pre>
</div>
</content>
</entry>
<entry>
<title>Light and dark themes for the launcher and settings</title>
<updated>2024-01-20T21:37:51+00:00</updated>
<author>
<name>RetrogisusDEV</name>
</author>
<published>2024-01-17T13:18:10+00:00</published>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/commit/?id=a55506e6072aec69aaf5f380c42256ca108e139d'/>
<id>a55506e6072aec69aaf5f380c42256ca108e139d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Migrate layouts preferences</title>
<updated>2023-08-16T10:21:40+00:00</updated>
<author>
<name>Jules Aguillon</name>
</author>
<published>2023-08-15T18:23:33+00:00</published>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/commit/?id=5822f98bbbc3b96a90ff09551de8252ca18bca22'/>
<id>5822f98bbbc3b96a90ff09551de8252ca18bca22</id>
<content type='text'>
The new `layouts` preference replaces three previous preferences:

    layout
    second_layout
    custom_layout

Add a preference migration function, which first migration is to
migrate layouts into the new preference.

The migration must also be called from the SettingsActivity as it might
use a different preference store due to the boot-aware preference copy.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new `layouts` preference replaces three previous preferences:

    layout
    second_layout
    custom_layout

Add a preference migration function, which first migration is to
migrate layouts into the new preference.

The migration must also be called from the SettingsActivity as it might
use a different preference store due to the boot-aware preference copy.
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle configuration change quickly</title>
<updated>2022-12-11T20:57:40+00:00</updated>
<author>
<name>Jules Aguillon</name>
</author>
<published>2022-12-11T20:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/commit/?id=bf318729555cc6e3362716e16d60b53d466e808f'/>
<id>bf318729555cc6e3362716e16d60b53d466e808f</id>
<content type='text'>
setInputView() was not called when the view was re-created through
refresh_config(). Also, the refresh_config() function was not able to
properly set the current layout.

Now keep the default layout (_localeTextLayout) and the current non-text
layout (if any, _currentSpecialLayout) separately to be able to refresh
them later.

setInputView() is called everytime the view is created instead of by
onStartInputView() specifically.

The setting activity now save the preferences to the protected storage
in onStop() instead of listening for onSharedPreferenceChanged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
setInputView() was not called when the view was re-created through
refresh_config(). Also, the refresh_config() function was not able to
properly set the current layout.

Now keep the default layout (_localeTextLayout) and the current non-text
layout (if any, _currentSpecialLayout) separately to be able to refresh
them later.

setInputView() is called everytime the view is created instead of by
onStartInputView() specifically.

The setting activity now save the preferences to the protected storage
in onStop() instead of listening for onSharedPreferenceChanged.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix keyboard not reacting to changed preferences</title>
<updated>2022-12-11T13:55:32+00:00</updated>
<author>
<name>Jules Aguillon</name>
</author>
<published>2022-12-11T13:55:32+00:00</published>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/commit/?id=87d21685ca2909a1a08ac22bd8eb2672c3139840'/>
<id>87d21685ca2909a1a08ac22bd8eb2672c3139840</id>
<content type='text'>
The callback might not be called if the "default" shared preferences is
different from the shared preferences actually used. This is unexpected
but seems to happen half of the time on Android 12.

Since f1ce6ab, this callback is critical to update the keyboard.
Restarting the application can no longer solve these issues.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The callback might not be called if the "default" shared preferences is
different from the shared preferences actually used. This is unexpected
but seems to happen half of the time on Android 12.

Since f1ce6ab, this callback is critical to update the keyboard.
Restarting the application can no longer solve these issues.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid crashing in direct-boot mode</title>
<updated>2022-11-11T14:39:28+00:00</updated>
<author>
<name>Jules Aguillon</name>
</author>
<published>2022-11-11T14:39:28+00:00</published>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/commit/?id=ef34303c7eaa781ed4655016538aac47f0aef002'/>
<id>ef34303c7eaa781ed4655016538aac47f0aef002</id>
<content type='text'>
The settings activity can't open in direct-boot mode. The emoji pane
opens without the "last used" data.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The settings activity can't open in direct-boot mode. The emoji pane
opens without the "last used" data.
</pre>
</div>
</content>
</entry>
<entry>
<title>Direct-boot aware preferences</title>
<updated>2022-11-11T13:27:02+00:00</updated>
<author>
<name>Jules Aguillon</name>
</author>
<published>2022-11-11T13:27:02+00:00</published>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/commit/?id=f1ce6abe5a37c9ca57d885ecb9a3218969bc7fdf'/>
<id>f1ce6abe5a37c9ca57d885ecb9a3218969bc7fdf</id>
<content type='text'>
Store preferences in device protected storage, which is available before
the device is unlocked.
The keyboard was crashing when trying to access the encrypted
preferences.

The emoji pane uses a separate preferences file, the old data is lost.

The SettingsActivity can't easily use the new preferences storage.
Instead, it continues to use the "default" preferences store, which is
copied back to the protected storage when needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Store preferences in device protected storage, which is available before
the device is unlocked.
The keyboard was crashing when trying to access the encrypted
preferences.

The emoji pane uses a separate preferences file, the old data is lost.

The SettingsActivity can't easily use the new preferences storage.
Instead, it continues to use the "default" preferences store, which is
copied back to the protected storage when needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Automatic day night theme in settings activity</title>
<updated>2022-11-05T09:13:35+00:00</updated>
<author>
<name>Jules Aguillon</name>
</author>
<published>2022-11-05T09:13:35+00:00</published>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/commit/?id=d2328d4b9a33469f9adc3fcbe9fab9a28a7e1da8'/>
<id>d2328d4b9a33469f9adc3fcbe9fab9a28a7e1da8</id>
<content type='text'>
There seems to be no "DayNight" theme compatible with older version of
android outside of the androidx library.

Using 'Theme.DeviceDefault' which is a dark theme, even if it doesn't
sounds like. Detect if a light theme should be used at activity
creation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There seems to be no "DayNight" theme compatible with older version of
android outside of the androidx library.

Using 'Theme.DeviceDefault' which is a dark theme, even if it doesn't
sounds like. Detect if a light theme should be used at activity
creation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Auto-format Java and XML files</title>
<updated>2021-12-19T18:44:27+00:00</updated>
<author>
<name>Jules Aguillon</name>
</author>
<published>2021-12-19T18:44:27+00:00</published>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/commit/?id=1cfecbdf48edb65cc0be8b017c8f389f91212a32'/>
<id>1cfecbdf48edb65cc0be8b017c8f389f91212a32</id>
<content type='text'>
Use xmllint.
Re-indent Java files using spaces.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use xmllint.
Re-indent Java files using spaces.
</pre>
</div>
</content>
</entry>
<entry>
<title>Start SettingsActivity</title>
<updated>2015-08-08T14:47:22+00:00</updated>
<author>
<name>juloo</name>
</author>
<published>2015-08-08T14:47:22+00:00</published>
<link rel='alternate' type='text/html' href='https://ps.run/git/unexpected-keyboard/commit/?id=153c3849903c3d8489c3af17581d3d1073abb935'/>
<id>153c3849903c3d8489c3af17581d3d1073abb935</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
