2025年6月4日
摘要:
在 `ViewGroup.LayoutParams` 中,**参数的单位取决于具体的属性和设置方式**。以下是常见的单位说明: | 属性/方法 | 单位 | 说明 | | | | | | `width` 和 `height` | 像素(px) | 通常使用 `MATCH_PARENT`、`WRAP_
阅读全文
posted @ 2025-06-04 09:13
小沙盒工作室
阅读(22)
推荐(0)
posted @ 2025-06-04 08:36
小沙盒工作室
阅读(5)
推荐(0)
摘要:
PianoView piano = new PianoView(this); ViewGroup.LayoutParams params = new ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, // 宽度设为匹配父容器 2
阅读全文
posted @ 2025-06-04 08:05
小沙盒工作室
阅读(20)
推荐(0)
2025年6月3日
摘要:
ChannelRack() = default; ✅ 它的正式名称是:默认函数(Defaulted Function) 更具体地,这是 C++11 标准中引入的一个特性,叫做: 🔹 显式默认构造函数(Explicitly Defaulted Constructor) 📘 语法说明 cpp cla
阅读全文
posted @ 2025-06-03 17:05
小沙盒工作室
阅读(29)
推荐(0)
摘要:
// 测试用 动态获取so库的变量和执行so库的函数 extern "C" JNIEXPORT jstring JNICALL Java_com_xsh_opensltest_MyTest_stringFromSoVar(JNIEnv *env, jobject thiz,jstring path)
阅读全文
posted @ 2025-06-03 15:55
小沙盒工作室
阅读(45)
推荐(0)
摘要:
先看一下我们想要实现的效果: 先看一下,下面错误的写法 //界面A的button点击后的代码 public void A(View v) { EditText text=(EditText)findViewById(R.id.text); text.getText().toSting(); } 看着
阅读全文
posted @ 2025-06-03 12:42
小沙盒工作室
阅读(32)
推荐(0)
摘要:
setPositiveButton方法用于设置对话框的积极按钮,通常表示接受或确认操作。这个按钮通常位于对话框的右侧。 setNegativeButton方法用于设置对话框的消极按钮,通常表示取消或拒绝操作。这个按钮通常位于对话框的左侧。 setPosition/Negative/NaturalBu
阅读全文
posted @ 2025-06-03 12:39
小沙盒工作室
阅读(33)
推荐(0)
摘要:
AlertDialog.Builder builder1 = new AlertDialog.Builder(DawActivity.this); builder1.create(); builder1.show()
阅读全文
posted @ 2025-06-03 12:36
小沙盒工作室
阅读(6)
推荐(0)
摘要:
((Button)view).getText().toString();
阅读全文
posted @ 2025-06-03 12:00
小沙盒工作室
阅读(7)
推荐(0)
摘要:
findViewbyId需要放在setContentView后面。不然会报错null public Layout ChannelRack protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstance
阅读全文
posted @ 2025-06-03 11:57
小沙盒工作室
阅读(6)
推荐(0)