Hello.
Thank you for sharing
I would like to know how can I remove the Sports Guide button
Ok this method works for a lot of things the android comand makes things visable or invisable most IBO versions will have the same location to edit , look in RES/LAYOUT/ then look for a file called
activity_home.xml (apps with multi layouts will have activity_home)2.xml etc)
to explain this , this is the file that displays everything on the main screen you can go through this file and use the method i will show you to hide the sports button or to hide other items as well.
Be aware that this code was written before apps had sports buttons so you will not find anything called sports button instead the app uses the code for
ACCOUNT i know its confussing but bear with me , ok so you need to find the line that says :-
android:id="@id/ly_account"
I will not go through everything that is in this file for the account/sports button but this is the code pertaining to it:-
(normally around line (145) but could be different on version.
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@id/ly_account"
android:background="@drawable/home_item_bg"
android:focusable="true"
android:nextFocusLeft="@id/ly_live"
android:nextFocusRight="@id/ly_change"
android:nextFocusUp="@id/ly_movie"
android:nextFocusDown="@id/ly_account"
android:clickable="true"
android:layout_width="@dimen/_70sdp"
android:layout_height="@dimen/_55sdp"
app:layout_constraintBottom_toBottomOf="@id/ly_live"
app:layout_constraintStart_toStartOf="@id/ly_movie">
<ImageView
android:id="@id/image_account"
android:layout_width="@dimen/_40sdp"
android:layout_height="@dimen/_40sdp"
android:src="@drawable/account_icon"
android:scaleType="fitCenter"
app:layout_constraintBottom_toTopOf="@id/txt_account"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:textSize="@dimen/txt_small_font"
android:textColor="@color/white"
android:gravity="center"
android:id="@id/txt_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/image_account" />
</androidx.constraintlayout.widget.ConstraintLayout>
Now this may look daunting to start with but you want to know about these things ? its not in all reality
you notice account/sports has three sets of instruction , one for the background tile ,one for the icon , and one for the text.
all we are going to do is add one little line of code to each of the three sections ,background ,icon and text.
this is the line
android:visibility="gone" (learn this line off by heart)
it does exactly what you expect it to do it disables the item (does not hide it disables)
So where to add this line ?
I normally add it after the background ,scr and id="@id/txt_account"
so the code above when finished will look like this :--
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@id/ly_account"
android:background="@drawable/home_item_bg"
android:visibility="gone"
android:focusable="true"
android:nextFocusLeft="@id/ly_live"
android:nextFocusRight="@id/ly_change"
android:nextFocusUp="@id/ly_movie"
android:nextFocusDown="@id/ly_account"
android:clickable="true"
android:layout_width="@dimen/_70sdp"
android:layout_height="@dimen/_55sdp"
app:layout_constraintBottom_toBottomOf="@id/ly_live"
app:layout_constraintStart_toStartOf="@id/ly_movie">
<ImageView
android:id="@id/image_account"
android:layout_width="@dimen/_40sdp"
android:layout_height="@dimen/_40sdp"
android:src="@drawable/account_icon"
android:visibility="gone"
android:scaleType="fitCenter"
app:layout_constraintBottom_toTopOf="@id/txt_account"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:textSize="@dimen/txt_small_font"
android:textColor="@color/white"
android:gravity="center"
android:id="@id/txt_account"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/image_account" />
</androidx.constraintlayout.widget.ConstraintLayout>
Save out and test , this has to be done using MT Manager dont even attempt it if you dont have this editting tool which is on these forums.
Hope this helps you and a few others , the key is to try and understand what these three sections do as do nearly all info displayed on the main screen has these three settings.
background = placement etc and what happens if you press left,right,up and down etc. size.
the icon = the actual icon that is to be displayed and its size and placement
and of course the text.