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 .
// Color
mRecyclewView.setKeyColor()
mRecyclewView.setValueTextColor()
mRecyclewView.setValueNumberColor()
mRecyclewView.setValueUrlColor()
mRecyclewView.setValueNullColor()
mRecyclewView.setBracesColor()
// TextSize
mRecyclewView.setTextSize()复制代码
如果觉得《android studio json格式化 Android json格式化显示 可展开与折叠》对你有帮助,请点赞、收藏,并留下你的观点哦!