0

为什么ListPopupWindowDialog不具有物质形态,即使我有这个在我的成绩文件:API 19(KitKat)中的材料设计?

android { 
    compileSdkVersion 24 
    buildToolsVersion "24" 

defaultConfig { 
    applicationId "com.example.test" 
    minSdkVersion 19 
    targetSdkVersion 24 
    versionCode 1 
    versionName "1c" 
} 

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

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:24.0.0' 
    compile 'com.android.support:support-v4:24.0.0' 

我试着用不同版本的编译工具和等,但都没有成功。 这是一个AlertDialog的样子:

enter image description here

+1

那么你的代码在哪里创建'AlertDialog'? AlertDialog是什么导入? – ianhanniballake

+0

@ianhanniballake'AlertDialog'我使用'import android.app.AlertDialog' – Chunrand

+0

@ianhanniballake我发现我的错误在哪里..谢谢你兄弟你帮了我很多。 – Chunrand

回答

3

您应该使用android.support.v7.app.AlertDialog,如果你想在所有API级别一致AlertDialog

+0

那么'ListPopouWinow'的标高怎么办?我无法让它工作.. – Chunrand

+0

@Chaos - 听起来像一个不同的问题。海拔不存在前棒棒糖 – ianhanniballake

+0

不..它不是一个属性被设置..看这张照片: http://maogm.com/images/result.png看到边界的影子? 在我的应用程序中没有那样的影子.. – Chunrand