Noman Uddin
- Forum posts: 1
Aug 21, 2016, 2:10:02 PM via Website
Aug 21, 2016 2:10:02 PM via Website
I have a problem in android application. When I click on the screen to hide the toolbar it flickers. while disappearing it displays the content and then disappear.
Code:
content_main.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (toolbar.getVisibility()==View.GONE){
toolbar.setVisibility(View.VISIBLE);
}else{
toolbar.setVisibility(View.GONE);
}
Xml:
<TableLayout ......."
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:rowCount="5"
android:id="@+id/main_content"
android:background="#000000"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="culha.roomdispaly.MainActivity"
android:animateLayoutChanges="true"
tools:showIn="@layout/activity_main">
<TableRow
----------
</TableRow>
</TableLayout>
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.