0

this is my first query and I'm hoping I could get some help

I have a basic register pop up that looks like this -> Register pop-up

as you can see the border I already have as blue, however I cant find a way to change the title background and text colours. Perhaps I'm just over looking somewhere, if I am please guide me to that discussion. This is how I have created the pop-up ->

public class Pop extends Activity//go to manifest and type in <activity name = "pop"/> to incluse this
{
    EditText name,password;
    Button btnRegister;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.register_popup);

        name = (EditText) findViewById(R.id.txtRegName);
        password = findViewById(R.id.txtRegPass);
        btnRegister = findViewById(R.id.btnRegUser);

        
        DisplayMetrics dm = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(dm);

        
        int width = dm.widthPixels;
        int height = dm.heightPixels;

        getWindow().setLayout((int) (width * 0.9),(int) (height * 0.5));
 setTitle("Register")
}
}

and I have the following to change the text of the title like this ->

@Override
    public void setTitle(CharSequence title)
    {
        super.setTitle(title);

        TextView tv = new TextView(this);
        tv.setText(title);
    }

I have tried using this discussion to do it but it did not work-> How to set text color to a text view programmatically

Is there more to this like code in in the manifest and themes.xml or am I just going about this wrong?

Ruphael
  • 1
  • 1

0 Answers0