答案 0 :(得分:0)
我认为截至目前你正在使用android.app.AlertDialog
对吗?
使用android.support.v7.app.AlertDialog
较低和较高API都支持与support.v7
相关的所有内容。
喜欢
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
我认为android.app.AlertDialog
针对更高的API(21及更高版本)
由于材料设计是在API 21(Lollipop)中引入的,所以新的AlertDialog
是使用材料设计创建的,但是在较低的API材料设计中,它以不同的方式呈现。
如果android.support.v7.app.AlertDialog
很早就构建了,并且设备有材料设计(API> = 21),那么使用Material Design进行渲染,否则会正常渲染。
希望这对你有所帮助。