ImageView and color
Description
You can even specify just a color, and the ImageView
will
display that color.
Example
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
// www . j a va 2 s .c om
<ImageView
android:id="@+id/image2"
android:layout_width="125dip"
android:layout_height="25dip"
android:src="#555555" />
</LinearLayout>
Java code
package com.java2s.myapplication3.app;
//from www . j a v a 2 s . com
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}