SORU
21 Ocak 2011, Cuma


Nasıl beyaz programlı olarak Faaliyet arka plan rengini ayarlamak için?

Nasıl beyaz programlama yoluyla bir Aktivite arka plan rengini ayarlayabilir miyim?

CEVAP
21 Ocak 2011, Cuma


Bir kolu kök düzeni kullanılmış için arka plan rengini ayarlayın. Kök düzeni ile setContentView ne diye.

 setContentView(R.layout.main);

  // Now get a handle to any View contained 
  // within the main layout you are using
  View someView = findViewById(R.id.randomViewInMainLayout);

  // Find the root view
  View root = someView.getRootView()

  // Set the color
  root.setBackgroundColor(getResources().getColor(android.R.color.red));

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • AutoklubZAPRESIC

    AutoklubZAPR

    17 Mayıs 2011
  • jonathepianist

    jonathepiani

    31 Temmuz 2008
  • kidrauhl

    kidrauhl

    15 Ocak 2007