定位按钮实现调整车头方向功能

This commit is contained in:
wangcongtao
2020-11-18 18:20:00 +08:00
parent 9c0d4a0181
commit 65a380cd42
45 changed files with 811 additions and 19 deletions

4
.idea/gradle.xml generated
View File

@@ -13,7 +13,11 @@
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/app2" />
<option value="$PROJECT_DIR$/foudations" />
<option value="$PROJECT_DIR$/foudations/httpdns-base" />
<option value="$PROJECT_DIR$/foudations/httpdns-noop" />
<option value="$PROJECT_DIR$/foudations/httpdns-tencent" />
<option value="$PROJECT_DIR$/foudations/mogo-base-services-apk" />
<option value="$PROJECT_DIR$/foudations/mogo-base-services-sdk" />
<option value="$PROJECT_DIR$/foudations/mogo-base-websocket-sdk" />

1
app2/.gitignore vendored Normal file
View File

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

71
app2/build.gradle Normal file
View File

@@ -0,0 +1,71 @@
apply plugin: 'com.android.application'
apply plugin: 'com.alibaba.arouter'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.freedom.app2"
minSdkVersion 19
targetSdkVersion 22
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
multiDexEnabled true
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "armeabi-v7a"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
packagingOptions {
exclude 'META-INF/proguard/coroutines.pro'
exclude 'META-INF/*'
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation rootProject.ext.dependencies.rxjava
implementation rootProject.ext.dependencies.rxandroid
implementation rootProject.ext.dependencies.boostmultidex
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
implementation project(":foudations:mogo-utils")
implementation project(":foudations:mogo-commons")
implementation project(":foudations:httpdns-base")
implementation project(":foudations:httpdns-tencent")
implementation project(":modules:mogo-module-common")
implementation project(':services:mogo-service-api')
implementation project(':services:mogo-service')
}

21
app2/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,26 @@
package com.freedom.app2;
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.freedom.app2", appContext.getPackageName() );
}
}

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.freedom.app2">
<application
android:name=".DemoApplication"
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=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -0,0 +1,17 @@
package com.freedom.app2;
import io.reactivex.Observable;
import retrofit2.http.GET;
public
/**
* @author congtaowang
* @since 2020/11/18
*
* 描述
*/
interface ApiServices {
@GET( "/test/test" )
Observable< ResponseBody > requestHttpDns();
}

View File

@@ -0,0 +1,30 @@
package com.freedom.app2;
import android.content.Context;
import com.bytedance.boost_multidex.BoostMultiDex;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
public
/**
* @author congtaowang
* @since 2020/11/18
*
* 描述
*/
class DemoApplication extends AbsMogoApplication {
@Override
public void onCreate() {
DebugConfig.setDebug( true );
super.onCreate();
}
@Override
protected void attachBaseContext( Context base ) {
super.attachBaseContext( base );
BoostMultiDex.install( base );
}
}

View File

@@ -0,0 +1,78 @@
package com.freedom.app2;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.network.SubscribeImpl;
import com.mogo.httpdns.IMogoHttpDns;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.utils.network.RequestOptions;
import java.util.Collection;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
public class MainActivity extends AppCompatActivity {
private ApiServices apiServices;
private IMogoHttpDns httpDns;
private View send;
private TextView content;
@Override
protected void onCreate( Bundle savedInstanceState ) {
super.onCreate( savedInstanceState );
setContentView( R.layout.activity_main );
send = findViewById( R.id.send );
content = findViewById( R.id.content );
httpDns = ARouter.getInstance().navigation( IMogoHttpDns.class );
apiServices = MogoApisHandler.getInstance().getApis().getNetworkApi().create( ApiServices.class, "https://dnstest.zhidaozhixing.com" );
send.setOnClickListener( new View.OnClickListener() {
@Override
public void onClick( View v ) {
apiServices.requestHttpDns()
.observeOn( AndroidSchedulers.mainThread() )
.subscribeOn( Schedulers.io() )
.subscribe( new SubscribeImpl< ResponseBody >( RequestOptions.create( MainActivity.this ).loading( true ) ) {
@Override
public void onSuccess( ResponseBody o ) {
super.onSuccess( o );
try {
renderResponse( o );
} catch ( Exception e ) {
content.setText( Log.getStackTraceString( e ) );
}
}
@Override
public void onError( Throwable e ) {
super.onError( e );
content.setText( Log.getStackTraceString( e ) );
}
} );
}
} );
}
private void renderResponse( ResponseBody body ) {
StringBuilder sb = new StringBuilder( "httpDns ip:\n" );
Collection< String > ips = httpDns.getHttpDnsIps( "dnstest.zhidaozhixing.com" );
if ( ips != null && !ips.isEmpty() ) {
for ( String ip : ips ) {
sb.append( ip ).append( "\n" );
}
}
sb.append( "\nserverIp: \n" ).append( body.result.serverIp ).append( "\n" );
content.setText( sb.toString() );
}
}

