Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/180.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 无法获取小部件的标记_Android_Button_Android Widget - Fatal编程技术网

Android 无法获取小部件的标记

Android 无法获取小部件的标记,android,button,android-widget,Android,Button,Android Widget,我认为这个产品应该随重量而变化 TextView weight = new TextView(getActivity()); weight.setText(weight2); weight.setPadding(10, 10, 10, 10); product.setTag("weight"); 很抱歉,我现在添加了错误日志。第197行=**log.i(“sddddddddddd”,childView.getTag().toString())**

我认为这个产品应该随重量而变化

TextView weight = new TextView(getActivity());
        weight.setText(weight2);
        weight.setPadding(10, 10, 10, 10);
        product.setTag("weight");

很抱歉,我现在添加了错误日志。第197行=**log.i(“sddddddddddd”,childView.getTag().toString())**Thanx你救了我lahiru
 01-31 15:45:11.710: E/AndroidRuntime(15061): java.lang.NullPointerException
01-31 15:45:11.710: E/AndroidRuntime(15061):    at ceylon.linux.osrumsalespad.Stock_check_fragment$3.onClick(Stock_check_fragment.java:197)
TextView weight = new TextView(getActivity());
        weight.setText(weight2);
        weight.setPadding(10, 10, 10, 10);
        product.setTag("weight");
  TextView weight = new TextView(getActivity());
            weight.setText(weight2);
            weight.setPadding(10, 10, 10, 10);
            weight.setTag("weight");