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
//配置同上 | |
//第一步,仿照官方Volley框架,自己写一个类 | |
public class XMLRequest extends Request<XmlPullParser> { | |
private final Response.Listener<XmlPullParser> mListener; | |
public XMLRequest(int method, String url, Response.Listener<XmlPullParser> listener, | |
Response.ErrorListener errorListener) { | |
super(method, url, errorListener); | |
mListener = listener; |
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
String title = null; | |
try { | |
title = new String(i.getTitle().getBytes("ISO-8859-1"), "UTF-8");//转码 | |
} catch (UnsupportedEncodingException e) { | |
e.printStackTrace(); | |
} |
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
//在对应的module添加下面的代码 | |
task makeJar(type: Copy) { | |
delete 'build/libs/mysdk.jar' | |
from('build/intermediates/bundles/release/') | |
into('build/libs/') | |
include('classes.jar') | |
rename ('classes.jar', 'mysdk.jar') | |
} | |
makeJar.dependsOn(build) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android" | |
android:horizontalGap="0dp" | |
android:keyHeight="70dp" | |
android:keyWidth="100dp" | |
android:verticalGap="0dp"> | |
<Row> | |
<Key android:codes="55" android:keyEdgeFlags="left" android:keyLabel="7"/> | |
<Key android:codes="56" android:keyLabel="8"/> | |
<Key android:codes="57" android:keyLabel="9"/> |
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 android.app.Activity; | |
import android.content.Context; | |
import android.graphics.PixelFormat; | |
import android.inputmethodservice.Keyboard; | |
import android.inputmethodservice.KeyboardView; | |
import android.text.Editable; | |
import android.text.InputType; | |
import android.view.ActionMode; | |
import android.view.Gravity; | |
import android.view.Menu; |
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 android.content.Context; | |
import android.content.Intent; | |
import android.media.AudioAttributes; | |
import android.media.MediaPlayer; | |
import android.speech.tts.TextToSpeech; | |
import android.speech.tts.UtteranceProgressListener; | |
import android.text.TextUtils; | |
import android.util.Log; | |
import com.gojiejiao.like.pos.Constants; |
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
apply plugin: 'com.android.application' | |
//加载本地签名 | |
def keystorePropertiesFile = rootProject.file("local.properties") | |
def keystoreProperties = new Properties() | |
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | |
android { | |
signingConfigs { | |
ExampleSign { |
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
/** | |
* 获取手机的Mac地址,在Wifi未开启或者未连接的情况下也能获取手机Mac地址 | |
*/ | |
public static String getMacAddress(Context context) { | |
String macAddress = null; | |
WifiInfo wifiInfo = getWifiInfo(context); | |
if (wifiInfo != null) { | |
macAddress = wifiInfo.getMacAddress(); | |
} | |
return macAddress; |