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

郑州网站建设外包业务通信管理局网站备案

郑州网站建设外包业务,通信管理局网站备案,wordpress标签修改,大连建设主管部门网站1 前言 之前在工作中#xff0c;第一次听到launcher有点蒙圈#xff0c;不知道是啥#xff0c;当时还赶鸭子上架去和客户PK launcher的事。后来才知道其实就是安卓的桌面。本来还以为很复杂#xff0c;毕竟之前接触过windows的桌面#xff0c;那叫一个复杂。。。 后面查了…1 前言 之前在工作中第一次听到launcher有点蒙圈不知道是啥当时还赶鸭子上架去和客户PK launcher的事。后来才知道其实就是安卓的桌面。本来还以为很复杂毕竟之前接触过windows的桌面那叫一个复杂。。。 后面查了一下Android的桌面倒是没那么复杂本质其实就是一个App系统启动之后跑起来的第一个app。 Android Launcher 是一个应用程序用于显示设备的主屏幕并且是启动其他应用的入口。简单来说Launcher 是 Android 设备的“应用启动器”负责管理和展示设备的主屏幕、应用图标、桌面小部件widgets以及应用程序的启动行为。 2 操作步骤 最近搭建了app的环境现在借着之前搭建的环境Android学习20 -- 手搓App2Gradle-CSDN博客试着弄一个launcher。 *   The key to making your app a launcher is to declare the correct intent filter in your AndroidManifest.xml file. This tells the Android system that your app is capable of acting as a launcher. *   Heres how your AndroidManifest.xml should look (specifically the activity tag for your 所以修改之后的AndroidManifest.xml是这样。 manifest xmlns:androidhttp://schemas.android.com/apk/res/androidpackagecom.example.simpleappapplicationandroid:allowBackuptrueandroid:iconmipmap/ic_launcherandroid:labelSimpleAppandroid:themestyle/Theme.AppCompat.DayNightactivityandroid:name.MainActivityandroid:labelSimpleAppintent-filteraction android:nameandroid.intent.action.MAIN /category android:nameandroid.intent.category.LAUNCHER /category android:nameandroid.intent.category.HOME /category android:nameandroid.intent.category.DEFAULT //intent-filter/activity/application /manifest 最核心的就是在intent filter里面的配置重点就是这几行。 category android:nameandroid.intent.category.LAUNCHER /                 category android:nameandroid.intent.category.HOME /                 category android:nameandroid.intent.category.DEFAULT / * **Explanation:** * action android:nameandroid.intent.action.MAIN /: This is the standard action for the main entry point of an app. * category android:nameandroid.intent.category.LAUNCHER /: This category indicates that this activity should be listed in the app launcher (the list of apps). * category android:nameandroid.intent.category.HOME /: This is the crucial category that tells the system this activity can act as a home screen replacement. * category android:nameandroid.intent.category.DEFAULT /: This category is often used with HOME to ensure your app is considered a valid home screen option. *  MainActivity.java。主界面上面就是一个按钮点了之后会启动一个浏览器。 package com.example.simpleapp;import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.widget.Button; import androidx.appcompat.app.AppCompatActivity;public class MainActivity extends AppCompatActivity {Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);// 获取按钮控件Button openBrowserButton findViewById(R.id.openBrowserButton);// 设置按钮点击事件openBrowserButton.setOnClickListener(new View.OnClickListener() {Overridepublic void onClick(View v) {// 启动浏览器Intent browserIntent new Intent(Intent.ACTION_VIEW, Uri.parse(https://www.google.com));startActivity(browserIntent);}});} } 这里就实现了前面说的启动应用程序的功能就是通过startActivity(browserIntent); 之后要指定布局也就是res/layout/activity_main.xml ?xml version1.0 encodingutf-8? LinearLayout xmlns:androidhttp://schemas.android.com/apk/res/androidandroid:layout_widthmatch_parentandroid:layout_heightmatch_parentandroid:orientationverticalandroid:gravitycenter!-- 启动浏览器按钮 --Buttonandroid:idid/openBrowserButtonandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:textOpen Browser / /LinearLayout编译用之前调好的就行。 gradle wrapper gradlew assembleDebug 编译的时候会报错说mipmapdrawable找不到。 可以去Android Studio创建好的工程里面拷贝过来。完了大概是这样的。里面也就是一堆xml。 之后就可以顺利编过安装也比较简单。直接运行就是这样 3 未能最终完成。。 但是有一点很遗憾在荣耀的平板里面这个是叫做桌面。自己做的这个launcher怎么都没法设置进去。除了默认的华为桌面找不到可以设置的地方。 查了一下有可能是我的设置还有点问题但是大概率还是华为的平板把这部分的权限给关了。估计只有以后找一个干净的AOSP再试试了。。。
http://www.hkea.cn/news/14557723/

相关文章:

  • 沧州市网站建设电话wordpress网站破解
  • 贸易公司 网站 扶持网站备案必须要幕布吗
  • 高端建站收费标准邢台贴吧最新消息
  • dede网站版权信息标签网站开发人才培养目标
  • 广告图片网站源码wordpress调用描述
  • 做羞羞的事的视频网站如何创建一个
  • 浦口区网站建设质量推荐黄埔网站建设价格
  • 组织部建设网站示范材料wordpress如何采集器
  • 开发网站做什么奉新网站建设
  • 找网络公司做网站要注意这4个细节网站出错咨询电话
  • 网站首页设计教程php网站cms
  • 找外包公司做个网站多少钱阳泉营销型网站建设费用
  • 温州网站的优化响应式商品展示的网站源码
  • 免费注册建网站做外贸女装有哪些网站
  • 网站开发实验总结网页设计模板网站图片
  • 好的做网站的公司有哪些wordpress文章显示颜色
  • 多语言外贸网站做彩票网站代理赚钱吗
  • 创业做网站需要哪些长春网络优化最好的公司
  • 手机网站案例 鸿做软件界面一般用什么软件
  • 公司支付网站建设费进什么费用中学生网站制作
  • 泰州网站建设费用php宠物用品公司网站源码
  • 用dw做网站怎么做出下拉菜单seoul什么意思
  • 东营企业网站排名优化如何自己动手做网站
  • 网站色彩心理给网站做网络安全的报价
  • 怎样才能建网站wordpress插件汉化
  • 网站设计是后台做的还是前台做的英语ppt模板免费下载 素材
  • 如何了解和掌握一个网站的权重连锁销售网站制作
  • 做个网站多少费用微信手机网站app制作
  • 网站备案组织机构代码做网站里面的图片像素要求
  • 手机触屏网站幻灯片建筑网络教育