Solution 1 :
You have successfully hidden
By using this code
android_layout_width="0dp"
android_layout_height="0dp"
He is editing width and height
"0dp"
Problem :
I am a Beginner in Android.
I want to hide the text in the side menu.
But when I am doing that I am getting a space in that place.
When I pressed, that space it moves to another page
Is there any way that the whole part is hidden without being deleted?
The problem is if I delete that, it will require further modifications and deletion of other files
I just want to hide the text with its link
I tried a lot, but all attempts failed
<LinearLayout
android_layout_height="wrap_content"
android_layout_width="match_parent"
android_orientation="vertical"
android_visibility="@{build.isMobil?View.GONE:View.VISIBLE}">
<View
android_background="@color/light_gray_color1"
android_layout_height="1dp"
android_layout_width="match_parent"
android_visibility="@{build.isMobil?View.GONE:View.VISIBLE}" />
<TextView
android_background="#f1f1f1"
android_drawablePadding="@dimen/padding"
android_gravity="center_vertical"
android_id="@+id/profile"
android_layout_gravity="center_vertical"
android_layout_height="wrap_content"
android_layout_width="match_parent"
android_onClick="@{(v)->handlers.onClickProfile(v)}"
android_paddingBottom="@dimen/padding"
android_paddingLeft="@dimen/padding_heading"
android_paddingTop="@dimen/padding"
android_text="@string/title_page"
android_textColor="@color/drawer_label"
android_textSize="12sp"
android_textStyle="bold"
android_visibility="@{build.isMobil?View.GONE:View.VISIBLE}" />
<View
android_background="@color/light_gray_color1"
android_layout_height="1dp"
android_layout_width="match_parent"
android_visibility="@{build.isMobil?View.GONE:View.VISIBLE}" />
<TextView
android_drawablePadding="@dimen/padding"
android_gravity="center_vertical"
android_layout_gravity="center_vertical"
android_layout_height="wrap_content"
android_layout_width="match_parent"
android_onClick="@{(v)->handlers.onClick()}"
android_paddingBottom="@dimen/padding_heading"
android_paddingLeft="@dimen/padding_heading"
android_paddingTop="@dimen/padding_heading"
android_text="@string/become"
android_textColor="@color/drawer_label"
android_textSize="12sp"
android_textStyle="bold"
android_visibility="@{homedata.partner==0?(homedata.partnerApproveRequired?View.GONE:View.VISIBLE):View.GONE}" />
<TextView
android_drawablePadding="@dimen/padding"
android_gravity="center_vertical"
android_layout_gravity="center_vertical"
android_layout_height="wrap_content"
android_layout_width="match_parent"
android_paddingBottom="@dimen/padding_heading"
android_paddingLeft="@dimen/padding_heading"
android_paddingTop="@dimen/padding_heading"
android_text="@string/request_pending"
android_textColor="@color/drawer_label"
android_textSize="12sp"
android_textStyle="bold"
android_visibility="@{homedata.partner==0?(homedata.partnerApproveRequired?View.VISIBLE:View.GONE):View.GONE}" />
</LinearLayout>
I tried to use
android_text=""
Comments
Comment posted by Abdul
make the textview visibility to gone, so no modification will be required and it will not be visible on screen.
Comment posted by ahmed mohamed
Yes, the text has disappeared But when pressed, it goes to another page Clicking on the link still works
Comment posted by AgentP
then you need to remove hide the layout which has the click listener on it
Comment posted by Abdul
i think when we make something gone, clicks are not possible then.
Comment posted by ahmed mohamed
Unfortunately, when pressing is still working Here is the problem, I can not adjust more I made an attempt before using code android_onClick=”null” But it didn’t work right