Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
gedoor committed Apr 13, 2019
1 parent 75c6e5f commit a0de31d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
16 changes: 16 additions & 0 deletions app/src/main/assets/updateLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@

**2019/04/12**
* WebDav恢复时添加存储权限检查
* 书源调试添加时间戳
* 自定义js方法
```renderscript
//获取网页内容,url支持搜索url规则
java.ajax(url)
//base64解码
java.base64Decoder(string)
//设置需解析的内容Object
java.setContent(html)
//输入规则String获取文本列表List<String>
java.getStringList(rule)
//输入规则String获取文本String
java.getString(rule)
//输入规则String获取节点列表List<Object>
java.getElements(ruleStr)
```

**2019/04/09**
* 发现规则支持js生成规则文本, \<js>\</js>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,7 @@ private void initTabLayout() {
for (int i = 0; i < mTlIndicator.getTabCount(); i++) {
TabLayout.Tab tab = mTlIndicator.getTabAt(i);
if (tab == null) return;
if (i == 0) { //设置第一个Item的点击事件(当下标为0时触发)
tab.setCustomView(tab_icon(mTitles[i], R.drawable.ic_arrow_drop_down_black_24dp));
} else {
tab.setCustomView(tab_icon(mTitles[i], R.drawable.ic_arrow_drop_down_black_24dp));
}
tab.setCustomView(tab_icon(mTitles[i]));
View customView = tab.getCustomView();
if (customView == null) return;
TextView tv = customView.findViewById(R.id.tabtext);
Expand Down Expand Up @@ -316,18 +312,14 @@ private void updateTabItemText(int group) {
tab.setContentDescription(String.format("%s,%s", tv.getText(), getString(R.string.click_on_selected_show_menu)));
}

private View tab_icon(String name, Integer iconID) {
private View tab_icon(String name) {
@SuppressLint("InflateParams")
View tabView = LayoutInflater.from(this).inflate(R.layout.tab_view_icon_right, null);
TextView tv = tabView.findViewById(R.id.tabtext);
tv.setText(name);
ImageView im = tabView.findViewById(R.id.tabicon);
if (iconID != null) {
im.setVisibility(View.VISIBLE);
im.setImageResource(iconID);
} else {
im.setVisibility(View.GONE);
}
im.setVisibility(View.VISIBLE);
im.setImageResource(R.drawable.ic_arrow_drop_down_black_24dp);
return tabView;
}

Expand Down

0 comments on commit a0de31d

Please sign in to comment.