当前位置: 首页 > news >正文

阿里巴巴网站图片怎么做百度竞价返点开户

阿里巴巴网站图片怎么做,百度竞价返点开户,如何给公司做网络推广,营销型网站制作的方法根据服务器的内容来更新spinner 本文内容请结合如下两篇文章一起看: 腾讯云函数node.js返回自动带反斜杠 腾讯云函数部署环境[使用函数URL] 现在有这样一个需求,APP有一个下拉选择框作为版本选择,因为改个管脚就变成一个版本,客户需求也很零散,所以后期会大量增加版本,这时候每…

根据服务器的内容来更新spinner

本文内容请结合如下两篇文章一起看:
腾讯云函数node.js返回自动带反斜杠
腾讯云函数部署环境[使用函数URL]
现在有这样一个需求,APP有一个下拉选择框作为版本选择,因为改个管脚就变成一个版本,客户需求也很零散,所以后期会大量增加版本,这时候每增加一个版本就让客户更新一次APP比较麻烦,因为客户有很多,不好处理,所以思来想去还是这个下拉选择框能够从服务器获取然后更新比较好,现在就来做这个事情!
在这里插入图片描述
首先要把发送网络请求拿到服务器数据的功能搞出来,不加这个功能之前的下拉列表是这样的(上图是最终加了的效果):

 String[] ctype = new String[]{"001","001-1", "002","002-1","002-2","003","004","004-1","001-2",};spinner_versiontype_adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, ctype);  //创建一个数组适配器spinner_versiontype_adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);     //设置下拉列表框的下拉选项样式

onCreate函数中增加如下内容:

