-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SuperTextView对分割线设置添加设置线宽和线的颜色值的方法,添加上下两个文字间距高度;新增CommonTextView类,是Su…
…perTextView的简化版,回归textview初心
- Loading branch information
Showing
12 changed files
with
1,040 additions
and
32 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/allen/supertextview/CommonTextViewActivity.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,17 @@ | ||
package com.allen.supertextview; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.support.v7.app.AppCompatActivity; | ||
|
||
/** | ||
* Created by allen on 2016/11/22. | ||
*/ | ||
|
||
public class CommonTextViewActivity extends AppCompatActivity { | ||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.common_textview_layout); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:ctv="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<com.allen.library.CommonTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
ctv:cLeftTextColor="@color/colorAccent" | ||
ctv:cLeftTextSize="15dp" | ||
ctv:cLeftTextString="帐号管理" | ||
ctv:cRightIconResForDrawableRight="@drawable/arrow_right_red" | ||
ctv:cShowDividerLineType="none" /> | ||
|
||
<com.allen.library.CommonTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
ctv:cLeftTextString="清除缓存" | ||
ctv:cRightIconResForDrawableRight="@drawable/arrow_right_red" | ||
ctv:cRightTextColor="@color/colorAccent" | ||
ctv:cRightTextString="20.5M" | ||
ctv:cShowDividerLineType="both" | ||
ctv:cUseRipple="true" /> | ||
|
||
<com.allen.library.CommonTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
ctv:cLeftIconResForDrawableLeft="@drawable/uu" | ||
ctv:cLeftTextColor="@color/colorAccent" | ||
ctv:cLeftTextSize="15dp" | ||
ctv:cLeftTextString="收获地址" /> | ||
|
||
<com.allen.library.CommonTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
ctv:cCenterTextString="中间文字" | ||
ctv:cLeftTextString="左边文字" | ||
ctv:cRightTextString="右边文字" /> | ||
|
||
<com.allen.library.CommonTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
ctv:cLeftIconResForDrawableLeft="@drawable/scatter_time" | ||
ctv:cLeftTextString="起息时间" | ||
ctv:cRightTextString="T+1日" /> | ||
|
||
<com.allen.library.CommonTextView | ||
android:visibility="gone" | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
ctv:cCenterIconResForDrawableTop="@drawable/scatter_use" | ||
ctv:cCenterTextString="还款方式" | ||
ctv:cLeftIconResForDrawableTop="@drawable/scatter_time" | ||
ctv:cLeftTextString="起息时间" | ||
ctv:cRightIconResForDrawableTop="@drawable/scatter_type" | ||
ctv:cRightTextString="截至日期" /> | ||
|
||
|
||
</LinearLayout> |
This file was deleted.
Oops, something went wrong.
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.