You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2020/07/10 06:50:41 UTC

[GitHub] [incubator-weex] weex-bot removed a comment on pull request #3242: [Android] Textarea supports LineHeight

weex-bot removed a comment on pull request #3242:
URL: https://github.com/apache/incubator-weex/pull/3242#issuecomment-656068817


   
   <!--
     4 failure:  AndroidLint Result, <section class="s..., AndroidLint Result, <section class="s...
     0 warning: 
     
     
     DangerID: danger-id-androidlint;
   -->
   
   <table>
     <thead>
       <tr>
         <th width="50"></th>
         <th width="100%" data-danger-table="true">Fails</th>
       </tr>
     </thead>
     <tbody><tr>
         <td>:no_entry_sign:</td>
         <td>AndroidLint Result</td>
       </tr>
     
   <tr>
         <td>:no_entry_sign:</td>
         <td>
   
     <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="NewApiCard" style="display: block;">
               <div class="mdl-card mdl-cell mdl-cell--12-col">
     <div class="mdl-card__title">
       <h2 class="mdl-card__title-text">Calling new methods on older versions</h2>
     </div>
                 <div class="mdl-card__supporting-text">
   <div class="issue">
   <div class="warningslist">
   <span class="location"><a href="../../src/main/java/org/apache/weex/ui/component/AbstractEditComponent.java">../../src/main/java/org/apache/weex/ui/component/AbstractEditComponent.java</a>:171</span>: <span class="message">Call requires API level 28 (current min is 14): android.widget.TextView#setLineHeight</span><br /><pre class="errorlines">
   <span class="lineno">  168 </span>      <span class="keyword">int</span> lineHeight = WXStyle.getLineHeight(getStyles(),getViewPortWidth());
   <span class="lineno">  169 </span>      <span class="keyword">if</span> (lineHeight != UNSET){
   <span class="lineno">  170 </span>        mLineHeight = lineHeight;
   <span class="caretline"><span class="lineno">  171 </span>        getHostView().<span class="error">setLineHeight</span>(mLineHeight);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
   <span class="lineno">  172 </span>      }
   <span class="lineno">  173 </span>
   <span class="lineno">  174 </span>      <span class="keyword">if</span> (fontSize != UNSET)
   </pre>
   
   <span class="location"><a href="../../src/main/java/org/apache/weex/ui/component/AbstractEditComponent.java">../../src/main/java/org/apache/weex/ui/component/AbstractEditComponent.java</a>:171</span>: <span class="message">Call requires API level 28 (current min is 14): android.widget.TextView#setLineHeight</span><br /><pre class="errorlines">
   <span class="lineno">  168 </span>      <span class="keyword">int</span> lineHeight = WXStyle.getLineHeight(getStyles(),getViewPortWidth());
   <span class="lineno">  169 </span>      <span class="keyword">if</span> (lineHeight != UNSET){
   <span class="lineno">  170 </span>        mLineHeight = lineHeight;
   <span class="caretline"><span class="lineno">  171 </span>        getHostView().<span class="error">setLineHeight</span>(mLineHeight);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
   <span class="lineno">  172 </span>      }
   <span class="lineno">  173 </span>
   <span class="lineno">  174 </span>      <span class="keyword">if</span> (fontSize != UNSET)
   </pre>
   
   </div>
   <div class="metadata"><div class="explanation" id="explanationNewApi" style="display: none;">
   This check scans through all the Android API calls in the application and warns about any calls that are not available on <b>all</b> versions targeted by this application (according to its minimum SDK attribute in the manifest).<br/>
   <br/>
   If you really want to use this API and don't need to support older devices just set the <code>minSdkVersion</code> in your <code>build.gradle</code> or <code>AndroidManifest.xml</code> files.<br/>
   <br/>
   If your code is <b>deliberately</b> accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the <code>@TargetApi</code> annotation specifying the local minimum SDK to apply, such as <code>@TargetApi(11)</code>, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level.<br/>
   <br/>
   If you are deliberately setting <code>android:</code> attributes in style definitions, make sure you place this in a <code>values-v</code><i>NN</i> folder in order to avoid running into runtime conflicts on certain devices where manufacturers have added custom attributes whose ids conflict with the new ones on later platforms.<br/>
   <br/>
   Similarly, you can use tools:targetApi="11" in an XML file to indicate that the element will only be inflated in an adequate context.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
   To suppress this error, use the issue id "NewApi" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
   <br/></div>
   </div>
   </div>
   <div class="chips">
   <span class="mdl-chip">
       <span class="mdl-chip__text">NewApi</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Correctness</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Error</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Priority 6/10</span>
   </span>
   </div>
                 </div>
                 <div class="mdl-card__actions mdl-card--border">
   <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationNewApiLink" onclick="reveal('explanationNewApi');">
   Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="NewApiCardLink" onclick="hideid('NewApiCard');">
   Dismiss</button>            </div>
               </div>
             
     </td>
       </tr>
     
   <tr>
         <td>:no_entry_sign:</td>
         <td>AndroidLint Result</td>
       </tr>
     
   <tr>
         <td>:no_entry_sign:</td>
         <td>
   
     <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="NewApiCard" style="display: block;">
               <div class="mdl-card mdl-cell mdl-cell--12-col">
     <div class="mdl-card__title">
       <h2 class="mdl-card__title-text">Calling new methods on older versions</h2>
     </div>
                 <div class="mdl-card__supporting-text">
   <div class="issue">
   <div class="warningslist">
   <span class="location"><a href="../../src/main/java/org/apache/weex/ui/component/AbstractEditComponent.java">../../src/main/java/org/apache/weex/ui/component/AbstractEditComponent.java</a>:171</span>: <span class="message">Call requires API level 28 (current min is 14): android.widget.TextView#setLineHeight</span><br /><pre class="errorlines">
   <span class="lineno">  168 </span>      <span class="keyword">int</span> lineHeight = WXStyle.getLineHeight(getStyles(),getViewPortWidth());
   <span class="lineno">  169 </span>      <span class="keyword">if</span> (lineHeight != UNSET){
   <span class="lineno">  170 </span>        mLineHeight = lineHeight;
   <span class="caretline"><span class="lineno">  171 </span>        getHostView().<span class="error">setLineHeight</span>(mLineHeight);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
   <span class="lineno">  172 </span>      }
   <span class="lineno">  173 </span>
   <span class="lineno">  174 </span>      <span class="keyword">if</span> (fontSize != UNSET)
   </pre>
   
   <span class="location"><a href="../../src/main/java/org/apache/weex/ui/component/AbstractEditComponent.java">../../src/main/java/org/apache/weex/ui/component/AbstractEditComponent.java</a>:171</span>: <span class="message">Call requires API level 28 (current min is 14): android.widget.TextView#setLineHeight</span><br /><pre class="errorlines">
   <span class="lineno">  168 </span>      <span class="keyword">int</span> lineHeight = WXStyle.getLineHeight(getStyles(),getViewPortWidth());
   <span class="lineno">  169 </span>      <span class="keyword">if</span> (lineHeight != UNSET){
   <span class="lineno">  170 </span>        mLineHeight = lineHeight;
   <span class="caretline"><span class="lineno">  171 </span>        getHostView().<span class="error">setLineHeight</span>(mLineHeight);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
   <span class="lineno">  172 </span>      }
   <span class="lineno">  173 </span>
   <span class="lineno">  174 </span>      <span class="keyword">if</span> (fontSize != UNSET)
   </pre>
   
   </div>
   <div class="metadata"><div class="explanation" id="explanationNewApi" style="display: none;">
   This check scans through all the Android API calls in the application and warns about any calls that are not available on <b>all</b> versions targeted by this application (according to its minimum SDK attribute in the manifest).<br/>
   <br/>
   If you really want to use this API and don't need to support older devices just set the <code>minSdkVersion</code> in your <code>build.gradle</code> or <code>AndroidManifest.xml</code> files.<br/>
   <br/>
   If your code is <b>deliberately</b> accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the <code>@TargetApi</code> annotation specifying the local minimum SDK to apply, such as <code>@TargetApi(11)</code>, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level.<br/>
   <br/>
   If you are deliberately setting <code>android:</code> attributes in style definitions, make sure you place this in a <code>values-v</code><i>NN</i> folder in order to avoid running into runtime conflicts on certain devices where manufacturers have added custom attributes whose ids conflict with the new ones on later platforms.<br/>
   <br/>
   Similarly, you can use tools:targetApi="11" in an XML file to indicate that the element will only be inflated in an adequate context.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
   To suppress this error, use the issue id "NewApi" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
   <br/></div>
   </div>
   </div>
   <div class="chips">
   <span class="mdl-chip">
       <span class="mdl-chip__text">NewApi</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Correctness</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Error</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Priority 6/10</span>
   </span>
   </div>
                 </div>
                 <div class="mdl-card__actions mdl-card--border">
   <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationNewApiLink" onclick="reveal('explanationNewApi');">
   Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="NewApiCardLink" onclick="hideid('NewApiCard');">
   Dismiss</button>            </div>
               </div>
             
     </td>
       </tr>
     </tbody>
   </table>
   
   
   
   
   <p align="right">
     Generated by :no_entry_sign: <a href="https://danger.systems/js">dangerJS</a> against 120a867b3dbee0018b486086a6516ad8f7f44da4
   </p>
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org