हाय मेरे पास मेरे टैब विजेट में दो टैब हैं, मैं दो टैब के लिए दो अलग-अलग रंगों को लागू करना चाहता हूं। हर जगह खोज कर, ज्यादातर टैब रंग लागू करते समय समान होते हैं।क्या एंड्रॉइड में चयनित टैब का रंग बदलना संभव है?
अद्यतन
पहला टैब जब चयनित लाल रंग
दूसरे टैब जब चयनित नीले रंग
यहाँ मेरी कोड
tabHost = (TabHost)findViewById(android.R.id.tabhost);
TabSpec firstTabSpec = tabHost.newTabSpec("tid1");//these are color red
TabSpec secondTabSpec = tabHost.newTabSpec("tid1");//these color blue
firstTabSpec.setIndicator("Sales Info",getResources().getDrawable(R.drawable.sales));
Intent photosIntent = new Intent(this, a.class);
firstTabSpec.setContent(photosIntent);
secondTabSpec.setIndicator("Service Info",getResources().getDrawable(R.drawable.services));
Intent photosIntent1 = new Intent(this, b.class);
secondTabSpec.setContent(photosIntent1);
tabHost.addTab(firstTabSpec);
tabHost.addTab(secondTabSpec);
कृपया मेरा प्रश्न अपडेट करें – Mercy
@micro: कृपया मेरा अपडेट देखें जवाब। – Hiral
धन्यवाद, आप इसके कामकाज को हायरल करते हैं, लेकिन मैं कलरग्रीन (0xCFEB5D) का रंग कोड (color.GREEN) के बजाय लागू करता हूं। यह काम क्यों नहीं कर रहा है? – Mercy