This commit is contained in:
2020-07-04 14:41:25 +08:00
parent 70c346d2c1
commit a8f02e4da5
3748 changed files with 587372 additions and 0 deletions

1
tianrunPlugins/app/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,35 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.example.baidulbs"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation files('libs/BaiduLBS_Android.jar')
implementation 'androidx.appcompat:appcompat:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation files('classes.jar')
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

21
tianrunPlugins/app/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -0,0 +1,27 @@
package com.example.baidulbs;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.baidulbs", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.baidulbs">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="com.tianrun.MyMapActivity"></activity>
</application>
</manifest>

View File

@@ -0,0 +1,33 @@
package com.coolape;
import android.graphics.Color;
import android.view.WindowManager;
import com.unity3d.player.UnityPlayer;
public class ProcSoftInputMode {
public static void setAdjustNothing() {
UnityPlayer.currentActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
UnityPlayer.currentActivity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
}
});
}
public static void setAdjustPan() {
UnityPlayer.currentActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
UnityPlayer.currentActivity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
}
});
}
public static void setAdjustResize() {
UnityPlayer.currentActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
UnityPlayer.currentActivity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
}
});
}
}

View File

@@ -0,0 +1,181 @@
package com.tianrun;
import android.content.Intent;
import android.provider.Settings;
import com.baidu.location.BDAbstractLocationListener;
import com.baidu.location.BDLocation;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
//import com.baidu.mapapi.SDKInitializer;
import com.unity3d.player.UnityPlayer;
import org.json.JSONObject;
public class BaiduLBS {
public static LocationClient mLocClient;
static String listener;
/**
* 定位SDK监听函数
*/
public static class MyLocationListener extends BDAbstractLocationListener {
@Override
public void onReceiveLocation(BDLocation location) {
if (null != location && location.getLocType() != BDLocation.TypeServerError &&
location.getLocType() != BDLocation.TypeOffLineLocationFail &&
location.getLocType() != BDLocation.TypeCriteriaException) {
// MapView 销毁后不在处理新接收的位置
JSONObject jo = new JSONObject();
try {
jo.put("cmd", "onGetLocation");
if (location == null) {
jo.put("code", -1);
return;
}
// double mCurrentLat = location.getLatitude();
// double mCurrentLon = location.getLongitude();
// double mCurrentAccracy = location.getRadius();
jo.put("code", 0);
jo.put("latitude", String.format("%f", location.getLatitude()));
jo.put("longitude", String.format("%f", location.getLongitude()));
jo.put("AddrStr", location.getAddrStr());
jo.put("locationInfor", location.toString());
sendUnityMsg(jo.toString());
} catch (Exception e) {
System.out.println(e);
}
}
mLocClient.stop();
}
/**
* 回调定位诊断信息,开发者可以根据相关信息解决定位遇到的一些问题
*
* @param locType 当前定位类型
* @param diagnosticType 诊断类型1~9
* @param diagnosticMessage 具体的诊断信息释义
*/
@Override
public void onLocDiagnosticMessage(int locType, int diagnosticType, String diagnosticMessage) {
super.onLocDiagnosticMessage(locType, diagnosticType, diagnosticMessage);
StringBuffer sb = new StringBuffer(256);
sb.append("locType:" + locType);
sb.append("\n" + "诊断结果: ");
if (locType == BDLocation.TypeNetWorkLocation) {
if (diagnosticType == 1) {
sb.append("网络定位成功没有开启GPS建议打开GPS会更好" + "\n");
sb.append(diagnosticMessage);
} else if (diagnosticType == 2) {
sb.append("网络定位成功没有开启Wi-Fi建议打开Wi-Fi会更好" + "\n");
sb.append(diagnosticMessage);
}
} else if (locType == BDLocation.TypeOffLineLocationFail) {
if (diagnosticType == 3) {
sb.append("定位失败,请您检查您的网络状态" + "\n");
sb.append(diagnosticMessage);
}
} else if (locType == BDLocation.TypeCriteriaException) {
if (diagnosticType == 4) {
sb.append("定位失败,无法获取任何有效定位依据" + "\n");
sb.append(diagnosticMessage);
} else if (diagnosticType == 5) {
sb.append("定位失败无法获取有效定位依据请检查运营商网络或者Wi-Fi网络是否正常开启尝试重新请求定位" + "\n");
sb.append(diagnosticMessage);
} else if (diagnosticType == 6) {
sb.append("定位失败无法获取有效定位依据请尝试插入一张sim卡或打开Wi-Fi重试" + "\n");
sb.append(diagnosticMessage);
} else if (diagnosticType == 7) {
sb.append("定位失败,飞行模式下无法获取有效定位依据,请关闭飞行模式重试" + "\n");
sb.append(diagnosticMessage);
} else if (diagnosticType == 9) {
sb.append("定位失败,无法获取任何有效定位依据" + "\n");
sb.append(diagnosticMessage);
}
} else if (locType == BDLocation.TypeServerError) {
if (diagnosticType == 8) {
sb.append("定位失败请确认您定位的开关打开状态是否赋予APP定位权限" + "\n");
sb.append(diagnosticMessage);
}
}
System.out.println(sb.toString());
JSONObject jo = new JSONObject();
try {
jo.put("cmd", "onGetLocation");
jo.put("code", diagnosticType);
jo.put("msg", sb.toString());
sendUnityMsg(jo.toString());
} catch (Exception e) {
System.out.println(e.toString());
}
}
}
public static void init(String _listener, String coorType) {
listener = _listener;
//在使用SDK各组件之前初始化context信息传入ApplicationContext
// SDKInitializer.initialize(UnityPlayer.currentActivity.getApplicationContext());
//自4.3.0起百度地图SDK所有接口均支持百度坐标和国测局坐标用此方法设置您使用的坐标类型.
//包括BD09LL和GCJ02两种坐标默认是BD09LL坐标。
// SDKInitializer.setCoordType(CoordType.BD09LL);
// 初始定位
initLocation(coorType);
}
public static void initLocation(String coorType) {
mLocClient = new LocationClient(UnityPlayer.currentActivity.getApplicationContext());
//声明LocationClient类
mLocClient.registerLocationListener(new MyLocationListener());
//注册监听函数
// 定位初始化
LocationClientOption mOption = new LocationClientOption();
mOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy); // 可选,默认高精度,设置定位模式,高精度,低功耗,仅设备
mOption.setCoorType(coorType); // 可选默认gcj02设置返回的定位结果坐标系如果配合百度地图使用建议设置为bd09ll;
// mOption.setScanSpan(3000); // 可选默认0即仅定位一次设置发起连续定位请求的间隔需要大于等于1000ms才是有效的
mOption.setIsNeedAddress(true); // 可选,设置是否需要地址信息,默认不需要
mOption.setIsNeedLocationDescribe(true); // 可选,设置是否需要地址描述
mOption.setNeedDeviceDirect(false); // 可选,设置是否需要设备方向结果
mOption.setLocationNotify(false); // 可选默认false设置是否当gps有效时按照1S1次频率输出GPS结果
mOption.setIgnoreKillProcess(true); // 可选默认true定位SDK内部是一个SERVICE并放到了独立进程设置是否在stop
mOption.setIsNeedLocationDescribe(true); // 可选默认false设置是否需要位置语义化结果可以在BDLocation
mOption.setIsNeedLocationPoiList(true); // 可选默认false设置是否需要POI结果可以在BDLocation
mOption.SetIgnoreCacheException(false); // 可选默认false设置是否收集CRASH信息默认收集
mOption.setOpenGps(true); // 可选默认false设置是否开启Gps定位
mOption.setIsNeedAltitude(false); // 可选默认false设置定位时是否需要海拔信息默认不需要除基础定位版本都可用
mLocClient.setLocOption(mOption);
}
// 取得我的当前位置
//可选设置返回经纬度坐标类型默认GCJ02
//GCJ02国测局坐标
//BD09ll百度经纬度坐标
//BD09百度墨卡托坐标
public static void getMyLocation(String CoorType) {
if (mLocClient != null) {
// if(mLocClient.isStarted()) return;
LocationClientOption option = mLocClient.getLocOption();
if (CoorType != null && CoorType != "") {
option.setCoorType(CoorType);
} else {
option.setCoorType("gcj02");
}
mLocClient.setLocOption(option);
mLocClient.start();
}
}
///打开gps设置
public static void guidSwitchGps() {
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
//PermissionConstants.RC_GPS是请求码可以在onActivityResult中根据该请求码判断用户是否已经在设置页面打开位置服务
UnityPlayer.currentActivity.startActivity(intent);
}
public static void sendUnityMsg(String msg) {
UnityPlayer.UnitySendMessage(listener, "onCallback", msg);
}
}