View File

@@ -0,0 +1,19 @@
package com.freedom.app2;
import com.mogo.commons.data.BaseData;
public
/**
* @author congtaowang
* @since 2020/11/18
*
* 描述
*/
class ResponseBody extends BaseData {
public Result result;
public static class Result {
public String serverIp;
}
}

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:viewportWidth="108"
android:viewportHeight="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:strokeWidth="1"
android:strokeColor="#00000000" />
</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:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="发起请求" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<TextView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#000" />
</ScrollView>
</LinearLayout>

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">app2</string>
</resources>

View File

@@ -0,0 +1,10 @@
<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.freedom.app2;
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 );
}
}

View File

@@ -12,6 +12,12 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
buildTypes {

View File

@@ -3,6 +3,9 @@ package com.mogo.httpdns;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.utils.network.HttpDns;
import java.util.Collection;
import java.util.List;
public
/**
* @author congtaowang
@@ -13,4 +16,6 @@ public
interface IMogoHttpDns extends IProvider {
HttpDns dns();
Collection< String > getHttpDnsIps( String host );
}

View File

@@ -12,6 +12,13 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
buildTypes {

View File

@@ -7,6 +7,9 @@ import com.mogo.httpdns.HttpDnsConst;
import com.mogo.httpdns.IMogoHttpDns;
import com.mogo.utils.network.HttpDns;
import java.util.Collection;
import java.util.List;
public
/**
* @author congtaowang
@@ -22,6 +25,11 @@ class HttpDnsNoop implements IMogoHttpDns {
return null;
}
@Override
public Collection< String > getHttpDnsIps( String host ) {
return null;
}
@Override
public void init( Context context ) {

View File

@@ -12,6 +12,12 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
buildTypes {

View File

@@ -0,0 +1,32 @@
package com.mogo.httpdns.tencent;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* @author congtaowang
* @since 2020/11/18
* <p>
* 描述
*/
class HttpDnsIpsCache {
// 缓存过期时间
public static final long INTERVAL_CACHE = 10 * 60 * 1000;
public static Map< String, Set< String > > sCaches = new HashMap<>();
static void cache( String host, String ip ) {
if ( !sCaches.containsKey( host ) ) {
sCaches.put( host, new HashSet< String >() );
}
sCaches.get( host ).add( ip );
}
static Collection< String > getHttpDnsIps( String host ) {
return sCaches.get( host );
}
}

View File

@@ -1,9 +1,6 @@
package com.mogo.httpdns.tencent;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.commons.debug.DebugConfig;
@@ -16,6 +13,7 @@ import com.tencent.msdk.dns.MSDKDnsResolver;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@@ -29,6 +27,8 @@ public
@Route( path = HttpDnsConst.PATH )
class TencentHttpDns implements IMogoHttpDns, HttpDns {
private static volatile boolean sInited = false;
private static final String TAG = "TencentHttpDns";
@Override
@@ -39,7 +39,7 @@ class TencentHttpDns implements IMogoHttpDns, HttpDns {
@Override
public List< InetAddress > lookup( String hostname ) throws UnknownHostException {
String ips = MSDKDnsResolver.getInstance().getAddrByName( hostname );
Logger.d( TAG, hostname );
Logger.d( TAG, hostname + " ips: %s", ips );
String[] ipArr = ips.split( ";" );
if ( 0 == ipArr.length ) {
return Collections.emptyList();
@@ -49,6 +49,7 @@ class TencentHttpDns implements IMogoHttpDns, HttpDns {
if ( "0".equals( ip ) ) {
continue;
}
HttpDnsIpsCache.cache( hostname, ip );
try {
InetAddress inetAddress = InetAddress.getByName( ip );
inetAddressList.add( inetAddress );
@@ -59,21 +60,23 @@ class TencentHttpDns implements IMogoHttpDns, HttpDns {
return inetAddressList;
}
@Override
public Collection< String > getHttpDnsIps( String host ) {
return HttpDnsIpsCache.getHttpDnsIps( host );
}
@Override
public void init( Context context ) {
final ApplicationInfo appInfo;
try {
appInfo = context.getPackageManager().getApplicationInfo( context.getPackageName(), PackageManager.GET_META_DATA );
Bundle configBundle = appInfo.metaData;
MSDKDnsResolver.getInstance().init( context.getApplicationContext(),
configBundle.getString( "HTTP_DNS_APP_KEY" ),
configBundle.getString( "HTTP_DNS_ID" ),
configBundle.getString( "HTTP_DNS_KEY" ),
DebugConfig.isDebug(),
1_000
);
} catch ( PackageManager.NameNotFoundException e ) {
e.printStackTrace();
if ( sInited ) {
return;
}
MSDKDnsResolver.getInstance().init( context.getApplicationContext(),
"0I00093F244N42WU",
"2742",
"7Pplkaua",
DebugConfig.isDebug(),
1_000
);
sInited = true;
}
}

View File

@@ -40,7 +40,7 @@ import okhttp3.Response;
* <p>
* 描述
*/
public class AbsMogoApplication extends Application {
public abstract class AbsMogoApplication extends Application {
private static final String TAG = "AbsMogoApplication";

View File

@@ -65,7 +65,7 @@ public class RequestOptions {
/**
* Mutator for indicating whether loading message should be displayed while request is ongoing
*/
private RequestOptions loading( boolean loading ) {
public RequestOptions loading( boolean loading ) {
this.loading = loading;
return this;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@@ -7,4 +7,58 @@
<dimen name="v2x_share_btn_height">48px</dimen>
<dimen name="share_item_address">17.5000px</dimen>
<dimen name="module_service_marker_anchor_size">16dp</dimen>
<dimen name="module_service_marker_dot_marginTop">2dp</dimen>
<dimen name="module_service_marker_bubble_width">56px</dimen>
<dimen name="module_service_marker_bubble_height">65px</dimen>
<dimen name="module_service_marker_bubble_icon_width">35px</dimen>
<dimen name="module_service_marker_bubble_icon_height">35px</dimen>
<dimen name="module_service_marker_bubble_icon_marginBottom">4px</dimen>
<dimen name="module_service_marker_bounds_leftMargin">550px</dimen>
<dimen name="module_service_marker_bounds_topMargin">208px</dimen>
<dimen name="module_service_marker_bounds_bottomMargin">100px</dimen>
<dimen name="module_service_marker_bounds_rightMargin">100px</dimen>
<dimen name="module_services_info_window_paddingStart">100px</dimen>
<dimen name="module_services_info_window_paddingEnd">10px</dimen>
<dimen name="module_services_info_window_height">54px</dimen>
<dimen name="module_service_user_header_width">44px</dimen>
<dimen name="module_service_user_header_height">44px</dimen>
<dimen name="module_service_content_textSize">14px</dimen>
<dimen name="module_service_tag_textSize">12px</dimen>
<dimen name="module_service_content_minWidth">64px</dimen>
<dimen name="module_service_id_marker_content_paddingRight">6.5px</dimen>
<dimen name="module_service_id_marker_content_paddingRight_widthoutCall">10px</dimen>
<dimen name="module_services_online_car_panel_marginTop">2px</dimen>
<dimen name="module_services_online_car_panel_marginBottom">2px</dimen>
<dimen name="module_services_online_car_panel_marginRight">6px</dimen>
<dimen name="module_services_online_car_panel_paddingLeft">28px</dimen>
<dimen name="module_services_online_car_panel_paddingBottom">16px</dimen>
<dimen name="module_services_online_car_panel_close_margin_top">20px</dimen>
<dimen name="module_services_online_car_panel_title_margin_top">28px</dimen>
<dimen name="module_services_online_car_panel_title_text_size">20px</dimen>
<dimen name="module_services_online_car_panel_recycler_view_margin_top">84px</dimen>
<dimen name="module_services_load_strategy_textSize">18px</dimen>
<dimen name="module_services_panel_item_avatar_size">58px</dimen>
<dimen name="module_services_panel_item_detail_textSize">14px</dimen>
<dimen name="module_services_panel_item_distance_textSize">16px</dimen>
<dimen name="module_services_panel_item_nickname_textSize">18px</dimen>
<dimen name="module_services_id_panel_item_avatar_border_width">5px</dimen>
<dimen name="module_services_panel_item_padding">20px</dimen>
<dimen name="module_services_panel_item_nickname_marginLeft">13px</dimen>
<dimen name="module_services_id_panel_item_distance_marginLeft">42px</dimen>
<dimen name="module_services_panel_item_detail_bkg_corner">8.89px</dimen>
<dimen name="module_services_panel_item_detail_padding">13px</dimen>
<dimen name="module_services_panel_item_marginBottom">16px</dimen>
<dimen name="module_services_panel_strategy_button_bkg_corner">25px</dimen>
<dimen name="module_services_load_strategy_paddingTop">13px</dimen>
<dimen name="module_services_load_strategy_paddingLeft">26px</dimen>
<dimen name="module_services_load_strategy_marginRight">40px</dimen>
<dimen name="module_services_empty_tip_textSize">18px</dimen>
<dimen name="module_services_empty_tip_marginTop">28px</dimen>
<dimen name="module_services_panel_strategy_button_marginTop">108px</dimen>
<dimen name="module_services_panel_item_corner">12.5px</dimen>
</resources>

View File

@@ -1062,4 +1062,58 @@
<dimen name="share_item_address">32px</dimen>
<dimen name="panel_list_item_title_size">28px</dimen>
<dimen name="module_service_marker_anchor_size">20dp</dimen>
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
<dimen name="module_service_marker_bubble_width">100px</dimen>
<dimen name="module_service_marker_bubble_height">117px</dimen>
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
<dimen name="module_service_marker_bubble_icon_height">60px</dimen>
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>
<!-- 导航查看全程显示范围-->
<dimen name="module_service_marker_bounds_leftMargin">1000px</dimen>
<dimen name="module_service_marker_bounds_topMargin">390px</dimen>
<dimen name="module_service_marker_bounds_bottomMargin">200px</dimen>
<dimen name="module_service_marker_bounds_rightMargin">200px</dimen>
<dimen name="module_services_info_window_paddingStart">10px</dimen>
<dimen name="module_services_info_window_paddingEnd">10px</dimen>
<dimen name="module_services_info_window_height">100px</dimen>
<dimen name="module_service_user_header_width">80px</dimen>
<dimen name="module_service_user_header_height">80px</dimen>
<dimen name="module_service_content_textSize">24px</dimen>
<dimen name="module_service_tag_textSize">20px</dimen>
<dimen name="module_service_content_minWidth">120px</dimen>
<dimen name="module_service_id_marker_content_paddingRight_widthoutCall">20px</dimen>
<dimen name="module_services_online_car_panel_marginTop">20px</dimen>
<dimen name="module_services_online_car_panel_marginBottom">20px</dimen>
<dimen name="module_services_online_car_panel_marginRight">20px</dimen>
<dimen name="module_services_online_car_panel_paddingLeft">50px</dimen>
<dimen name="module_services_online_car_panel_paddingBottom">28px</dimen>
<dimen name="module_services_online_car_panel_close_margin_top">36px</dimen>
<dimen name="module_services_online_car_panel_title_margin_top">50px</dimen>
<dimen name="module_services_online_car_panel_title_text_size">36px</dimen>
<dimen name="module_services_online_car_panel_recycler_view_margin_top">151px</dimen>
<dimen name="module_services_load_strategy_textSize">33px</dimen>
<dimen name="module_services_panel_item_avatar_size">102px</dimen>
<dimen name="module_services_panel_item_detail_textSize">26px</dimen>
<dimen name="module_services_panel_item_distance_textSize">30px</dimen>
<dimen name="module_services_panel_item_nickname_textSize">34px</dimen>
<dimen name="module_services_id_panel_item_avatar_border_width">9px</dimen>
<dimen name="module_services_panel_item_padding">40px</dimen>
<dimen name="module_services_panel_item_nickname_marginLeft">20px</dimen>
<dimen name="module_services_id_panel_item_distance_marginLeft">70px</dimen>
<dimen name="module_services_panel_item_detail_bkg_corner">16px</dimen>
<dimen name="module_services_panel_item_detail_padding">21px</dimen>
<dimen name="module_services_panel_item_marginBottom">28px</dimen>
<dimen name="module_services_panel_strategy_button_bkg_corner">45px</dimen>
<dimen name="module_services_load_strategy_paddingTop">22px</dimen>
<dimen name="module_services_load_strategy_paddingLeft">42px</dimen>
<dimen name="module_services_load_strategy_marginRight">20px</dimen>
<dimen name="module_services_empty_tip_textSize">34px</dimen>
<dimen name="module_services_empty_tip_marginTop">28px</dimen>
<dimen name="module_services_panel_strategy_button_marginTop">60px</dimen>
<dimen name="module_services_panel_item_corner">22.5px</dimen>
</resources>

View File

@@ -1053,4 +1053,57 @@
<dimen name="share_item_address">17.5000px</dimen>
<dimen name="panel_list_item_title_size">15.3125px</dimen>
<dimen name="module_service_marker_anchor_size">16dp</dimen>
<dimen name="module_service_marker_dot_marginTop">2dp</dimen>
<dimen name="module_service_marker_bubble_width">56px</dimen>
<dimen name="module_service_marker_bubble_height">65px</dimen>
<dimen name="module_service_marker_bubble_icon_width">35px</dimen>
<dimen name="module_service_marker_bubble_icon_height">35px</dimen>
<dimen name="module_service_marker_bubble_icon_marginBottom">4px</dimen>
<dimen name="module_service_marker_bounds_leftMargin">550px</dimen>
<dimen name="module_service_marker_bounds_topMargin">208px</dimen>
<dimen name="module_service_marker_bounds_bottomMargin">100px</dimen>
<dimen name="module_service_marker_bounds_rightMargin">100px</dimen>
<dimen name="module_services_info_window_paddingStart">100px</dimen>
<dimen name="module_services_info_window_paddingEnd">10px</dimen>
<dimen name="module_services_info_window_height">54px</dimen>
<dimen name="module_service_user_header_width">44px</dimen>
<dimen name="module_service_user_header_height">44px</dimen>
<dimen name="module_service_content_textSize">14px</dimen>
<dimen name="module_service_tag_textSize">12px</dimen>
<dimen name="module_service_content_minWidth">64px</dimen>
<dimen name="module_service_id_marker_content_paddingRight">6.5px</dimen>
<dimen name="module_service_id_marker_content_paddingRight_widthoutCall">10px</dimen>
<dimen name="module_services_online_car_panel_marginTop">2px</dimen>
<dimen name="module_services_online_car_panel_marginBottom">2px</dimen>
<dimen name="module_services_online_car_panel_marginRight">0px</dimen>
<dimen name="module_services_online_car_panel_paddingLeft">28px</dimen>
<dimen name="module_services_online_car_panel_paddingBottom">16px</dimen>
<dimen name="module_services_online_car_panel_close_margin_top">20px</dimen>
<dimen name="module_services_online_car_panel_title_margin_top">28px</dimen>
<dimen name="module_services_online_car_panel_title_text_size">20px</dimen>
<dimen name="module_services_online_car_panel_recycler_view_margin_top">84px</dimen>
<dimen name="module_services_load_strategy_textSize">18px</dimen>
<dimen name="module_services_panel_item_avatar_size">58px</dimen>
<dimen name="module_services_panel_item_detail_textSize">14px</dimen>
<dimen name="module_services_panel_item_distance_textSize">16px</dimen>
<dimen name="module_services_panel_item_nickname_textSize">18px</dimen>
<dimen name="module_services_id_panel_item_avatar_border_width">5px</dimen>
<dimen name="module_services_panel_item_padding">20px</dimen>
<dimen name="module_services_panel_item_nickname_marginLeft">13px</dimen>
<dimen name="module_services_id_panel_item_distance_marginLeft">42px</dimen>
<dimen name="module_services_panel_item_detail_bkg_corner">8.89px</dimen>
<dimen name="module_services_panel_item_detail_padding">13px</dimen>
<dimen name="module_services_panel_item_marginBottom">16px</dimen>
<dimen name="module_services_panel_strategy_button_bkg_corner">25px</dimen>
<dimen name="module_services_load_strategy_paddingTop">13px</dimen>
<dimen name="module_services_load_strategy_paddingLeft">26px</dimen>
<dimen name="module_services_load_strategy_marginRight">20px</dimen>
<dimen name="module_services_empty_tip_textSize">18px</dimen>
<dimen name="module_services_empty_tip_marginTop">17px</dimen>
<dimen name="module_services_panel_strategy_button_marginTop">60px</dimen>
<dimen name="module_services_panel_item_corner">12.5px</dimen>
</resources>

View File

@@ -1,3 +1,4 @@
include ':app2'
include ':foudations:httpdns-base'
include ':foudations:httpdns-tencent'
include ':foudations:httpdns-noop'