So I am trying to add an image under the text at the splash screen but I get this error when I build the app Error:(26, 22) String types not allowed (at 'src' with value 'drawable/appimage.jpg').
<ImageView
android:padding="15dp"
android:layout_width="350dp"
android:layout_height="345dp"
android:src="drawable/appimage.jpg"
android:id="@+id/imageView"
android:layout_below="@+id/textView"
android:layout_centerHorizontal="true"
android:layout_marginTop="25dp"
android:background="@color/black"
android:layout="@+id/imageview"
/>
If I remove the image code , I don't get any error. Here is My splash activity code
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Window;
import android.view.WindowManager;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_splash);
final Thread thread = new Thread() {
@Override
public void run() {
super.run();
synchronized (this) {
try {
wait(2000);
startActivity(new Intent(SplashActivity.this, HomeActivity.class));
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
finish();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
};
thread.start();
}
}
I am a newbie android studio user so references for further learning shall be highly appreciated.