This file contains hidden or 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
{ | |
"response": { | |
"name": "推荐博客", | |
"more_url": "http://api.eoe.cn//client/blog?k=lists&pageNum=2&t=top", | |
"items": [ | |
{ | |
"id": "3130", | |
"name": "admin", | |
"head_image_url": "http://www.eoeandroid.com/uc_server/avatar.php?uid=1&size=small", | |
"title": "重磅消息!eoe.cn客户端开源啦", |
This file contains hidden or 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
public void PopToast() { | |
// 获取LayoutInflater对象,该对象能把XML文件转换为与之一直的View对象 | |
LayoutInflater inflater = getLayoutInflater(); | |
// 根据指定的布局文件创建一个具有层级关系的View对象 | |
// 第二个参数为View对象的根节点,即LinearLayout的ID | |
View layout = inflater.inflate(R.layout.sort_toast, | |
(ViewGroup) findViewById(R.id.toast_layout_root)); | |
Toast toast = new Toast(this); | |
// 设置Toast的位置 | |
toast.setGravity(Gravity.BOTTOM, 0, 0); |
This file contains hidden or 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 com.tediscript.android; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
public class Settings { | |
public static String PREFS_NAME = "com.tediscript.android.settings"; | |
public static void putString(Context ctx, String key, String value) { |
This file contains hidden or 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 com.xianguo.xreader.utils; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import android.annotation.SuppressLint; | |
public class RelativeTime { | |
private static final long ONE_DAY = 86400000L; |
This file contains hidden or 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
require "open-uri" | |
require "rubygems" | |
require "json" | |
USERNAME = "henrik" | |
query = ARGV.first.downcase | |
gists = JSON.parse(open("http://gist.github.com/api/v1/json/gists/#{USERNAME}").read)['gists'] |
This file contains hidden or 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
/* | |
* Copyright (C) 2008 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 |
This file contains hidden or 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
{ | |
"code": 0, | |
"msg": "OK", | |
"info": { | |
"list": [ | |
{ | |
"appid": "141", | |
"appname": "云存储", | |
"apkname": "mobi.w3studio.android.apps.eyuntv", | |
"Img1": "http://amsfile.tv189.cn:8082/autofs/amsupload/amsupload/images/20130327/13643632896669.png", |
This file contains hidden or 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
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:color="#53c1bd" android:state_selected="true"/> | |
<item android:color="#53c1bd" android:state_focused="true"/> | |
<item android:color="#53c1bd" android:state_pressed="true"/> | |
<item android:color="#777777"/> | |
</selector> | |
/** | |
文字根据状态更改颜色 放在res/color/目录下 android:textColor*/ |
This file contains hidden or 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 cn.ipanel.android.widget; | |
import cn.ipanel.android.Logger; | |
import android.animation.TypeEvaluator; | |
import android.animation.ValueAnimator; | |
import android.annotation.TargetApi; | |
import android.app.Activity; | |
import android.graphics.Rect; | |
import android.os.Build; | |
import android.view.View; |
This file contains hidden or 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.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.OutputStreamWriter; | |
import java.io.UnsupportedEncodingException; |