Realm和Gson的集成使用
GSON
GSON is a library created by Google for deserializing and serializing JSON. When using Realm with GSON 2.3.1 (latest version), you have to specify an ExclusionStrategy.
1 | // Using the User class |
GSON is a library created by Google for deserializing and serializing JSON. When using Realm with GSON 2.3.1 (latest version), you have to specify an ExclusionStrategy.
1 | // Using the User class |
Original Link : https://github.com/macdao/ocds-guide-to-setting-up-mac/blob/master/README.md
ios:r,g,b,alpha
android:#aarrggbb
rgb直接对应,转成16进制就可以了
alpha:alpha_android = alpha_ios*255转成16进制
一般在Activity里使用Toolbar如下:
toolbar.xml
1 | <?xml version="1.0" encoding="utf-8"?> |
下面这个布局文件基本上描述了这几种Layout的用法。
用shell脚本和php脚本就可以做到自动签到,为了避免签到时间完全一样被后台识别,签到的时间随机在一个范围内
View pager that i created loads three pages at a time. now if i swipe from page 1 to 2 then to 3.when the third page is the current item,the first page(fragment) goes to onPause().now if i swipe to second page,1st page comes to onResume() even though the page 1 is still not visible to the user. So my question is how to distinguish between the first and second page in code?for example if i have to run a piece of code when the fragment is visible, how is that done?