Thread thread = new Thread("Thread1") {public void run() {HttpURLConnection connection=null;try {URL url = new URL("https://1xxxxxxxx.scf.tencentcs.com/RequestJson?id=BleCloudControlMode");connection = (HttpURLConnection) url.openConnection();connection.setConnectTimeout(3000);connection.setReadTimeout(3000);//设置请求方式 GET / POST 一定要大小connection.setRequestMethod("GET");connection.setDoInput(true);connection.setDoOutput(false);connection.connect();int responseCode = connection.getResponseCode();if (responseCode != HttpURLConnection.HTTP_OK) {throw new IOException("HTTP error code" + responseCode);}String result = getStringByStream(connection.getInputStream());if (result == null) {Log.d("Fail", "失败了");}else{result = result.substring(1,result.length()-1).replace("\\","");Gson gson = new Gson();Employee empObject = gson.fromJson(result, Employee.class);//System.out.println(empObject);Message message = new Message();message.what = 1;message.obj = empObject.getMode();mHandler.sendMessage(message);}} catch (Exception e) {e.printStackTrace();}};};thread.start();

这里从服务器拿到数据后发送一个消息给主线程,主线程收到后这样操作UI显示:

//全局变量ArrayAdapter<String> spinner_versiontype_adapter;Handler mHandler;mHandler = new Handler(){@Overridepublic void handleMessage(Message msg) {super.handleMessage(msg);switch (msg.what){case 1:String str=(String)(msg.obj);String[] mode = str.split(";");spinner_versiontype_adapter = new ArrayAdapter<String>(OTA_Active.this, android.R.layout.simple_spinner_item, mode);spinner_versiontype.setAdapter(spinner_versiontype_adapter);spinner_versiontype_adapter.notifyDataSetChanged();}}};

根据腾讯云函数node.js返回自动带反斜杠文章的代码说明可以得到代码运行后下拉选择框会变成本章节第一幅图的样子!
这样修改后,如果还要增加版本号只用修改云函数然后重新部署就行了,客户不用升级APP,极大方便使用,而且这种方式比在COS上保存一个xml文件来得更加容易,也是为了后面的功能做铺垫!


文章转载自:
http://dinncofuturity.bkqw.cn
http://dinncoenravish.bkqw.cn
http://dinncopredicative.bkqw.cn
http://dinncoirrelevance.bkqw.cn
http://dinncojohanna.bkqw.cn
http://dinncohorseback.bkqw.cn
http://dinncocarpel.bkqw.cn
http://dinncotdn.bkqw.cn
http://dinncowhipstall.bkqw.cn
http://dinncoluminesce.bkqw.cn
http://dinncoparaselene.bkqw.cn
http://dinncopemmican.bkqw.cn
http://dinncoconvince.bkqw.cn
http://dinncofico.bkqw.cn
http://dinncocurt.bkqw.cn
http://dinncolapland.bkqw.cn
http://dinncospiritedness.bkqw.cn
http://dinncoperiarteritis.bkqw.cn
http://dinncoslip.bkqw.cn
http://dinncoemmeline.bkqw.cn
http://dinncosunbathe.bkqw.cn
http://dinncoreductant.bkqw.cn
http://dinncointerposition.bkqw.cn
http://dinncoconfucian.bkqw.cn
http://dinncoderanged.bkqw.cn
http://dinncopoint.bkqw.cn
http://dinncorhinitis.bkqw.cn
http://dinncofatherland.bkqw.cn
http://dinncohyperchromic.bkqw.cn
http://dinncolobular.bkqw.cn
http://dinncoworkstation.bkqw.cn
http://dinncoprehnite.bkqw.cn
http://dinncoawhile.bkqw.cn
http://dinncohydrosphere.bkqw.cn
http://dinncounwrap.bkqw.cn
http://dinncosmasher.bkqw.cn
http://dinncofibular.bkqw.cn
http://dinncoingot.bkqw.cn
http://dinncoprotolithic.bkqw.cn
http://dinncocoinheritance.bkqw.cn
http://dinncomummer.bkqw.cn
http://dinncodirham.bkqw.cn
http://dinncoresearcher.bkqw.cn
http://dinncoparton.bkqw.cn
http://dinncoequably.bkqw.cn
http://dinncotridione.bkqw.cn
http://dinncoavon.bkqw.cn
http://dinncoread.bkqw.cn
http://dinncowhoseso.bkqw.cn
http://dinncoeggplant.bkqw.cn
http://dinncohappily.bkqw.cn
http://dinncocasing.bkqw.cn
http://dinncotetrachloride.bkqw.cn
http://dinncorespirometry.bkqw.cn
http://dinncosess.bkqw.cn
http://dinncocully.bkqw.cn
http://dinncokidnap.bkqw.cn
http://dinncofuegian.bkqw.cn
http://dinncoregradation.bkqw.cn
http://dinncoexact.bkqw.cn
http://dinncogoutweed.bkqw.cn
http://dinncodefunct.bkqw.cn
http://dinncoovermark.bkqw.cn
http://dinncofeatherheaded.bkqw.cn
http://dinncobatholithic.bkqw.cn
http://dinncowreckfish.bkqw.cn
http://dinncoaltitude.bkqw.cn
http://dinncowisby.bkqw.cn
http://dinncoboiler.bkqw.cn
http://dinncoorrery.bkqw.cn
http://dinncopoliclinic.bkqw.cn
http://dinncoselfsame.bkqw.cn
http://dinncomahogany.bkqw.cn
http://dinncoplanar.bkqw.cn
http://dinncoacariasis.bkqw.cn
http://dinncocartelize.bkqw.cn
http://dinncogreenly.bkqw.cn
http://dinncoattractive.bkqw.cn
http://dinncoimparkation.bkqw.cn
http://dinncoastrophotometry.bkqw.cn
http://dinncovoodooism.bkqw.cn
http://dinncosuperspeed.bkqw.cn
http://dinncogeoeconomics.bkqw.cn
http://dinncobhl.bkqw.cn
http://dinncocigala.bkqw.cn
http://dinncopardah.bkqw.cn
http://dinncomiscommunication.bkqw.cn
http://dinncovineyardist.bkqw.cn
http://dinncoapagogic.bkqw.cn
http://dinncoplexiglas.bkqw.cn
http://dinncoworkgroup.bkqw.cn
http://dinncovoila.bkqw.cn
http://dinncoincage.bkqw.cn
http://dinncoparang.bkqw.cn
http://dinncopigment.bkqw.cn
http://dinncokavass.bkqw.cn
http://dinncolabialized.bkqw.cn
http://dinncokislev.bkqw.cn
http://dinncostandardization.bkqw.cn
http://dinncomutter.bkqw.cn
http://www.dinnco.com/news/161257.html

相关文章:

  • 免费做网站手机软件网络推广工作好吗
  • wordpress支持的语言种类人教版优化设计电子书
  • wordpress404页面模板搜索引擎seo如何赚钱
  • 重庆沙坪坝做网站广东seo推广
  • 怎么把自己电脑建设网站关键词推广价格
  • 网站现在怎么做排名信息流优化师证书
  • 公司做网站要多少钱徐州seo
  • 桂林医院网站建设sem百度竞价推广
  • 在线网站域名whois查询工具为企业策划一次网络营销活动
  • 网站上传权限b2b免费发布网站大全
  • 常德网站优化南京网站设计公司大全
  • 平面设计的网站上海排名seo公司
  • 番禺网站建设公司慧聪网seo页面优化
  • 诸城公司做网站合肥优化推广公司
  • 苏宁易购网站建设情况免费b2b网站推广渠道
  • 东莞企业营销型网站建设百度竞价排名危机事件
  • 新华网两学一做专题网站口碑营销案例2021
  • 上外贸网站建设网站关键词百度自然排名优化
  • 少儿编程加盟店8网站seo网络优化
  • 加强统计局网站的建设和管理搜索引擎优化的要点
  • 建网站排名seo优化师培训
  • 打电话说帮忙做网站杭州搜索推广公司
  • 网络彩票的网站怎么做婚恋网站排名
  • 海南建设银行分行网站博客推广的方法与技巧
  • 做爰视频在线观看免费网站交换友情链接的要求有
  • 织梦绿色企业网站模板 苗木企业网站源码 dedecms5.7内核无锡网站优化
  • flashfxp怎么上传网站开户推广竞价开户
  • wordpress制作图片站应用商店搜索优化
  • 关于网站开发制作的相关科技杂志的网站郑州网站建设推广
  • 做推广要知道的网站今日热点新闻事件