上一页 1 ··· 9 10 11 12 13
摘要: 1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 android:layout_width="match_parent" 3 android:layout_height="match_pare 阅读全文
posted @ 2022-01-12 14:01 KongLong_cm 阅读(156) 评论(0) 推荐(0)
摘要: 1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 android:layout_width="match_parent" 3 android:layout_height="match_pare 阅读全文
posted @ 2022-01-12 12:23 KongLong_cm 阅读(90) 评论(0) 推荐(0)
摘要: 1 private RadioGroup mrg1; 2 @Override 3 protected void onCreate(Bundle savedInstanceState) { 4 super.onCreate(savedInstanceState); 5 setContentView(R 阅读全文
posted @ 2022-01-12 12:21 KongLong_cm 阅读(115) 评论(0) 推荐(0)
摘要: 1 package com.example.first; 2 3 import androidx.appcompat.app.AppCompatActivity; 4 5 import android.content.Intent; 6 import android.os.Bundle; 7 imp 阅读全文
posted @ 2022-01-12 12:19 KongLong_cm 阅读(104) 评论(0) 推荐(0)
摘要: 登录页面的账号和密码需要用edittext写 1 <EditText 2 android:id="@+id/et_1" 3 android:layout_width="match_parent" 4 android:layout_height="50dp" 5 android:textSize="2 阅读全文
posted @ 2022-01-07 22:43 KongLong_cm 阅读(369) 评论(0) 推荐(0)
摘要: 按钮点击出现提示框,需在xml对应的Java文件中定义方法,例如: 1 public class ButtonActivity3 extends AppCompatActivity { 2 3 @Override 4 protected void onCreate(Bundle savedInsta 阅读全文
posted @ 2022-01-07 12:24 KongLong_cm 阅读(578) 评论(0) 推荐(0)
摘要: 需要在drawable下建立xml文件,内容如下: 1 <selector xmlns:android="http://schemas.android.com/apk/res/android"> 2 <!--设置在按压时的效果--> 3 <item 4 android:state_pressed=" 阅读全文
posted @ 2022-01-07 12:01 KongLong_cm 阅读(210) 评论(0) 推荐(0)
摘要: 设置按钮的样式在drawable下建立xml文件,例如: 1 <shape xmlns:android="http://schemas.android.com/apk/res/android" 2 android:shape="rectangle"><!--形状为长方形--> 3 <!--填充颜色- 阅读全文
posted @ 2022-01-07 11:38 KongLong_cm 阅读(83) 评论(0) 推荐(0)
摘要: 在页面中的代码: 1 <Button 2 android:id="@+id/btn_2" 3 android:layout_width="match_parent" 4 android:layout_height="50dp" 5 android:text="按钮2号" 6 android:text 阅读全文
posted @ 2022-01-07 11:10 KongLong_cm 阅读(530) 评论(0) 推荐(0)
摘要: 按钮点击跳转页面:(在java文件里写) 1 public class MainActivity extends AppCompatActivity { 2 3 private Button mbtnTextView; 4 5 @Override 6 protected void onCreate( 阅读全文
posted @ 2022-01-06 22:42 KongLong_cm 阅读(85) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13