ViewPagerThe background is gray. I cannot find any clear article on the Internet that shows how easy it is to change this background color to black, for example. Any idea would be appreciated.
ViewPager
You can achieve this in two ways,
1. Add the following to ViewPagerin xml
android:background="#000000"
2. Give dynamically, as shown below,
ViewPager pager= (ViewPager)findViewById(R.id.pager); pager.setBackgroundColor(Color.BLACK);
try it
private ViewPager mPager; mPager = (ViewPager) view.findViewById(R.id.pager); mPager.setBackgroundColor(Color.BLACK);
A ViewPager , , ViewGroup s, .
ViewGroup
, android:windowBackground , .
android:windowBackground
You can install android:background="@android:color/transparent"in ViewPagerto your XML file
android:background="@android:color/transparent"
and set android:background="@android:color/black"for parent layout.
android:background="@android:color/black"
Hope this helps.
Source: https://habr.com/ru/post/1538408/More articles:How to change label value using javascript - javascriptFirefox SDK: how to make a trigger for a specific domain - firefox-addonHAProxy restricts single backend over ip range - ubuntuUnable to get image next to another image - htmlLike Mock HttpRuntime.AppDomainAppPath - c # -4.0Python / SQLite3 output in WHERE-clause - pythonTesting Angular $ q qith Jasmine 2 and Karma - angularjsSplit a nested list into separate lists - javascriptRandom x-axis positions - (Sprite Kit, IOS) - objective-cTomcat "Access-Control-Allow-Origin" and JavaScript - javascriptAll Articles