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

  • boogie2988

    boogie2988

    6 NİSAN 2006
  • ItZWaffleS420

    ItZWaffleS42

    9 EYLÜL 2011
  • Photoshop Training Channel

    Photoshop Tr

    13 Temmuz 2012