Skip to content

Instantly share code, notes, and snippets.

View ybq's full-sized avatar
👨‍💻
I may be slow to respond.

ybq ybq

👨‍💻
I may be slow to respond.
  • Beijing,China
View GitHub Profile
@ybq
ybq / GsonRequest.java
Created December 13, 2013 07:52
GsonRequest.java
public class GsonRequest<T> extends Request<T> {
Listener<T> listener = null;
Class<T> clazz;
Type type;
public GsonRequest(Class<T> clazz, int method, String url,
Listener<T> listener, ErrorListener errorListener) {
super(method, url, errorListener);
this.listener = listener;
@ybq
ybq / Merge.java
Created December 6, 2013 03:30
Exercise <merge /> tag in XML files. Copyright (C) 2007 The Android Open Source Project
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
> db.places.insert({ addresses : [ { name : "Home", loc : [55.5, 42.3] }, { name : "Work", loc :[32.3, 44.2] } ] })> db.places.ensureIndex({ "addresses.loc" : "2d" })
Waiting for device.
Target device: 172.16.80.79:5555
Uploading file
local path: D:\workspace\bingqiangyang-desktop-android-cms-framework\out\production\bingqiangyang-desktop-android-cms-framework\bingqiangyang-desktop-android-cms-framework.apk
remote path: /data/local/tmp/com.joyme.app.android.framework
@ybq
ybq / MainActivity.java
Last active December 25, 2015 06:19
一个简单查找View的工具类 Demo :https://github.com/ybq/View_Finder
import me.abcdef.android.view_finder.View_Finder;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.view.Menu;
import android.widget.TextView;
public class MainActivity extends Activity {
class Finder extends View_Finder {
@ybq
ybq / error
Created September 6, 2013 02:57
上午10:57:17 Throwable
Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
Details: Current thread: Thread[ApplicationImpl pooled thread 18,4,Idea Thread Group] 1843361946
Our dispatch thread:Thread[AWT-EventQueue-1 0.2.0#AI-130.737825, eap:true,6,Idea Thread Group] 954564833
SystemEventQueueThread: Thread[AWT-EventQueue-1 0.2.0#AI-130.737825, eap:true,6,Idea Thread Group] 954564833
@ybq
ybq / time
Created December 4, 2012 05:53
时间
long long ago
@ybq
ybq / ScaleFadePageTransformer.java
Created December 4, 2012 05:49 — forked from jgilfelt/ScaleFadePageTransformer.java
An ICS+ app/widget drawer style PageTransformer for your ViewPager
/***
* Copyright (c) 2012 readyState Software Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.