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 January 26, 2017 09:47
from InputStream to File.

Introduction

We're able to get a Uri from Camera, Gallery, Video Camera Intent. We will obtain a Uri from the intent then you can use it to get a temp File.

@pokk
pokk / README.md
Last active April 5, 2017 02:31
delay search for searchTextView

Introduction

Search data from inputing text.

Talk is cheap. Show me the code.

I have two ways to archive it, as below.

  • RxKotlin

Introduction

Customize View by yourself, you must inherit View class. For the View class, it must run this three methods in flow. Brief describe as below

  1. onMeasure(): Set the layout size.
  2. onLayout(): Set the layout position.
  3. onDraw(): Draw the layout content.

Before the flow, I will explain a little the constructor of View or ViewGroup. Normally, there are three constructor we need to override.

@pokk
pokk / README.md
Created January 13, 2017 07:51
using kotlin language in new instance.

Introduction

New a fragment instance in Kotlin style.

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

@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"
@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
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 / 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 December 16, 2016 07:43
The way to do a notification.

Introduction

The way of using android notification.