Skip to content

日常整理汇总、学习、进阶的一份Android知识速查表,仍在不断完善中。

Notifications You must be signed in to change notification settings

MaosanDao/AndroidNote

Repository files navigation

AndroidNote

996.icu LICENSE

将来的你,一定会感激现在拼命的自己!努力成为自己想要成为的那个人吧!

此项目的目的:

1.记录下一些基础的,以及日常工作、面试中需要的知识点,防止以后自己老年痴呆后忘记了。
2.为了测试自制力,也想要了解下自己到底能不能坚持记录。
3.同时让自己的知识面越来越大,越来越广。努力让自己成为牛逼的人。

目录

已经完善的

需要完善的

开始

开发相关

RxJava相关

Retrofit相关

基础知识

Activity相关

Java基础知识

多线程

界面相关

框架

自定义View

动画

优化

网络

蓝牙

发布

进阶

Android底层知识

Handler相关

常用工具类

WebView

IO

数据库

其他

奇淫技巧

草稿记录

待加

//在Android注册文件中新增以下说明
<!--只要添加下面这句话,可以隐藏应用图标-->
<data android:host="AuthActivity" android:scheme="com.android.example" />
<!-- 上面这句 -->
<category android:name="android.intent.category.LAUNCHER" />
  • 如何做好切换Fragment而不触发生命周期?
//切换方法
 private fun switchContent(to: Fragment) {
        if (mContent !== to) {
            val transaction = supportFragmentManager
                .beginTransaction()
                .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)
            if (!to.isAdded) { // 判断是否被add过
                // 隐藏当前的fragment,将 下一个fragment 添加进去
                transaction.hide(mContent).add(R.id.main_content, to).commit()
            } else {
                // 隐藏当前的fragment,显示下一个fragment
                transaction.hide(mContent).show(to).commit()
            }
            mContent = to
        }
    }

第一个初始化的时候:

supportFragmentManager.beginTransaction().add(R.id.main_content,mKeyFragment).commit()
//mContent为当前的Fragment
mContent = mKeyFragment

切换直接调用switchContent。 其中,只有第一次的时候会触发:initData和onResume。 后面,则只会触发onHiddenChanged方法

特别感谢

说明

  • 以上内容都为整理网络上的一些博主的文章所得,如果有侵权的内容,请联系我,我会尽快进行修改和删除。谢谢!

联系方式

Licenses

 Copyright 2018 vangelis(王裴)

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

About

日常整理汇总、学习、进阶的一份Android知识速查表,仍在不断完善中。

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages