ICode9

精准搜索请尝试: 精确搜索
  • 安卓(Android)期末课程设计2022-06-18 19:32:13

        Android程序设计课程设计单 学号   姓名   性别   指导教师                  项目名称 Android 项目描述 方便查询某地的天气情况,便于外出时提前做好规划。 项目评语       分项成绩 平时成绩 实

  • 进度条学习2022-05-06 15:33:33

    activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wra

  • SurfaceView Attempt to invoke virtual method ‘void com.example.chartactivity.SurfaceViewL.sendData(2022-02-27 16:04:37

    使用SurfaceView画图. 一直闪退,一直闪退 软件有时候有不把原因告诉我,然后一直高这个东西搞了很久很久,最后有一次发现他说执行的这个SurfaceViewL是一个null object,然后我去网上找了一下,发现硕士没有找到布局当中的这个控件,但是我明明是由findViewById的呀,等我仔细一看,真

  • 【Android】16,2020-2021蚂蚁金服Android面试真题解析2022-02-03 19:02:33

    running = true; new Thread(new Runnable() { @Override public void run() { while (running) { String str = info +"…"; System.out.println(str); try { sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } } }).start(); } @Override

  • Kotlin控件变量自动映射功能-告别findViewById()方法2022-02-03 14:00:53

    只需要在build.gradle(:app)中plugins{...}中添加如下一句即可: id 'kotlin-android-extensions' 我的demo的gradle文件: plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-android-extensions' } 或者使用另一种写法: apply

  • 使提示框居中显示2022-02-01 22:32:43

    ToastActivity.java文件: 1 public class ToastActivity extends AppCompatActivity { 2 private Button mbtnToast1,mbtnToast2,mbtnToast3; 3 @Override 4 protected void onCreate(Bundle savedInstanceState) { 5 super.onCreate(savedInstanceSt

  • 单选框弹出提示框2022-01-12 12:31:59

    1 private RadioGroup mrg1; 2 @Override 3 protected void onCreate(Bundle savedInstanceState) { 4 super.onCreate(savedInstanceState); 5 setContentView(R.layout.activity_radio_button); 6 mrg1=findViewById(R.id.rg_1); 7

  • kotlin-android-extension被废弃的原因及viewbinding的优越性2021-11-27 12:33:54

    kotlin-android-extensions插件可能算得上是我最喜欢的一个Kotlin在Android上的特性了。 这么说并不夸张,因为以前在使用Java开发Android程序时,我们总是要写一大堆的findViewById,枯燥又没什么意义。 虽然也有一些诸如ButterKnife之类的第三方库,专门用于对findViewById的用法进行

  • 安卓底部导航栏2021-11-04 20:05:03

    FrameLayout+碎片实现底部导航 一、效果展示(若觉得画面太大,可单击后观看) 二、底部导航栏布局 1、 新建bottom.xml文件 2、设置布局: 3、代码: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:too

  • android 单选按钮、复选按钮的使用2021-10-31 15:04:47

    一、单选按钮 相互排斥的事件使用该控件,一组相互互斥的事件放到一个组内,及RadioGroup。 <RadioGroup android:id="@+id/radiogroup_text" android:layout_width="match_parent" android:layout_height="wrap_content"> <RadioBut

  • 安卓第10周2021-10-24 22:02:35

    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.a

  • 报错:Attempt to invoke virtual method ‘android.view.View android.widget.EditText.findViewById(int)‘2021-10-23 12:04:58

    报错:Attempt to invoke virtual method ‘android.view.View android.widget.EditText.findViewById(int)’ 一个非常无语的错: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.widget.EditText.findViewById(in

  • 随笔2021-10-14 01:01:46

    界面一:        XML: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools=&qu

  • 安卓7~82021-10-10 20:01:33

    1.三个界面,界面1点击按钮使用显式意图开启界面2.界面2点击按钮隐式意图开启界面3 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto

  • 基于Android的微信主界面2021-10-09 23:33:34

    实现APP门户界面框架设计 门户界面要求:根据课程实操实现APP门户界面框架设计,至少包含4个tab页,能实现tab页之间的点击切换; 主要步骤 一、设计一个自己喜欢的布局 在设计自己最想要的界面布局之前先要考虑好准备使用哪些布局控件,这里我们可以参考微信里面的实际主题布局,我很喜

  • ASTEST:实现微信界面设计2021-10-09 17:59:07

    Android Studio实现类微信界面设计实现步骤: 1.上方栏有标题(居中) 2.中间显示内容,内容随下方栏的选择而切换 3.下方栏分成四个小板块可点击切换 xml文件: top.xml 界面上方栏标题。 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/

  • 第七周作品2021-10-09 13:00:57

    1.三个界面,界面1点击按钮使用显式意图开启界面2.界面2点击按钮隐式意图开启界面3 2.在界面1做一个按钮开启浏览器访问百度 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_w

  • 安卓第7周2021-10-07 23:01:39

    1. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"

  • 安卓第七周2021-10-07 18:02:01

    1.三个界面,界面1点击按钮使用显式意图开启界面2.界面2点击按钮隐式意图开启界面3 2.在界面1做一个按钮开启浏览器访问百度 package com.example.app6; import android.os.Bundle; import android.app.Activity; import android.view.Menu; public class Activity3 extends Acti

  • 组件2021-09-29 15:03:57

    import android.widget.EditText import android.widget.Button //获取组件 var nianji_btn_btn = findViewById<Button>(R.id.nianji_btn); var editText_txt = findViewById<EditText>(R.id.textView2); //按钮点击事件 nianji_btn_btn.setOnClickListener {

  • Android UI控件详解-EditText(编辑框)2021-09-11 14:59:21

    package com.bdqn.edittext; import android.os.Bundle; import android.app.Activity; import android.view.KeyEvent; import android.view.View; import android.view.View.OnKeyListener; import android.widget.EditText; import android.widget.TextView; /** *

  • Android 文字过多时,可滑动2021-09-03 15:58:24

    滚动条 :在Textview里面加一句 :android:scrollbars=“vertical” <TextView android:id="@+id/text" android:text="8号" android:layout_width="200dp" android:layout_height="200dp&

  • 在Fragment中使用findViewById方法2021-07-25 11:02:15

    View view = null; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = inflater.inflate(R.layout.fragment, null); return view; } //方法1:在 onCraeteView中,将 inflater 填充视图后返回

  • JAVA日报2021-06-20 10:32:59

    从零开始的体温app开发(点击事件) findViewById(R.id.btn).setOnClickListener(this);findViewById(R.id.btn2).setOnClickListener(this);findViewById(R.id.btn3).setOnClickListener(this);findViewById(R.id.btn4).setOnClickListener(this);findViewById(R.id.btn5).setOnClick

  • butterknife----黄油刀2021-06-16 20:54:51

    Butter Knife,专门为Android View设计的绑定注解,专业解决各种findViewById。 简单使用: 添加依赖: Download dependencies { compile 'com.jakewharton:butterknife:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' } 我们平常写

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有