Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import android.widget.SeekBar;
import android.widget.Toast;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
Expand Down Expand Up @@ -86,6 +87,7 @@ public void onCreate() {
binding.clearCache.setOnClickListener(this);
binding.exportLog.setOnClickListener(this);
binding.requestAudioRecord.setOnClickListener(this);
binding.downloadNativeLibPlugin.setOnClickListener(this);
binding.theme.setOnClickListener(this);
binding.theme2.setOnClickListener(this);
binding.theme2Dark.setOnClickListener(this);
Expand Down Expand Up @@ -300,6 +302,29 @@ public void onClick(View v) {
}
}
}
if (v == binding.downloadNativeLibPlugin) {
new AlertDialog.Builder(getContext())
.setTitle(R.string.message_install_plugin)
.setItems(
new String[]{
"GitHub",
getContext().getString(R.string.settings_download_netdisk)
},
(dialog, which) -> {
String url = null;
if (which == 0) {
url = "https://github.com/ZalithLauncher/NativeLibPlugin/releases";
} else if (which == 1) {
url = "https://1813283584.share.123pan.cn/123pan/YLIUVv-Hae0v?notoken=1";
}
if (url != null) {
AndroidUtils.openLink(getContext(), url);
}
})
.setPositiveButton(com.tungsten.fcllibrary.R.string.dialog_positive, null)
.create()
.show();
}
if (v == binding.theme) {
FCLColorPickerDialog dialog = new FCLColorPickerDialog(getContext(), ThemeEngine.getInstance().getTheme().getColor(), new FCLColorPickerDialog.Listener() {
@Override
Expand Down
38 changes: 38 additions & 0 deletions FCL/src/main/res/layout/page_setting_launcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,44 @@

</androidx.appcompat.widget.LinearLayoutCompat>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray" />

<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp"
android:orientation="horizontal"
android:paddingStart="12dp"
android:paddingTop="8dp"
android:paddingEnd="12dp"
android:paddingBottom="8dp">

<com.tungsten.fcllibrary.component.view.FCLTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:singleLine="true"
android:text="@string/settings_launcher_download_native_lib_plugin"
app:auto_text_tint="true" />

<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />

<com.tungsten.fcllibrary.component.view.FCLButton
android:id="@+id/download_native_lib_plugin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/settings_launcher_download"
app:ripple="true" />

</androidx.appcompat.widget.LinearLayoutCompat>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
Expand Down
1 change: 1 addition & 0 deletions FCL/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@
<string name="settings_launcher_request">请求</string>
<string name="settings_launcher_debug">调试</string>
<string name="settings_launcher_request_recording_permission">请求麦克风权限(用于语音聊天模组)</string>
<string name="settings_launcher_download_native_lib_plugin">下载本地库插件</string>
<string name="settings_launcher_upgrade">启动器更新</string>
<string name="settings_launcher_upgrade_check">检测</string>
<string name="settings_launcher_cache">缓存文件夹</string>
Expand Down
1 change: 1 addition & 0 deletions FCL/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@
<string name="settings_launcher_request">Request</string>
<string name="settings_launcher_debug">Debug</string>
<string name="settings_launcher_request_recording_permission">Request recording permission (for voice chat mod)</string>
<string name="settings_launcher_download_native_lib_plugin">Download Native Library Plugin</string>
<string name="settings_launcher_upgrade">Update Launcher</string>
<string name="settings_launcher_upgrade_check">Check</string>
<string name="settings_launcher_cache">Cache Directory</string>
Expand Down
Loading