开发者

ViewStub not getting hidden/deflated android

开发者 https://www.devze.com 2023-03-16 05:32 出处:网络
I have following class and it\'s obeject which is inflated viewstub. Statusbar-- class extends RelativeLayout

I have following class and it's obeject which is inflated viewstub.

Statusbar-- class extends RelativeLayout

Statusbar b= (Statusbar)((ViewStub)findViewById(R.id.stub_one)).inflate();

Now I want to make this Statusbar visible/invisible or inflate/deflate开发者_如何学Go depending on my need. I tried b.setVisibility(View.INVISIBLE). But it didn't work.

How this can be done?


        findViewById(R.id.stub_one).setVisibility(View.GONE);
0

精彩评论

暂无评论...
验证码 换一张
取 消