I’m trying to start another activity by pressing on the cardview which has a friend finder id. But when I write home.java it gives me problems in the setOnClickListener. At homeActivity it tells me Cannot resolve method ‘homeActivity’ in ‘HomeActivity’. because? Answer If there i…
Tag: android
How to set text color of bottom navigation item selection and unselection?
I was trying to set the following attribute of BottomNavigationView widget But this sets the text color of active and inactive item both. I want to have different text color on active and inactive item of BottomNavigationView. Answer First, you have to make a selectable color in res>color>selectable_col…
Using If in RecyclerView, doesnt show all the item of the list
I am trying create a RecycleView for my chat application and to align the sent and arrived messages to the left and right. I used an if state to check if that is from me, and 2 separated textview aligned to start/end and only showing the correct one. I think it isn’t the best solution as sometimes after…
Unable to start activity: java.lang.ArrayIndexOutOfBoundsException
Everyone, hi! Friends, when you click on the button, a new activity does not start. The following exception occurs: java.lang.ArrayIndexOutOfBoundsException. The log of my error is presented below: Program code for MainActivity.java Program code for PlayerActivity.java: If I understand correctly, then the err…
YoutubePlayer API endless loading issue
I am starting a new intent whenever a new geofence transition happens. In GeofenceTransitionService.java: And I am initializing the fragment like this, in VideoActivity.java: activity_video.xml: But the video will never load. It works fine on other activities though. I have checked the manifest but couldnR…
Sending data from android to esp8266
I have an arduino project, where i was able to set up an esp8266 as a webserver, and i am able to send data to it, eg. if i put “http://192.168.4.1/get?data=010” into the browser, it works perfectly. I want to send data using an android app, which pretty much means using the above mentioned url, j…
Type com.example.myhouse.MainActivity is defined multiple times
Error while compiling the code. Type com.example.myhouse.MainActivity is defined multiple times: C:UsersHPAndroidStudioProjectsmyHouseappbuildtmpkotlin-classesdebugcomexamplemyhouseMainActivity.class, C:UsersHPAndroidStudioProjectsmyHouseappbuildintermediatesjavacdebugclassescomexamplemyhouseMainActivity.clas…
GuideLine problem Android Studio – ClassNotFoundException
I have problem with GuideLine, does someone know the solution? It look like the guideline is missing classes The following classes could not be found: – android.support.constraint.Guideline (Fix Build Path, Edit XML, Create Class) Logcat after button click: Guideline problem XML Code: Build Gradle: Answ…
How to disable clicks on DotView?
I am using a custom view from here. I want to disable user interactions with the view pager 2 using this: But, it moves when I click on a dot of that view. I tried to disable that using this: But, that does not seem to work. Then how can we disable clicks on it? Answer Library uses setOnClickListener internal…
How can I identify the recipient of the email?
The sender works fine, but I couldn’t make the receiver. Can you help me? Answer I don’t know exactly how the design is. I’m also not sure where you got the recipient email from, but maybe this code will be useful for you.