I was wondering what would happen if I wrote one code in XML and another in Java.
I had this code in my program:
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
public class ActivityName extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// remove title
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
}
While in my Manifest I had this:
<activity android:name=".ActivityName"
android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar">
</activity>
My application started with no issues but ran the Java code and not what I had in XML. I assume this is true for all XML edits but wanted to make sure, if I had a Java code that is similar to XML with a bit of differences, would it use my XML format or Java code?