Android Service içinde findViewById kullanımı ?

27 views
Skip to first unread message

Sertunc SELEN

unread,
Nov 1, 2014, 4:11:53 AM11/1/14
to andro...@googlegroups.com

Merhabalar arkadaşlar aşağıda ki metodu service içinde kullanmak istiyorum lakin findViewById kısmında hata alıyorum nasıl çözebilirim.Teşekkürler,Saygılar

public Bitmap takeScreenshot()

 { 

View rootView = findViewById(android.R.id.content).getRootView(); rootView.setDrawingCacheEnabled(true); return rootView.getDrawingCache(); 

}

Ebubekir tabak

unread,
Nov 2, 2014, 4:12:20 AM11/2/14
to andro...@googlegroups.com
servisler görsel komponet barındırmayan yapılar oldukları için findviewbyıdyi serviste kullanamazsın onun yerine bir dialog sınıfı yazıp görüntüyü diyalogda gösterebilirsin.
Reply all
Reply to author
Forward
0 new messages