Skip to content

Tag: android

Android Colors in Dark Mode

Hello fellow developers. I’ve developed and Android App using Android Studio, but I only took into account the layout themes for light mode. Here’s how it looks: So now, when I switch my phone to dark mode, this happens: How can I change the colors that are being displayed in dark mode? Answer In …

imageView.setVisibility(View.GONE); not working for ImageView

I am trying to implement imageView.setVisibility(View.GONE); if my URL is null then the visibility of the imageView should ne GONE or else it should be VISIBLE. In my XML I have defined it as android:visibility=”gone” and if the URL is not null then I am displaying the image. The issue here is, it…

Android handle virtual Direction pad on screen to focus view

I’m developing an app can visible Direction pad on the screen, but I don’t know how to handle or override action like UP, DOWN, LEFT, RIGHT to focus the next view (like some buttons in image below). Answer I found a solution to what I need here Android simulate key press . Use Instrumentation clas…