forked from apache/incubator-weex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-0.17-gitlab' into release-0.16-gitlab
* release-0.17-gitlab: Weex render and other thin but critical issues should be classify to render container by call render of exception callback close apache#920 * [android] remove override post and postDelayed, wrap anonymous Runnable with WXThread.secure() close apache#919 * [android] clear box-shadow when component has recycled close apache#917 * [android] support multi box-shadow close apache#915 * [doc] doc references: update weex.config.bundleUrl's description close apache#909 [WEEX-145][iOS]fix: Crash in WXScrollerComponent scrollViewDidScroll,Collection NSHashTable was mutated while being enumerated close apache#910 * [android] support role property to accessibility * [android] add license header close apache#912 * [android] remove cn strings * [android] fix en role [WEEX-138][android]WXParallax wat not reseted to right position, when scrollToElement with animated:false option. dx dy is zero when recycleview use scrollToPosition close apache#906 [WEEX-142][android] PullToRefresh Loading Support Scroll Back when touch not release close apache#905 [WEEX-140][android]layout animation supported more property close apache#904
- Loading branch information
Showing
57 changed files
with
1,285 additions
and
464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...nd/app/src/main/java/com/alibaba/weex/extend/adapter/DefaultAccessibilityRoleAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package com.alibaba.weex.extend.adapter; | ||
|
||
import android.text.TextUtils; | ||
|
||
import com.taobao.weex.adapter.IWXAccessibilityRoleAdapter; | ||
|
||
import java.util.HashMap; | ||
import java.util.Locale; | ||
import java.util.Map; | ||
|
||
/** | ||
* Created by moxun on 2017/11/13. | ||
*/ | ||
|
||
public class DefaultAccessibilityRoleAdapter implements IWXAccessibilityRoleAdapter { | ||
private static Map<String, String> ENRoles = new HashMap<>(); | ||
|
||
static { | ||
ENRoles.put("button", "Button"); | ||
ENRoles.put("link", "HyperLink"); | ||
ENRoles.put("img", "Picture"); | ||
ENRoles.put("search", "Search"); | ||
ENRoles.put("header", "Title"); | ||
} | ||
|
||
@Override | ||
public String getRole(String key) { | ||
if (isEN()) { | ||
String enRole = ENRoles.get(key); | ||
if (!TextUtils.isEmpty(enRole)) { | ||
return enRole; | ||
} | ||
} | ||
return key; | ||
} | ||
|
||
private static boolean isEN() { | ||
try { | ||
return "EN".equals(Locale.getDefault().getCountry()); | ||
} catch (Throwable t) { | ||
} | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.