Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/227.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 BubbleLayout在服务中不起作用_Android_Android Studio_Layout Inflater - Fatal编程技术网

Android BubbleLayout在服务中不起作用

Android BubbleLayout在服务中不起作用,android,android-studio,layout-inflater,Android,Android Studio,Layout Inflater,这是我的代码,但它在服务中不起作用。布局没有膨胀 LayoutInflater layoutInflater = (LayoutInflater) getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE); BubbleLayout bubbleView = (BubbleLayout) layoutInflater.inflate(R.layout.bubble_layout, null); 你说不工作是什么意思?请添加一些详细信

这是我的代码,但它在服务中不起作用。布局没有膨胀

LayoutInflater layoutInflater = (LayoutInflater) getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);

BubbleLayout bubbleView = (BubbleLayout) layoutInflater.inflate(R.layout.bubble_layout, null);

你说不工作是什么意思?请添加一些详细信息你得到的错误是什么?上面的代码“BubbleLayout”是布局,只需使用视图存储你的充气示例:view mView=llayoutInflater.inflate(R.Layout.bubble_Layout,null);那么,如何像气泡布局那样破坏布局布局布局布局不会膨胀