7

I am using the SemiClosedSlidingDrawer in my app.

Quick explain:

  1. Sliding drawer has handle and content part
  2. The content part is partially opened at view creation

Problem:

When I create view the content part is inflated and cached then showing partially. If I perform any operation on the main content. It reflected to the content part of sliding drawer. Even it is partially viewable.

I managed to found the answer that the content is not set to GONE so only it is receiving touch events.

I have to set the content GONE after all inflation caching completed. So I need to know

Which View creation Lifecycle method called last? or Where to set ChildView's Visibility properties?

I can refer my slidingDrawer's content in activity and set to GONE it is working fine. But there should be a proper way to fix this issue.

Mahendran
  • 2,719
  • 5
  • 28
  • 50

1 Answers1

0

I don't get why you can't just set the content part to gone in onCreate() of your activity?

Alternatively make your own implementation of SemiClosedSlidingDrawer and override all the constructors with your own implementation. Something like this:

SemiClosedSlidingDrawer() {
    super.SemiClosedSlidingDrawer();
    mContent.setVisibility(View.GONE);
}
Warpzit
  • 27,966
  • 19
  • 103
  • 155
  • I said "I did it and it worked". But I just wish to know View's life cycle method called after inflation so that It will become semi-visible and will not consume events. – Mahendran Feb 20 '13 at 11:56
  • I tried with the constructor trick. But the bottom content part is black [Not inflated and cached] – Mahendran Feb 20 '13 at 11:57
  • @mahemadhi So you want it to be visible but you don't want it to take click events and be interact able? – Warpzit Feb 20 '13 at 11:59
  • 1
    @mahemadhi you can use .post on any view, that might be what you are looking after. – Warpzit Feb 20 '13 at 12:00