简体   繁体   中英

How to fix error "Resource ID #0x7f0600c3 type #0x4 is not valid"

I using gridview with scroll horizontal include 5 1 row, 5 column display data and using code set weight, height for it:

int widthCell = getActivity().getResources().getDimensionPixelSize(R.dimen.widthCell);
int heightCell = getActivity().getResources().getDimensionPixelSize(R.dimen.heightCell);

But for phone samsum or oppo failed: "Resource ID #0x7f0600c3 type #0x4 is not valid". I don't know how to fix this error. Can you help me? Thanks

<resources>  <dimen name="custom_marker_image">50dp</dimen>   <dimen name="custom_marker_padding">2dp</dimen>
<resources/>

So, go to res > values > dimensions.xml and right there include this code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM