Skip to content

Instantly share code, notes, and snippets.

Zhao Yuanjie qq157755587

Block or report user

Report or block qq157755587

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@qq157755587
qq157755587 / BaseActivity.kt
Created Dec 31, 2015
RxJava实现的EventBus
View BaseActivity.kt
open class BaseActivity: AppCompatActivity() {
private val subscriptions = CompositeSubscription()
override fun onStart() {
super.onStart()
subscriptions.add(RxBus.toObserverable()
.observeOn(AndroidSchedulers.mainThread())
.subscribe { onRxBusEvent(it)})
subscriptions.add(RxBus.toStickyObserverable()
@qq157755587
qq157755587 / android_convert_text_to_curves.java
Last active Oct 9, 2017
If you are going to generate PDF file, some printer dont' support embeded font. Your only choice is to convert text to curves.
View android_convert_text_to_curves.java
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PathMeasure;
import com.google.common.primitives.Floats;
import java.util.ArrayList;
import java.util.List;
@qq157755587
qq157755587 / permission.xml
Last active Aug 29, 2015
各sdk需要的permission
View permission.xml
<!--新浪微博sdk-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--腾讯地图定位sdk-->
<!-- 通过GPS得到精确位置 -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- 通过网络得到粗略位置 -->
You can’t perform that action at this time.