Skip to content

Instantly share code, notes, and snippets.

View pokk's full-sized avatar
🌀

Jieyi pokk

🌀
View GitHub Profile
@pokk
pokk / README.md
Created December 7, 2016 08:31
Activity and Fragment lifecycle.

Introduction

Activity

Activity life cycle normally

onCreate ->
onStart ->
@pokk
pokk / README.md
Last active November 9, 2020 11:14
Kotlin stdlib "let", "run", "apply", "also", "use", "with"

[TOC]

Introduction

There are very good five stdlib operates we can use.

  1. let
  2. run
  3. apply
  4. also
@pokk
pokk / README.md
Last active July 3, 2017 06:12
the using occasions of lateinit and lazy

[TOC]

Introduction

Introduce that we should use the way of occasions of lateinit and lazy simplely.

lateinit

  1. Import external variable or method, that object is built from external constructor. The lifecycle of self doesn't relate with external object.
@pokk
pokk / Context using scenarios.md
Last active February 21, 2017 04:13
Context using scenarios in the common.

[TOC]

Introduction

How to use Context correctly in android.

How many contexts in an application

As following we understood, subclasses of Context are Activity, Service, Application, ...etc.

@pokk
pokk / README.md
Last active December 16, 2016 07:43
The way to do a notification.

Introduction

The way of using android notification.

@pokk
pokk / Storage in Android.md
Created December 16, 2016 14:27
Storage in Android ways

Intrduction

There are five ways for keeping data in Android.

  1. Shared Preferences
  2. Remote Space(Clouding Space)
  3. Internal Storages(Phone)
  4. Exteneral Storages(SD Card)
  5. Database(SQLite)
@pokk
pokk / README.md
Last active March 31, 2017 07:51
Change the tag of select option text.

Introduction

Change the tag of select option text.

Html

<select id="select_page">
 schedule
@pokk
pokk / README.md
Created January 11, 2017 07:09
Set preprocessors

Introduction

Make a preprocessor for convenient to switch code.

Step

1. Click the project
2. Click "TARGETS"
  1. Click "Build Settings"
@pokk
pokk / README.md
Created January 12, 2017 01:37
Set Xcode preprocessors

Introduction

Make a preprocessor for convenient to switch code.

Step

1. Click the project
2. Click "TARGETS"
  1. Click "Build Settings"

Inflater

This method LayoutInflater.inflate is used all the time and useful if you are developing the related of views or animations. I think a junior Android programmer isn't often using it but I believe definitely that a senior engineer use this method every day.

Let's go to main topic. When we create a activity or a fragment or a view, we may add some sub-view into. But sometime succeed, sometimes failed.

problem