The ImageView fills with black color after setting an image.
I'm setting image with this line
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Root = findViewById(R.id.Iv);
sensorManager = (SensorManager) getSystemService(Service.SENSOR_SERVICE);
Proximity = sensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
//Root.setBackgroundColor(Color.MAGENTA);
Root.setImageResource(R.drawable.a);
}
Please Help!