Skip to content

Instantly share code, notes, and snippets.

View Reacoder's full-sized avatar

赵小龙_同学 Reacoder

  • shanghai china
View GitHub Profile
@Reacoder
Reacoder / gitignore
Created September 2, 2014 08:35
make gitignore work.
Even if you haven't tracked the files so far, git seems to be able to "know" about them even after you add them to .gitignore.
A quick fix that I've used was to run the following commands from the top folder of your git repo:
(edited)
git rm -r --cached .
Followed by:
git add .
and
@Reacoder
Reacoder / focus
Created September 4, 2014 04:22
edittext 取消focus
For the EditText's parent view, let the following 3 attributes be "true":
clickable, focusable, focusableOnTouch.
If a view want to receive focus, it must satisfy these 3 conditions.
See android.view :
@Reacoder
Reacoder / theme
Created September 28, 2014 10:43
theme path for android studio.
/Users/samzhao/Library/Preferences/AndroidStudioBeta/colors
@Reacoder
Reacoder / TextWithUnit.java
Created October 13, 2014 15:55
TextWithUnit , upper right corner.
package com.example.zhaosam.textviewtest;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.widget.TextView;