View File

@@ -0,0 +1,153 @@
package com.tianrun;
import androidx.appcompat.app.AppCompatActivity;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import com.baidu.mapapi.map.BaiduMap;
import com.baidu.mapapi.map.MapStatus;
import com.baidu.mapapi.map.MapStatusUpdateFactory;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.MyLocationConfiguration;
import com.baidu.mapapi.map.MyLocationData;
import com.baidu.mapapi.model.LatLng;
public class MyMapActivity extends AppCompatActivity implements SensorEventListener {
public static MapView mMapView;
private static BaiduMap mBaiduMap;
private LocationClient mLocClient;
private MyLocationListener myListener = new MyLocationListener();
// 定位图层显示方式
private MyLocationConfiguration.LocationMode mCurrentMode;
private SensorManager mSensorManager;
private Double lastX = 0.0;
private int mCurrentDirection = 0;
private double mCurrentLat = 0.0;
private double mCurrentLon = 0.0;
private float mCurrentAccracy;
private MyLocationData myLocationData;
private Boolean isFirstLoc = true;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mMapView = new MapView(this);
setContentView(mMapView);
// 获取传感器管理服务
mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
// 为系统的方向传感器注册监听器
mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_UI);
// 定位初始化
initLocation();
}
/**
* 定位初始化
*/
public void initLocation(){
// 开启定位图层
mBaiduMap.setMyLocationEnabled(true);
// 定位初始化
mLocClient = new LocationClient(this);
mLocClient.registerLocationListener(myListener);
LocationClientOption option = new LocationClientOption();
// 打开gps
option.setOpenGps(true);
// 设置坐标类型
option.setCoorType("bd09ll");
option.setScanSpan(1000);
mLocClient.setLocOption(option);
mLocClient.start();
}
@Override
protected void onResume() {
super.onResume();
//在activity执行onResume时执行mMapView. onResume (),实现地图生命周期管理
mMapView.onResume();
}
@Override
protected void onPause() {
super.onPause();
//在activity执行onPause时执行mMapView. onPause (),实现地图生命周期管理
mMapView.onPause();
}
@Override
protected void onDestroy() {
super.onDestroy();
// 取消注册传感器监听
mSensorManager.unregisterListener(this);
// 退出时销毁定位
mLocClient.stop();
// 关闭定位图层
mBaiduMap.setMyLocationEnabled(false);
//在activity执行onDestroy时执行mMapView.onDestroy(),实现地图生命周期管理
mMapView.onDestroy();
}
@Override
public void onSensorChanged(SensorEvent sensorEvent) {
double x = sensorEvent.values[SensorManager.DATA_X];
if (Math.abs(x - lastX) > 1.0) {
mCurrentDirection = (int) x;
myLocationData = new MyLocationData.Builder()
.accuracy(mCurrentAccracy)// 设置定位数据的精度信息,单位:米
.direction(mCurrentDirection)// 此处设置开发者获取到的方向信息顺时针0-360
.latitude(mCurrentLat)
.longitude(mCurrentLon)
.build();
mBaiduMap.setMyLocationData(myLocationData);
}
lastX = x;
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
/**
* 定位SDK监听函数
*/
public class MyLocationListener implements BDLocationListener {
@Override
public void onReceiveLocation(BDLocation location) {
// MapView 销毁后不在处理新接收的位置
if (location == null || mMapView == null) {
return;
}
mCurrentLat = location.getLatitude();
mCurrentLon = location.getLongitude();
mCurrentAccracy = location.getRadius();
myLocationData = new MyLocationData.Builder()
.accuracy(location.getRadius())// 设置定位数据的精度信息,单位:米
.direction(mCurrentDirection)// 此处设置开发者获取到的方向信息顺时针0-360
.latitude(location.getLatitude())
.longitude(location.getLongitude())
.build();
mBaiduMap.setMyLocationData(myLocationData);
if (isFirstLoc) {
isFirstLoc = false;
LatLng ll = new LatLng(location.getLatitude(), location.getLongitude());
MapStatus.Builder builder = new MapStatus.Builder();
builder.target(ll).zoom(18.0f);
mBaiduMap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(builder.build()));
}
}
}
}

View File

@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>

View File

@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#6200EE</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#03DAC5</color>
</resources>

View File

@@ -0,0 +1,3 @@
<resources>
<string name="app_name">BaiduLbs</string>
</resources>

View File

@@ -0,0 +1,11 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>

View File

@@ -0,0 +1,17 @@
package com.example.baidulbs;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}