Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

学习笔记,不断更新 #1

Open
solocao opened this issue Jun 25, 2018 · 0 comments
Open

学习笔记,不断更新 #1

solocao opened this issue Jun 25, 2018 · 0 comments

Comments

@solocao
Copy link
Owner

solocao commented Jun 25, 2018

  • AppCompatActivity 修改为Activity

  • 我创建了一个文件夹,名字叫做drawable-hdpi 但是引用的时候,使用的是@drawable

  • 图片标签

    ImageView

  • 还有一种布局叫做RelativeLayout

  • 开始布局总入口是AndroidManifest.xml

  • 一张图片在屏幕中居中

    android:layout_centerInParent="true"

  • 修改全部配置参数的地方

    main/res/values/string.xml

  • 修改启动的APP图标

    在AndroidMainifest.xml中修改android:icon

  • 给view添加id

    android:id="@+id/rl_splash_root"
    

然后获取到它(实例化)

private RelativeLayout rl_splash_root;

rl_splash_root =  (RelativeLayout) findViewById(R.id.rl_splash_root);

快捷键fbc

  • 动画的完成

  • 新建了一个类,实现了一个接口,然后需要快速导入接口要实现的方法

    alt + enter option + enter

  • /** + enter 可以对一个方法或者类增加注视说明

  • 缓存工具类

  • 抽取成员变量 option + cmd + c

  • 引入的快捷键是 option+enter

  • 数据类型 Context

  • 保存参数的数据类型

    SharedPreference

  • 启动页面类

    Intent intent = new Intent(SplashActivity.this,GuideActivity.this)

    startActivity(intent)

    intent机制讲解

    https://www.cnblogs.com/X-knight/p/5438042.html

  • layout 中使用ViewPager

  • ViewPager填充窗体

  • Button组建就直接

  • 文本 android:text

  • 复制代码 ctrl + 下

  • Button 的 background 还可以是xml,先写名字,然后 option + enter

  • 线性布局 LinearLayout

    android:layout_width="wrap_content"  //包裹
    android:orientation="horizontal"     //水平方向
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant