设置窗口UI优化。添加TTS悬浮窗口位置调整功能。
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue Feb 10 19:09:02 GMT 2026
|
#Tue Feb 10 21:19:54 GMT 2026
|
||||||
stageCount=7
|
stageCount=7
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.12
|
baseVersion=15.12
|
||||||
publishVersion=15.12.6
|
publishVersion=15.12.6
|
||||||
buildCount=1
|
buildCount=24
|
||||||
baseBetaVersion=15.12.7
|
baseBetaVersion=15.12.7
|
||||||
|
|||||||
@@ -65,11 +65,9 @@
|
|||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:networkSecurityConfig="@xml/network_security_config">
|
android:networkSecurityConfig="@xml/network_security_config">
|
||||||
|
|
||||||
<activity
|
<activity android:name=".activitys.SMSActivity"/>
|
||||||
android:name=".activitys.SMSActivity"/>
|
|
||||||
|
|
||||||
<activity
|
<activity android:name=".activitys.SMSReceiveRuleActivity">
|
||||||
android:name=".activitys.SMSReceiveRuleActivity">
|
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
@@ -95,11 +93,9 @@
|
|||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity
|
<activity android:name=".activitys.TTSPlayRuleActivity"/>
|
||||||
android:name=".activitys.TTSPlayRuleActivity"/>
|
|
||||||
|
|
||||||
<activity
|
<activity android:name=".activitys.AboutActivity"/>
|
||||||
android:name=".activitys.AboutActivity"/>
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activitys.MainActivity"
|
android:name=".activitys.MainActivity"
|
||||||
@@ -222,6 +218,8 @@
|
|||||||
|
|
||||||
<activity android:name="cc.winboll.studio.mymessagemanager.unittest.UnitTestActivity"/>
|
<activity android:name="cc.winboll.studio.mymessagemanager.unittest.UnitTestActivity"/>
|
||||||
|
|
||||||
|
<activity android:name="cc.winboll.studio.mymessagemanager.activitys.TTSFloatSettingsActivity"/>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -147,4 +147,9 @@ public class AppSettingsActivity extends WinBoLLActivity implements IWinBoLLActi
|
|||||||
}, mszProtectModerRefuseChars);
|
}, mszProtectModerRefuseChars);
|
||||||
dlg.show();
|
dlg.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onTTSFloatSettingsActivity(View view) {
|
||||||
|
Intent intent = new Intent(this, TTSFloatSettingsActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package cc.winboll.studio.mymessagemanager.activitys;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import cc.winboll.studio.mymessagemanager.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 豆包&ZhanGSKen<zhangsken@qq.com>
|
||||||
|
* @Date 2026/02/11 03:45
|
||||||
|
* @Describe TTS悬浮窗设置类(使用可拖动自定义控件)
|
||||||
|
*/
|
||||||
|
public class TTSFloatSettingsActivity extends Activity {
|
||||||
|
|
||||||
|
public static final String TAG = "TTSFloatSettingsActivity";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
// 直接加载包含自定义拖动控件的布局
|
||||||
|
setContentView(R.layout.activity_ttsfloatsettings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
package cc.winboll.studio.mymessagemanager.utils;
|
package cc.winboll.studio.mymessagemanager.utils;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author ZhanGSKen<zhangsken@qq.com>
|
|
||||||
* @Date 2024/07/03 10:27:46
|
|
||||||
* @Describe TTS语音播放工具类
|
|
||||||
*/
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.PixelFormat;
|
import android.graphics.PixelFormat;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@@ -17,14 +12,13 @@ import android.widget.LinearLayout;
|
|||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.mymessagemanager.R;
|
import cc.winboll.studio.mymessagemanager.R;
|
||||||
import cc.winboll.studio.mymessagemanager.beans.TTSSpeakTextBean;
|
import cc.winboll.studio.mymessagemanager.beans.TTSSpeakTextBean;
|
||||||
|
import cc.winboll.studio.mymessagemanager.views.DraggableView;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class TextToSpeechUtil {
|
public class TextToSpeechUtil {
|
||||||
|
|
||||||
public static final String TAG = "TextToSpeechUtil";
|
public static final String TAG = "TextToSpeechUtil";
|
||||||
|
|
||||||
public static final String UNIQUE_ID = "UNIQUE_ID";
|
public static final String UNIQUE_ID = "UNIQUE_ID";
|
||||||
|
|
||||||
static TextToSpeechUtil _mTextToSpeechUtil;
|
static TextToSpeechUtil _mTextToSpeechUtil;
|
||||||
|
|
||||||
View mView;
|
View mView;
|
||||||
@@ -35,7 +29,6 @@ public class TextToSpeechUtil {
|
|||||||
|
|
||||||
TextToSpeechUtil(Context context) {
|
TextToSpeechUtil(Context context) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
// 获取WindowManager
|
|
||||||
mWindowManager = (WindowManager) mContext.getSystemService(mContext.WINDOW_SERVICE);
|
mWindowManager = (WindowManager) mContext.getSystemService(mContext.WINDOW_SERVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,65 +39,49 @@ public class TextToSpeechUtil {
|
|||||||
return _mTextToSpeechUtil;
|
return _mTextToSpeechUtil;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// 播放 TTS 语音队列
|
|
||||||
//
|
|
||||||
public void speekTTSList(final ArrayList<TTSSpeakTextBean> listTTSSpeakTextBean) {
|
public void speekTTSList(final ArrayList<TTSSpeakTextBean> listTTSSpeakTextBean) {
|
||||||
// 重置播放退出标志位
|
|
||||||
isExist = false;
|
isExist = false;
|
||||||
|
|
||||||
// 开始播放
|
|
||||||
if (mTextToSpeech == null) {
|
if (mTextToSpeech == null) {
|
||||||
//ToastUtils.show("mTextToSpeech == null");
|
|
||||||
// 创建TextToSpeech实例
|
|
||||||
mTextToSpeech = new TextToSpeech(mContext, new TextToSpeech.OnInitListener() {
|
mTextToSpeech = new TextToSpeech(mContext, new TextToSpeech.OnInitListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onInit(int i) {
|
public void onInit(int i) {
|
||||||
if (i == TextToSpeech.SUCCESS) {
|
if (i == TextToSpeech.SUCCESS) {
|
||||||
speekTTSList(listTTSSpeakTextBean);
|
speekTTSList(listTTSSpeakTextBean);
|
||||||
} else {
|
} else {
|
||||||
LogUtils.d(TAG, "TTS init failed : " + Integer.toString(i) + ". The app [https://play.google.com/store/apps/details?id=com.google.android.tts] maybe fix this TTS probrem. ");
|
LogUtils.d(TAG, "TTS init failed : " + Integer.toString(i) + ". The app [https://play.google.com/store/apps/details?id=com.google.android.tts] maybe fix this TTS probrem. ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mTextToSpeech.setOnUtteranceProgressListener(mUtteranceProgressListener);
|
mTextToSpeech.setOnUtteranceProgressListener(mUtteranceProgressListener);
|
||||||
} else {
|
} else {
|
||||||
if (mTextToSpeech != null && listTTSSpeakTextBean != null && listTTSSpeakTextBean.size() > 0) {
|
if (mTextToSpeech != null && listTTSSpeakTextBean != null && listTTSSpeakTextBean.size() > 0) {
|
||||||
// 清理过期的悬浮窗
|
|
||||||
if (mWindowManager != null && mView != null) {
|
if (mWindowManager != null && mView != null) {
|
||||||
try {
|
try {
|
||||||
mWindowManager.removeView(mView);
|
mWindowManager.removeView(mView);
|
||||||
mView = null;
|
mView = null;
|
||||||
} catch(Exception e) {
|
} catch (Exception e) {
|
||||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示悬浮窗
|
initWindow(); // 已同步尺寸和位置
|
||||||
initWindow();
|
|
||||||
|
int nDelay = listTTSSpeakTextBean.get(0).mnDelay;
|
||||||
// 播放 TTS 语音
|
|
||||||
//
|
|
||||||
//ToastUtils.show("initWindow done.");
|
|
||||||
// 设置延迟间隔
|
|
||||||
int nDelay = listTTSSpeakTextBean.get(0).mnDelay;
|
|
||||||
try {
|
try {
|
||||||
Thread.sleep(nDelay);
|
Thread.sleep(nDelay);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||||
}
|
}
|
||||||
//ToastUtils.show("Delay done.");
|
|
||||||
for (int speakPosition = 0; speakPosition < listTTSSpeakTextBean.size() && !isExist; speakPosition++) {
|
for (int speakPosition = 0; speakPosition < listTTSSpeakTextBean.size() && !isExist; speakPosition++) {
|
||||||
// 播放语音
|
|
||||||
String szSpeakContent = listTTSSpeakTextBean.get(speakPosition).mszSpeakContent;
|
String szSpeakContent = listTTSSpeakTextBean.get(speakPosition).mszSpeakContent;
|
||||||
isExist = (listTTSSpeakTextBean.size() - 2 < speakPosition);
|
isExist = (listTTSSpeakTextBean.size() - 2 < speakPosition);
|
||||||
//ToastUtils.show("for isExist is : " + Boolean.toString(isExist));
|
|
||||||
if (speakPosition == 0) {
|
if (speakPosition == 0) {
|
||||||
mTextToSpeech.speak(szSpeakContent, TextToSpeech.QUEUE_FLUSH, null, UNIQUE_ID);
|
mTextToSpeech.speak(szSpeakContent, TextToSpeech.QUEUE_FLUSH, null, UNIQUE_ID);
|
||||||
} else {
|
} else {
|
||||||
mTextToSpeech.speak(szSpeakContent, TextToSpeech.QUEUE_ADD, null, UNIQUE_ID);
|
mTextToSpeech.speak(szSpeakContent, TextToSpeech.QUEUE_ADD, null, UNIQUE_ID);
|
||||||
}
|
}
|
||||||
//ToastUtils.show("mTextToSpeech.speak");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,8 +96,6 @@ public class TextToSpeechUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void onDone(String utteranceId) {
|
public void onDone(String utteranceId) {
|
||||||
LogUtils.d(TAG, "播放结束");
|
LogUtils.d(TAG, "播放结束");
|
||||||
//ToastUtils.show("isExist is : " + Boolean.toString(isExist));
|
|
||||||
// 关闭悬浮窗
|
|
||||||
if (isExist && mWindowManager != null && mView != null) {
|
if (isExist && mWindowManager != null && mView != null) {
|
||||||
LogUtils.d(TAG, "关闭悬浮窗");
|
LogUtils.d(TAG, "关闭悬浮窗");
|
||||||
mWindowManager.removeView(mView);
|
mWindowManager.removeView(mView);
|
||||||
@@ -133,54 +108,51 @@ public class TextToSpeechUtil {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// 初始化 TTS 悬浮窗
|
|
||||||
//
|
|
||||||
private void initWindow() {
|
private void initWindow() {
|
||||||
//ToastUtils.show("initWindow");
|
|
||||||
// 创建布局参数
|
|
||||||
WindowManager.LayoutParams params = new WindowManager.LayoutParams();
|
WindowManager.LayoutParams params = new WindowManager.LayoutParams();
|
||||||
//这里需要进行不同的设置
|
|
||||||
|
// 窗口类型适配
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
params.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
params.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
||||||
} else {
|
} else {
|
||||||
params.type = WindowManager.LayoutParams.TYPE_PHONE;
|
params.type = WindowManager.LayoutParams.TYPE_PHONE;
|
||||||
}
|
}
|
||||||
//设置透明度
|
|
||||||
|
// 基础配置
|
||||||
params.alpha = 0.9f;
|
params.alpha = 0.9f;
|
||||||
//设置内部视图对齐方式
|
|
||||||
params.gravity = Gravity.RIGHT | Gravity.BOTTOM;
|
|
||||||
//窗口的右上角角坐标
|
|
||||||
params.x = 20;
|
|
||||||
params.y = 20;
|
|
||||||
//是指定窗口的像素格式为 RGBA_8888。
|
|
||||||
//使用 RGBA_8888 像素格式的窗口可以在保持高质量图像的同时实现透明度效果。
|
|
||||||
params.format = PixelFormat.RGBA_8888;
|
params.format = PixelFormat.RGBA_8888;
|
||||||
//设置窗口的宽高,这里为自动
|
params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
|
||||||
params.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
||||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
params.gravity = Gravity.LEFT | Gravity.TOP; // 与保存的左上角坐标匹配
|
||||||
//这段非常重要,是后续是否穿透点击的关键
|
|
||||||
params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE //表示悬浮窗口不需要获取焦点,这样用户点击悬浮窗口以外的区域,就不需要关闭悬浮窗口。
|
// 核心修改1:同步DraggableView保存的尺寸(宽高完全一致)
|
||||||
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;//表示悬浮窗口不会阻塞事件传递,即用户点击悬浮窗口以外的区域时,事件会传递给后面的窗口处理。
|
int[] savedSize = DraggableView.getLastViewSize(mContext);
|
||||||
//这里的引入布局文件的方式,也可以动态添加控件
|
params.width = savedSize[0]; // 同步宽度
|
||||||
|
params.height = savedSize[1]; // 同步高度
|
||||||
|
|
||||||
|
// 核心修改2:同步DraggableView保存的位置
|
||||||
|
int[] savedPosition = DraggableView.getLastPosition(mContext);
|
||||||
|
params.x = savedPosition[0]; // 同步X坐标
|
||||||
|
params.y = savedPosition[1]; // 同步Y坐标
|
||||||
|
|
||||||
|
// 加载布局(view_tts_back.xml与DraggableView一致,确保样式统一)
|
||||||
mView = View.inflate(mContext, R.layout.view_tts_back, null);
|
mView = View.inflate(mContext, R.layout.view_tts_back, null);
|
||||||
LinearLayout llMain = mView.findViewById(R.id.viewttsbackLinearLayout1);
|
LinearLayout llMain = mView.findViewById(R.id.viewttsbackLinearLayout1);
|
||||||
llMain.setOnClickListener(new View.OnClickListener(){
|
llMain.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
isExist = true;
|
||||||
|
if (mTextToSpeech != null) {
|
||||||
|
mTextToSpeech.stop();
|
||||||
|
}
|
||||||
|
if (mWindowManager != null && mView != null) {
|
||||||
|
mWindowManager.removeView(mView);
|
||||||
|
mView = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
//ToastUtils.show("onClick");
|
|
||||||
isExist = true;
|
|
||||||
if (mTextToSpeech != null) {
|
|
||||||
mTextToSpeech.stop();
|
|
||||||
}
|
|
||||||
if (mWindowManager != null && mView != null) {
|
|
||||||
mWindowManager.removeView(mView);
|
|
||||||
mView = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mWindowManager.addView(mView, params);
|
mWindowManager.addView(mView, params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,190 @@
|
|||||||
|
package cc.winboll.studio.mymessagemanager.views;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.ViewTreeObserver;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
import cc.winboll.studio.mymessagemanager.R;
|
||||||
|
|
||||||
|
public class DraggableView extends FrameLayout {
|
||||||
|
// SP配置常量(新增尺寸保存键)
|
||||||
|
private static final String SP_NAME = "TTS_FLOAT_DRAG_CONFIG";
|
||||||
|
private static final String KEY_LEFT = "drag_view_left";
|
||||||
|
private static final String KEY_TOP = "drag_view_top";
|
||||||
|
private static final String KEY_WIDTH = "drag_view_width"; // 新增:保存布局宽度
|
||||||
|
private static final String KEY_HEIGHT = "drag_view_height"; // 新增:保存布局高度
|
||||||
|
|
||||||
|
// 位置/尺寸变量
|
||||||
|
private int viewLeft;
|
||||||
|
private int viewTop;
|
||||||
|
private int viewWidth;
|
||||||
|
private int viewHeight;
|
||||||
|
private int screenWidth;
|
||||||
|
private int screenHeight;
|
||||||
|
// 拖动相关
|
||||||
|
private float downX;
|
||||||
|
private float downY;
|
||||||
|
private boolean isDragging = false;
|
||||||
|
|
||||||
|
// 构造方法
|
||||||
|
public DraggableView(Context context) {
|
||||||
|
super(context);
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DraggableView(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DraggableView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||||
|
super(context, attrs, defStyleAttr);
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
LayoutInflater.from(getContext()).inflate(R.layout.view_tts_back, this, true);
|
||||||
|
DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();
|
||||||
|
screenWidth = metrics.widthPixels;
|
||||||
|
screenHeight = metrics.heightPixels;
|
||||||
|
|
||||||
|
getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||||
|
@Override
|
||||||
|
public void onGlobalLayout() {
|
||||||
|
ViewTreeObserver currentVto = getViewTreeObserver();
|
||||||
|
if (currentVto.isAlive()) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||||
|
currentVto.removeOnGlobalLayoutListener(this);
|
||||||
|
} else {
|
||||||
|
currentVto.removeGlobalOnLayoutListener(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取布局实际宽高
|
||||||
|
viewWidth = getMeasuredWidth();
|
||||||
|
viewHeight = getMeasuredHeight();
|
||||||
|
// 保存尺寸到SP(新增)
|
||||||
|
saveViewSize();
|
||||||
|
// 初始化位置
|
||||||
|
initPosition();
|
||||||
|
updateViewPosition();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化位置(不变)
|
||||||
|
private void initPosition() {
|
||||||
|
SharedPreferences sp = getContext().getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);
|
||||||
|
int defaultLeft = screenWidth - viewWidth;
|
||||||
|
int defaultTop = screenHeight - viewHeight;
|
||||||
|
viewLeft = sp.getInt(KEY_LEFT, defaultLeft);
|
||||||
|
viewTop = sp.getInt(KEY_TOP, defaultTop);
|
||||||
|
checkBoundary();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增:保存布局尺寸到SP
|
||||||
|
private void saveViewSize() {
|
||||||
|
if (viewWidth > 0 && viewHeight > 0) {
|
||||||
|
SharedPreferences sp = getContext().getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);
|
||||||
|
sp.edit()
|
||||||
|
.putInt(KEY_WIDTH, viewWidth)
|
||||||
|
.putInt(KEY_HEIGHT, viewHeight)
|
||||||
|
.apply();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增:公共静态方法 - 查询最后保存的布局尺寸
|
||||||
|
public static int[] getLastViewSize(Context context) {
|
||||||
|
SharedPreferences sp = context.getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);
|
||||||
|
// 默认尺寸:120x120像素(与view_tts_back.xml示例尺寸一致,避免无值时异常)
|
||||||
|
int defaultWidth = dp2px(context, 120);
|
||||||
|
int defaultHeight = dp2px(context, 120);
|
||||||
|
// 从SP读取尺寸(无值则用默认)
|
||||||
|
int width = sp.getInt(KEY_WIDTH, defaultWidth);
|
||||||
|
int height = sp.getInt(KEY_HEIGHT, defaultHeight);
|
||||||
|
return new int[]{width, height};
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增:dp转px工具方法(确保默认尺寸适配不同屏幕)
|
||||||
|
private static int dp2px(Context context, float dpValue) {
|
||||||
|
final float scale = context.getResources().getDisplayMetrics().density;
|
||||||
|
return (int) (dpValue * scale + 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 原有方法(checkBoundary、updateViewPosition、savePosition、onTouchEvent、getLastPosition)保持不变
|
||||||
|
private void checkBoundary() {
|
||||||
|
viewLeft = Math.max(0, viewLeft);
|
||||||
|
viewTop = Math.max(0, viewTop);
|
||||||
|
viewLeft = Math.min(screenWidth - viewWidth, viewLeft);
|
||||||
|
viewTop = Math.min(screenHeight - viewHeight, viewTop);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateViewPosition() {
|
||||||
|
LayoutParams params = (LayoutParams) getLayoutParams();
|
||||||
|
if (params != null) {
|
||||||
|
params.leftMargin = viewLeft;
|
||||||
|
params.topMargin = viewTop;
|
||||||
|
setLayoutParams(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void savePosition() {
|
||||||
|
SharedPreferences sp = getContext().getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);
|
||||||
|
sp.edit()
|
||||||
|
.putInt(KEY_LEFT, viewLeft)
|
||||||
|
.putInt(KEY_TOP, viewTop)
|
||||||
|
.apply();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(MotionEvent event) {
|
||||||
|
if (viewWidth == 0 || viewHeight == 0) return super.onTouchEvent(event);
|
||||||
|
|
||||||
|
float rawX = event.getRawX();
|
||||||
|
float rawY = event.getRawY();
|
||||||
|
|
||||||
|
switch (event.getAction()) {
|
||||||
|
case MotionEvent.ACTION_DOWN:
|
||||||
|
isDragging = true;
|
||||||
|
downX = rawX - viewLeft;
|
||||||
|
downY = rawY - viewTop;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MotionEvent.ACTION_MOVE:
|
||||||
|
if (isDragging) {
|
||||||
|
viewLeft = (int) (rawX - downX);
|
||||||
|
viewTop = (int) (rawY - downY);
|
||||||
|
checkBoundary();
|
||||||
|
updateViewPosition();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MotionEvent.ACTION_UP:
|
||||||
|
if (isDragging) {
|
||||||
|
isDragging = false;
|
||||||
|
savePosition();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int[] getLastPosition(Context context) {
|
||||||
|
SharedPreferences sp = context.getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);
|
||||||
|
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
|
||||||
|
int screenWidth = metrics.widthPixels;
|
||||||
|
int screenHeight = metrics.heightPixels;
|
||||||
|
|
||||||
|
int defaultLeft = 0;
|
||||||
|
int defaultTop = 0;
|
||||||
|
|
||||||
|
int left = sp.getInt(KEY_LEFT, defaultLeft);
|
||||||
|
int top = sp.getInt(KEY_TOP, defaultTop);
|
||||||
|
return new int[]{left, top};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -4,8 +4,7 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:background="@drawable/bg_frame">
|
|
||||||
|
|
||||||
<cc.winboll.studio.libaes.views.AToolbar
|
<cc.winboll.studio.libaes.views.AToolbar
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -15,80 +14,106 @@
|
|||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1.0">
|
android:layout_weight="1.0"
|
||||||
|
android:padding="4dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.0"
|
android:spacing="12dp">
|
||||||
android:padding="5dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_frame">
|
android:background="@drawable/bg_frame"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:layout_marginBottom="8dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="用户视觉系统保护模式设置:"
|
android:text="用户视觉系统保护模式设置:"
|
||||||
android:paddingLeft="5dp"/>
|
android:paddingLeft="5dp"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="#999999"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:text="回收站短信保护式预览开关:"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:id="@+id/activityappsettingsSwitch3"
|
||||||
|
android:gravity="center_vertical"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="#BBBBBB"
|
||||||
|
android:layout_marginVertical="8dp"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical"
|
||||||
|
android:layout_marginLeft="5dp">
|
||||||
|
|
||||||
<Switch
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="48dp"
|
|
||||||
android:text="回收站短信保护式预览开关:"
|
|
||||||
android:paddingLeft="5dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:id="@+id/activityappsettingsSwitch3"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:text="拒绝显示的字符集:"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:textSize="12sp"/>
|
||||||
|
|
||||||
<TextView
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="40dp"
|
||||||
android:text="拒绝显示的字符集:"/>
|
android:text="点击编辑"
|
||||||
|
android:onClick="onCharsetRefuseEditDialog"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textSize="13sp"/>
|
||||||
|
|
||||||
<Button
|
</LinearLayout>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="点击编辑"
|
|
||||||
android:onClick="onCharsetRefuseEditDialog"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="#BBBBBB"
|
||||||
|
android:layout_marginVertical="8dp"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:text="替代字符:"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:layout_marginRight="8dp"/>
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:ems="10"
|
||||||
android:text="替代字符:"/>
|
android:layout_height="40dp"
|
||||||
|
android:id="@+id/activityappsettingsEditText4"
|
||||||
<EditText
|
android:layout_weight="1.0"
|
||||||
android:layout_width="0dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:ems="10"
|
android:background="@android:drawable/edit_text"
|
||||||
android:layout_height="wrap_content"
|
android:textSize="13sp"/>
|
||||||
android:layout_weight="1.0"
|
|
||||||
android:id="@+id/activityappsettingsEditText4"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -98,39 +123,62 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_frame">
|
android:background="@drawable/bg_frame"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:layout_marginBottom="8dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="短信号码国家代码合并设置:"
|
android:text="短信号码国家代码合并设置:"
|
||||||
android:paddingLeft="5dp"/>
|
android:paddingLeft="5dp"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="#999999"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="如+8612345678901与12345678901合并为12345678901."
|
android:text="如+8612345678901与12345678901合并为12345678901."
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textSize="12sp"
|
||||||
android:paddingLeft="5dp"/>
|
android:paddingLeft="5dp"
|
||||||
|
android:layout_marginBottom="10dp"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="#BBBBBB"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical"
|
||||||
|
android:layout_marginLeft="5dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="当前国家代码为:+"/>
|
android:text="当前国家代码为:+"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:layout_weight="1.0"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="40dp"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:id="@+id/activityappsettingsEditText2"/>
|
android:id="@+id/activityappsettingsEditText2"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:background="@android:drawable/edit_text"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:textSize="13sp"/>
|
||||||
|
|
||||||
<Switch
|
<Switch
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -145,38 +193,73 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_frame">
|
android:background="@drawable/bg_frame"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:layout_marginBottom="8dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="TTS 语音设置:"
|
android:text="TTS 语音设置:"
|
||||||
android:paddingLeft="5dp"/>
|
android:paddingLeft="5dp"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="#999999"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/text_ttsplaydelaytimes"
|
android:text="@string/text_ttsplaydelaytimes"
|
||||||
android:layout_weight="1.0"
|
android:layout_weight="1.0"
|
||||||
android:layout_alignParentLeft="true"
|
android:textSize="12sp"
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:paddingLeft="5dp"/>
|
android:paddingLeft="5dp"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="40dp"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:id="@+id/activityappsettingsEditText1"
|
android:id="@+id/activityappsettingsEditText1"
|
||||||
android:layout_alignParentRight="true"
|
android:paddingHorizontal="8dp"
|
||||||
android:layout_centerVertical="true"/>
|
android:background="@android:drawable/edit_text"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="13sp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="#BBBBBB"
|
||||||
|
android:layout_marginVertical="8dp"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="right"
|
||||||
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:text="设置TTS悬浮窗口位置"
|
||||||
|
android:onClick="onTTSFloatSettingsActivity"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textSize="13sp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -186,39 +269,60 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_frame">
|
android:background="@drawable/bg_frame"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:gravity="right">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="应用权限设置 :"
|
android:text="应用权限设置 :"
|
||||||
android:paddingLeft="5dp"/>
|
android:paddingLeft="5dp"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
<LinearLayout
|
<View
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="2dp"
|
||||||
|
android:background="#999999"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="40dp"
|
||||||
android:text="打开系统默认应用设置"
|
android:text="打开系统默认应用设置"
|
||||||
android:onClick="onOpenSystemDefaultAppSettings"/>
|
android:onClick="onOpenSystemDefaultAppSettings"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textSize="13sp"/>
|
||||||
|
|
||||||
<Button
|
<View
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="2dp"
|
||||||
android:text="检查应用权限"
|
android:background="#BBBBBB"
|
||||||
android:onClick="onCheckAndGetAppPermission"/>
|
android:layout_marginVertical="8dp"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="40dp"
|
||||||
android:text="安装TTS语音支持"
|
android:text="检查应用权限"
|
||||||
android:onClick="onAddTTSSupport"/>
|
android:onClick="onCheckAndGetAppPermission"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textSize="13sp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="#BBBBBB"
|
||||||
|
android:layout_marginVertical="8dp"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:text="安装TTS语音支持"
|
||||||
|
android:onClick="onAddTTSSupport"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textSize="13sp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -227,41 +331,32 @@
|
|||||||
android:background="@drawable/bg_frame"
|
android:background="@drawable/bg_frame"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:background="#FFFFFFFF"
|
|
||||||
android:paddingLeft="10dp"
|
|
||||||
android:paddingRight="10dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="》"
|
|
||||||
android:rotation="90"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_frame"
|
android:background="@drawable/bg_frame"
|
||||||
android:paddingLeft="10dp"
|
android:padding="10dp"
|
||||||
android:paddingRight="10dp">
|
android:layout_marginTop="8dp">
|
||||||
|
|
||||||
<cc.winboll.studio.libaes.views.AOHPCTCSeekBar
|
<cc.winboll.studio.libaes.views.AOHPCTCSeekBar
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/activityappsettingsAOHPCTCSeekBar1"/>
|
android:id="@+id/activityappsettingsAOHPCTCSeekBar1"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="#BBBBBB"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#FFC1C1C1">
|
||||||
|
|
||||||
|
<cc.winboll.studio.mymessagemanager.views.DraggableView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
Reference in New Issue
Block a user