Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android键盘,牛轧糖定制popuplayout_Layout_Keyboard_Android 7.0 Nougat - Fatal编程技术网

Android键盘,牛轧糖定制popuplayout

Android键盘,牛轧糖定制popuplayout,layout,keyboard,android-7.0-nougat,Layout,Keyboard,Android 7.0 Nougat,我开发了一种键盘,在MM及更低版本上可以正常工作。顺便说一下,关于牛轧糖我有一个布局问题,请查看此图片以更好地理解: 第一个图像显示在牛轧糖上(弹出窗口未完全显示),第二个图像显示在MM上(所有行均正确显示) 我使用此xml自定义弹出窗口: 您的@layout/preview是什么样子的 我的理论是,在Android 6和7之间,wrap_内容选择其大小的时间发生了变化 使用前 <LinearLayout android:layout_width="wrap_co

我开发了一种键盘,在MM及更低版本上可以正常工作。顺便说一下,关于牛轧糖我有一个布局问题,请查看此图片以更好地理解:

第一个图像显示在牛轧糖上(弹出窗口未完全显示),第二个图像显示在MM上(所有行均正确显示)

我使用此xml自定义弹出窗口:


您的@layout/preview是什么样子的

我的理论是,在Android 6和7之间,wrap_内容选择其大小的时间发生了变化

使用前

<LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal">

            <TextView
                android:id="@+id/xxxxx"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1">
</LinearLayout> //PARTIAL CODE!

//部分代码!
在6.0中没有问题。文本视图将展开以适合文本,然后居中

但是,在7中,文本完全垂直显示,这表明初始LinearLayout的宽度设置为0,而不是调整


尝试在@layout/preview或closeButton中使用高度。将它们设置为手动高度,然后查看是否有相应的变化

你的@layout/预览是什么样的

我的理论是,在Android 6和7之间,wrap_内容选择其大小的时间发生了变化

使用前

<LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal">

            <TextView
                android:id="@+id/xxxxx"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1">
</LinearLayout> //PARTIAL CODE!

//部分代码!
在6.0中没有问题。文本视图将展开以适合文本,然后居中

但是,在7中,文本完全垂直显示,这表明初始LinearLayout的宽度设置为0,而不是调整


尝试在@layout/preview或closeButton中使用高度。将它们设置为手动高度,然后查看是否有相应的变化

你解决了这个问题吗?我也有同样的问题你能解决这个问题吗?我也有同样的问题s