This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StackNavigator } from 'react-navigation' | |
import CardStackStyleInterpolator from 'react-navigation/src/views/CardStackStyleInterpolator' | |
import Home from './scenes/Home' | |
import Page from './scenes/Page' | |
const Navigator = StackNavigator({ | |
Home: { screen: Home }, | |
Page: { screen: Page }, | |
}, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LayoutInflaterCompat.setFactory(LayoutInflater.from(this), new LayoutInflaterFactory() { | |
@Override | |
public View onCreateView(View parent, String name, Context context, AttributeSet attrs) { | |
AppCompatDelegate delegate = getDelegate(); | |
View view = delegate.createView(parent, name, context, attrs); | |
if (view != null && (view instanceof TextView)) { | |
((TextView) view).setTextColor(getResources().getColor(R.color.primary)); | |
} | |
return view; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent.ConcurrentLinkedQueue; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
/** | |
* Internal utility class to keep track of process-global work that's | |
* outstanding and hasn't been finished yet. | |
* | |
* This was created for writing SharedPreference edits out | |
* asynchronously so we'd have a mechanism to wait for the writes in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
interactive = auto | |
ui = auto | |
[alias] | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
ld = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph | |
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Inflate a new view hierarchy from the specified XML node. Throws | |
* {@link InflateException} if there is an error. | |
* <p> | |
* <em><strong>Important</strong></em> For performance | |
* reasons, view inflation relies heavily on pre-processing of XML files | |
* that is done at build time. Therefore, it is not currently possible to | |
* use LayoutInflater with an XmlPullParser over a plain XML file at runtime. | |
* | |
* @param parser XML dom node containing the description of the view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.bxbxbai.android.examples.utils; | |
import android.os.SystemClock; | |
import android.util.Log; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
/** | |
* Android应用中的秒表工具,跟踪某一段代码的执行时间<br/> |