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
/** 注册外接设别插拔的广播*/ | |
IntentFilter localIntentFilter = new IntentFilter(); | |
localIntentFilter.addAction("android.intent.action.MEDIA_UNMOUNTED"); | |
localIntentFilter.addAction("android.intent.action.MEDIA_MOUNTED"); | |
localIntentFilter.addAction("android.intent.action.MEDIA_REMOVED"); | |
localIntentFilter.addAction("android.intent.action.MEDIA_BAD_REMOVAL"); | |
localIntentFilter.addDataScheme("file"); | |
registerReceiver(this.mReceiver, localIntentFilter); | |
/** Stirng 中空格的写法 */ |
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
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:drawable="@drawable/detail_favorites_focus" android:state_focused="true"/> | |
<item android:drawable="@drawable/detail_favorites_unfocus" android:state_focused="false"/> | |
</selector> |
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
{ | |
"statuses": [ | |
{ | |
"created_at": "Thu May 15 13:51:34 +0800 2014", | |
"id": 3710489487555905, | |
"mid": "3710489487555905", | |
"idstr": "3710489487555905", | |
"text": "测试一张图片", | |
"source": "<a href=\"http://app.weibo.com/t/feed/6ghA0p\" rel=\"nofollow\">搜狗高速浏览器</a>", | |
"favorited": false, |
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
<?xml version="1.0" encoding="GBK"?> | |
<Channels totalResults="4" restartAtToken="0" timeShiftURL=""> | |
<Channel channelID="817447" channelCode="10001010-00000000000000000000345" channelName="CCTV-7" channelNumber="0" | |
logo="" isStartOver="1" isNPVR="0" isStandardChannel="1" | |
isTVAnyTime="1" npvrOrderFlag="0" tVAnyTimeOrderFlag="0" startOverOrderFlag="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
public class AlphaImageFetchTask extends BaseImageFetchTask { | |
public AlphaImageFetchTask(String url, int targetWidth, int targetHeight) { | |
super(url, targetWidth, targetHeight); | |
} | |
public AlphaImageFetchTask(String url, int targetWidth, int targetHeight, String key) { | |
super(url, targetWidth, targetHeight, key); | |
} | |
@Override | |
public void setDrawable(View view, Drawable drawable) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<message module="CATALOG_SERVICE" version="1.0"> | |
<header action="RESPONSE" command="CONTENT_QUERY" sequence="" component-id="portal52" component-type="CATALOG_SERVER" /> | |
<body> | |
<result code="1" description="ok" /> | |
<contents> | |
<content> | |
<name><![CDATA[快乐大本营]]></name> | |
<code><![CDATA[jxgd-000000000000000000000000211]]></code> | |
<type><![CDATA[10]]></type> |
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 android.content.res.Resources; | |
import android.graphics.Bitmap; | |
import android.graphics.NinePatch; | |
import android.graphics.Rect; | |
import android.graphics.drawable.NinePatchDrawable; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
/** |
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 HashMap<String, List<MusicInfo>> scanDirectory(File path, HashMap<String, List<MusicInfo>> musicHashMap) { | |
if (musicHashMap == null) { | |
musicHashMap = new HashMap<String, List<MusicInfo>>(); | |
} | |
if (path.exists()) { | |
File[] files = path.listFiles(); | |
if (files == null) { | |
return null; | |
} | |
for (int i = 0; i < files.length; i++) { |
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.example.app; | |
import java.io.File; | |
import android.media.MediaScannerConnection; | |
import android.media.MediaScannerConnection.MediaScannerConnectionClient; | |
import android.net.Uri; | |
import android.util.Log; | |
public class MyMediaScannerConnectionClient implements MediaScannerConnectionClient { |
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
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:singleLine="true" | |
android:scrollHorizontally="true" | |
android:ellipsize="marquee" | |
android:marqueeRepeatLimit ="marquee_forever" | |
android:focusable="true" | |
android:focusableInTouchMode="true" | |
android:text="Hello Android.. I am android developer and developing this auto scroll text view via XML." /> |