-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎉Release 1.3,让功能设置可以在UI上自由决定(星闪网络设置页面),添加对话框防止因外部点击消失,对某些暂时未完成的功能停止设置…
…和监听事件。添加新旧聊天UI的代码内设置。
- Loading branch information
1 parent
69d91b4
commit 3867299
Showing
5 changed files
with
165 additions
and
28 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions
37
...src/main/java/com/haohanyh/linmengjia/nearlink/nlchat/fun/ChatCore/ChatUIAlertDialog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.haohanyh.linmengjia.nearlink.nlchat.fun.ChatCore; | ||
|
||
import android.content.Context; | ||
import android.content.DialogInterface; | ||
import android.widget.CompoundButton; | ||
|
||
import androidx.appcompat.app.AlertDialog; | ||
|
||
import com.haohanyh.linmengjia.nearlink.nlchat.fun.R; | ||
|
||
public class ChatUIAlertDialog { | ||
|
||
private static boolean b = true; | ||
|
||
public static boolean show(Context context, String title, String message, CompoundButton compoundButton) { | ||
new AlertDialog.Builder(context, R.style.HaohanyhDialog) | ||
.setTitle(title) | ||
.setMessage(message) | ||
.setCancelable(false) // 设置为 false 以防止点击对话框外部时消失 | ||
.setPositiveButton("确认停止", new DialogInterface.OnClickListener() { | ||
public void onClick(DialogInterface dialog, int which) { | ||
// 用户确认,允许取消勾选 | ||
compoundButton.setChecked(false); | ||
b = false; | ||
} | ||
}) | ||
.setNegativeButton("取消停止", new DialogInterface.OnClickListener() { | ||
public void onClick(DialogInterface dialog, int which) { | ||
// 用户取消,恢复勾选状态 | ||
compoundButton.setChecked(true); | ||
b = true; | ||
} | ||
}) | ||
.show(); | ||
return b; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters