首页 文章 精选 留言 我的

精选列表

搜索[网站开发],共10000篇文章
优秀的个人博客,低调大师

Android开发笔记--Android开发时常用控件(二

MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0 RadioGroup,RadioButton(单选) CheckBox(多选) Toast(像一个遮罩层) 例1,<RadioGroupAndroid:id="@+id/genderGroup" Android:layout_width="wrap_content" Android:layout_height="wrap_content" Android:orientation="vertical"> <RadioButtonAndroid:id="@+id/female" Android:layout_width="wrap_content" Android:layout_height="wrap_content" Android:text="@string/female"/> <RadioButtonAndroid:id="@+id/male" Android:layout_width="wrap_content" Android:layout_height="wrap_content" Android:text="@string/male"/> </RadioGroup> 代码:1.控件对象声明 2.取得对象控件 3.设置监听器(只为RadioGroup注册一个) PublicvoidonCheckedChange(RadioGroupgroup,intcheckedId){ If(femaleButton.getId()==checkedId){ System.out.println("Female"); } Elseif(maleButton.getId()==checkedId){ System.out.println("Male"); } } 4.触发事件 //为RadioGroup设置 RadioGroup.setOnCheckedChangeListener(newRadioGroup.OnCheckedChangeListener()) 例2.<CheckBoxandroid:id="@+id/swim" Android:layout_width="wrap_content" Android:layout_height="wrap_content" Android:text="@string/swim"/> <CheckBoxandroid:id="@+id/run" Android:layout_width="wrap_content" Android:layout_height="wrap_content" Android:text="@string/run"/> <CheckBoxandroid:id="@+id/read" Android:layout_width="wrap_content" Android:layout_height="wrap_content" Android:text="@string/read"/> 代码:1.控件对象声明 2.取得对象控件 3.设置监听器(为每一个CheckBox注册监听器) PublicvoidonCheckedChanged(CompoundButtonbuttonView,booleanisChecked){ If(isChecked){ System.out.println("yes"); } Else{ System.out.println("NO"); } } 4.触发事件 CheckBox.setOnCheckedChangeLinstener(newCompoundButton.onCheckedChangeLinstener(){}) 例3.Toast Toast.makeText(this.class,displaystring,messageTime).show() 本文转自My_King1 51CTO博客,原文链接:http://blog.51cto.com/apprentice/1360574,如需转载请自行联系原作者

优秀的个人博客,低调大师

Windows下React Native开发01 -- Android开发环境搭建

1.安装jdk 推荐将JDK的bin目录加入系统PATH环境变量(自己百度下怎么配置)。 2.安装SDK 直接安装Android Studio 推荐从AndroidDevTools下载。(也可以直接安装 android sdk,这里是直接安装的android tools) 1.下载管理工具 一个是安装的、一个是解压版 2.进入SDKManager,确保以下项目已经安装并更新到最新: Tools/Android SDK Tools (24.3.3) Tools/Android SDK Platform-tools (22) Tools/Android SDK Build-tools (23.0.1)(这个必须版本严格匹配23.0.1) Android 6.0 (API 23)/SDK Platform (1) Extras/Android Support Library(23.0.1) Extras/Android Support Repository 国内有墙,有时候会出现获取失败的情况。 更改host文件 host文件在C:\Windows\System32\drivers\etc目录下,在该文件内添加下面两条。域名解析到对应IP上 203.208.46.146 dl.google.com 203.208.46.146 dl-ssl.google.com 将Android SDK Manage上的https请求改成http请求 然后在更新。。 3.安装c++环境 (node环境需要) 推荐从itellyou下载并安装Visual Studio 2013或2015 如果使用VS2015,你需要在命令行中设置npm config set msvs_version 2015 --global 4.安装Python 从官网下载并安装python 2.7.x(3.x版本不行) 5.安装node/react-native命令行工具 node直接百度,然后到官网上面下载安装。 从官网下载node.js的官方4.1版本或更高版本。 npm install -g react-native-cli 6.安装git,获取项目 自己百度如何安装git

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册