android studio json格式化,Android json格式化显示,可展开与折叠
Android JSON viewer, to convert JSON Strings to a Friendly Readable Format, it supports expend&collapsed JSON strings.
Dependencies
compile 'com.yuyh.json:jsonviewer:1.0.0'復制代碼
Usage
Step1
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:orientation="vertical">
android:id="@+id/rv_json"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
復制代碼step2
JsonRecyclerView mRecyclewView = findViewById(R.id.rv_json);
// bind json
mRecyclewView.bindJson("your json strings." || JSONObject || JSONArray);復制代碼
Code Style
The default code style is like www.json.cn.
// Color
mRecyclewView.setKeyColor()
mRecyclewView.setValueTextColor()
mRecyclewView.setValueNumberColor()
mRecyclewView.setValueUrlColor()
mRecyclewView.setValueNullColor()
mRecyclewView.setBracesColor()
// TextSize
mRecyclewView.setTextSize()復制代碼
總結
以上是生活随笔為你收集整理的android studio json格式化,Android json格式化显示,可展开与折叠的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 怪异的JavaScript系列(三)
- 下一篇: 系统更新荣耀play服务器,华为宣布:荣