高德地图的导入bug和按键学习

一定要注意高德NDK的导入
还有一定一定要把 其他类里面的compile fileTree(dir: ‘libs’, include: [’*.jar’])删除干净,不然会出现黑屏bug

 defaultConfig {
        ndk {
            //设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
            abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
        }
        applicationId "com.dji.GSDemo.GaodeMap"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    //3D地图so及jar
    compile 'com.amap.api:3dmap:latest.integration'
    //定位功能
    compile 'com.amap.api:location:latest.integration'
    //搜索功能
    compile 'com.amap.api:search:latest.integration'
}
dependencies {
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    compile ('com.dji:dji-sdk:4.10')
    provided ('com.dji:dji-sdk-provided:4.10')
    implementation 'com.android.support:multidex:1.0.3'
}

关于按键背景颜色图片和半透明的设置

按键的整体透明度

        private Button btn_locate;
        btn_locate=findViewById(R.id.locate);
        btn_locate.getBackground().setAlpha(100);

按键颜色的透明度

在main.xml里面加入

就可以了
半透明<Button android:background="#e0000000" … />
透明<Button android:background="#00000000" … />

##按键并不能自己加图片然后后面又有按键的按下和
不按下的变化,可以用lmage view和button组合合成,目前没有其他办法。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值