小编alp*_*nso的帖子

如何为每个片段设置工具栏,如何处理抽屉切换和工具栏

我在我的应用程序中使用单个活动和许多片段方法

现在因为在我的一些片段中我在工具栏中有自定义视图,所以我决定为每个片段分别设置工具栏.

如何为每个片段实现单独的工具栏,抽屉布局也在我的活动中 主页 类别页面

android android-fragments android-support-library android-toolbar

12
推荐指数
1
解决办法
783
查看次数

在gradle中使用目标sdk版本23时,ZBAR条形码扫描库无法正常工作

我在我的项目中使用zbar扫描程序库.更新到sdk 23后,Marshmallow扫描仪无法正常工作.以下是gradle文件.如果我将targetSdkVersion设置为23以外的任何东西,扫描仪正在工作.

以下是gradle文件:

    apply plugin: 'com.android.application'

    android {
    compileSdkVersion 15
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "net.sourceforge.zbar.android.CameraTest"
        minSdkVersion 9
        targetSdkVersion 23
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),  'proguard-rules.txt'
        }
    }
  }

 dependencies {
    compile files('libs/zbar.jar')
 }
Run Code Online (Sandbox Code Playgroud)

以下是我获得异常日志的唯一一行:

10-15 21:19:00.682 7719-7719/? E/AndroidRuntime: FATAL EXCEPTION: main
10-15 21:19:00.682 7719-7719/? E/AndroidRuntime: Process: net.sourceforge.zbar.android.CameraTest, PID: 7719
10-15 21:19:00.682 7719-7719/? E/AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/net.sourceforge.zbar.android.CameraTest-2/lib/arm/libiconv.so: has text relocations
10-15 21:19:00.682 7719-7719/? E/AndroidRuntime:     at java.lang.Runtime.loadLibrary(Runtime.java:372)
10-15 21:19:00.682 7719-7719/? E/AndroidRuntime:     at java.lang.System.loadLibrary(System.java:1076) …
Run Code Online (Sandbox Code Playgroud)

sdk android zbar-sdk zbar android-6.0-marshmallow

9
推荐指数
1
解决办法
5148
查看次数

将播放服务更新到8.3.0后无法创建发布版本

在将播放服务更新到版本8.1.0或8.3.0后无法创建发行版APK我遇到以下异常.

任何人都知道如何解决这个问题.

Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef
Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef
2 errors; aborting
Error:Execution failed for task ':project:dexRelease'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 1
Run Code Online (Sandbox Code Playgroud)

java android android-support-library google-play-services android-6.0-marshmallow

7
推荐指数
1
解决办法
2960
查看次数

滚动和缩放ImageView

我想要一个带缩放和滚动的自定义ImageView.

对于滚动我正在使用库.

为了缩放我尝试使用这个库,但我无法将它们两者结合起来.任何想法如何创建ImageView可滚动和缩放?

android scroll image-zoom android-imageview

6
推荐指数
0
解决办法
1190
查看次数

Android Deeplink 两个独立的 Activity

我有两项活动需要深层链接

一项与关注网址链接的活动

http://abc.or/deals

以下是它的意图过滤器

      <intent-filter>
            <data
                android:host="abc.or"
                android:path="/deals"
                android:scheme="http" />
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.BROWSABLE" />
            <category android:name="android.intent.category.DEFAULT" />
       </intent-filter>
Run Code Online (Sandbox Code Playgroud)

另一项活动的网址如下

http://abc.or/deals?category=Air+Conditioner-Refrigerator-

<intent-filter>
            <data
                android:host="abc.or"
                android:path="/deals"
                android:pathPattern="*deals/?category*"
                android:scheme="http" />
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.BROWSABLE" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
Run Code Online (Sandbox Code Playgroud)

但是,单击任何 url 深层链接都适用于这两项活动,这就是我如何解决此问题的问题

regex android deep-linking android-manifest

5
推荐指数
1
解决办法
2914
查看次数