Android-NiceTab
Android-NiceTab copied to clipboard
Cost too much CPU on refresh Draw
Usage in Layout xml:
<me.amiee.nicetab.NiceTabLayout
android:id="@+id/sliding_nice_tabs"
android:layout_width="match_parent"
android:layout_height="30dp"
android:background="?colorPrimary"
app:ntlDividerPaddingLeft="8dp"
app:ntlDividerPaddingRight="8dp"
app:ntlIndicatorHeight="2dp"
app:ntlOverlayColor="#aa1a237e"
app:ntlTabMode="titleOnly"
app:ntlTextSize="18sp"
app:ntlTextStyle="normal"
app:ntlUnderlineHeight="1dp"
/>
Detect by memory working history, as attached
The sample APK also have the same trouble. CPU usage nearly 40% when app is on top and be idle.
OS: Android 5.0.2(HTC one/802D) Android buildToolsVersion "23.0.3"; targetSdkVersion 23 (with gradle:2.1.2)
and more... when I choose sample apk mode as "only image, no text"。 everything will be silent. It seems like text on tabs make the views redraw continuously!!!
And more messages
when settting:
app:ntlShowUnderline="false"
The trouble will be avoided.
SO, the bug is from:
NiceTabStrip.drawUnderline()