SuperTextView

ASP.NET给图片自动添加水印 先建一个类,感觉注释已经很详细了,有不懂的欢迎评论 using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Web; namespace shuiyin {... 阅读详情

    SuperTextView 是TextView的升级版,可以实现TextView的全部功能,但SuperTextView比TextView的功能更加强大,在此空间中可以将文字,图片,其他控件(如CheckBox)等。

    先来看一下效果

      

    一.在module的build.gradle中添加依赖

compile 'com.allen.supertextview:supertextview:1.0.1'

    二.XML布局

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:stv="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="zhiyuan3g.com.mysupertextview.MainActivity">

    <com.allen.supertextviewlibrary.SuperTextView
        android:id="@+id/main_super_textView"
        android:layout_width="match_parent"
        android:layout_height="100dp"
        stv:sLeftBottomTextString="招商银行8888"
        stv:sLeftBottomTextString2="限额说明"
        stv:sLeftIconRes="@drawable/bank"
        stv:sLeftTopTextString="银行卡支付"
        stv:sRightCheckBoxRes="@drawable/circle_false"
        stv:sRightCheckBoxShow="true"
        stv:sLineShow="top"
        >

    </com.allen.supertextviewlibrary.SuperTextView>

</RelativeLayout>

    三.Java代码

public class MainActivity extends AppCompatActivity {

    private SuperTextView superTextView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        superTextView= (SuperTextView) findViewById(R.id.main_super_textView);
        //设置其一些属性
        superTextView.setCbChecked(true)
                .setLeftBottomString("建设银行");
//                .setLeftString("hahaha")
//                .setLeftTVColor(10);
//                .setLeftTopString("")
//                .setLeftTopTVColor(Color.GREEN);
//                .setLeftBottomString("")
//                .setLeftBottomTVColor(0)
//                .setLeftBottomString2("")
//                .setLeftBottomTVColor2(0)
//                .setRightString("")
//                .setRightTVColor(0)
//                .setCbChecked(true)
//                .setRightString("")
//                .setRightTVColor(0)
//                .setLeftString("");
        //设置监听器
        superTextView.setOnSuperTextViewClickListener(new SuperTextView.OnSuperTextViewClickListener(){

            //点击整个SuperTextView时回调
            @Override
            public void onSuperTextViewClick() {
                super.onSuperTextViewClick();
                //do SomeThing
            }

            //点击左上角时回调
            @Override
            public void onLeftTopClick() {
                super.onLeftTopClick();
                //do SomeThing
            }

            //点击左下角时回调
            @Override
            public void onLeftBottomClick() {
                super.onLeftBottomClick();
                //do SomeThing
            }

            //点击左下角时回调
            @Override
            public void onLeftBottomClick2() {
                super.onLeftBottomClick2();
                //do SomeThing
            }
        });
    }
}


ASP.NET实现图片横向滚动功 最近接手了王总的一个.NET目,做着还挺有感觉,之前学过的知识又重拾起来了,收获很大!今天做的是前端的一个功能,要实现图片的滚动效果。之前没有做过类似的,所以查阅了很多资料,最终拼凑出来了,给大家分享一下。。 阅读详情

相关推荐

asp.net 导出excel带图片

//此方法20条数据导出需要10秒左右,效率太低了,有时间需要再优化,关键是能导出图片了。

云上人间钦自赏 4236

SuperTextView-一个功能强大的TextView,可以满足日常大部分布局方式,开发者可已自行组合属性配置出属于自己风格的样式!.zip

一个功能强大的TextView,可以满足日常大部分布局方式,开发者可已自行组合属性配置出属于自己风格的样式!     基本使用1.添加Gradle依赖    dependencies {     ...     compile 'com.allen.supertextview:supertextview:1.0.1'     }2.布局中如何使用    <com.allen.supertextviewlibrary.SuperTextView             android:id="@ id/super_tv"             android:layout_width="match_parent"             android:layout_height="80dp"             stv:sLeftBottomTextColor2="@color/colorAccent"             stv:sLeftBottomTextString="招商银行(8888)"             stv:sLeftBottomTextString2="限额说明>>"             stv:sLeftIconRes="@drawable/bank_zhao_shang"             stv:sLeftTopTextString="银行卡支付"             stv:sRightCheckBoxRes="@drawable/circular_check_bg"             stv:sRightCheckBoxShow="true"             stv:sLineShow="bottom"              />     注意:             1、上下的线可以通过   sLineShow 设置  有四种显示方式 none,top,bottom,both             2、通过设置 sUseRipple=true 开启水波效果3.代码中如何使用   /**  * 可以通过链式设置大部分常用的属性值  */     superTextView.setLeftIcon(drawable)             .setLeftString("")             .setLeftTVColor(0)             .setLeftTopString("")             .setLeftTopTVColor(0)             .setLeftBottomString("")             .setLeftBottomTVColor(0)             .setLeftBottomString2("")             .setLeftBottomTVColor2(0)             .setRightString("")             .setRightTVColor(0)             .setCbChecked(true)             .setCbBackground(drawable)             .setRightIcon(drawable)             .setRightString("")             .setRightTVColor(0)             .setLeftString("")             .setOnSuperTextViewClickListener(new SuperTextView.OnSuperTextViewClickListener() {                 @Override                 public void onSuperTextViewClick() {                     super.onSuperTextViewClick();                     //do something                 }                 @Override                 public void onLeftTopClick() {                     super.onLeftTopClick();                     //do something                 }                 @Override                 public void onLeftBottomClick() {                     super.onLeftBottomClick();                     //do something                 }                 @Override                 public void onLeftBottomClick2() {                     super.onLeftBottomClick2();                     //do something                 }             });4.点击事件(可根据需求选择实现某个点击事件)    superTextView.setOnSuperTextViewClickListener(new SuperTextView.OnSuperTextViewClickListener() {                 @Override                 public void onSuperTextViewClick() {                     super.onSuperTextViewClick();                     //do something                 }                 @Override                 public void onLeftTopClick() {                     super.onLeftTopClick();                     //do something                 }                 @Override                 public void onLeftBottomClick() {                     super.onLeftBottomClick();                     //do something                 }                 @Override                 public void onLeftBottomClick2() {                     super.onLeftBottomClick2();                     //do something                 }             });5.属性说明(以下属性全部可以通过xml文件配置和代码进行设置)    <declare-styleable name="SuperTextView">     <attr name="sLeftIconRes" format="reference"/>     <attr name="sRightIconRes" format="reference"/>     <attr name="sRightCheckBoxRes" format="reference"/>     <attr name="sLeftTextString" format="string"/>     <attr name="sCenterTextString" format="string"/>     <attr name="sRightTextString" format="string"/>     <attr name="sLeftTopTextString" format="string"/>     <attr name="sLeftBottomTextString" format="string"/>     <attr name="sLeftBottomTextString2" format="string"/>     <attr name="sTopLineMargin" format="dimension"/>     <attr name="sBottomLineMargin" format="dimension"/>     <attr name="sBothLineMargin" format="dimension"/>     <attr name="sLeftIconMarginLeft" format="dimension"/>     <attr name="sLeftTextMarginLeft" format="dimension"/>     <attr name="sLeftTopTextMarginLeft" format="dimension"/>     <attr name="sLeftBottomTextMarginLeft" format="dimension"/>     <attr name="sLeftBottomTextMarginLeft2" format="dimension"/>     <attr name="sRightIconMarginRight" format="dimension"/>     <attr name="sRightTextMarginRight" format="dimension"/>     <attr name="sRightCheckBoxMarginRight" format="dimension"/>     <attr name="sRightCheckBoxShow" format="boolean"/>     <attr name="sIsChecked" format="boolean"/>     <attr name="sUseRipple" format="boolean"/>     <attr name="sLeftTextSize" format="dimension"/>     <attr name="sLeftTopTextSize" format="dimension"/>     <attr name="sLeftBottomTextSize" format="dimension"/>     <attr name="sLeftBottomTextSize2" format="dimension"/>     <attr name="sRightTextSize" format="dimension"/>     <attr name="sCenterTextSize" format="dimension"/>     <attr name="sBackgroundColor" format="color"/>     <attr name="sLeftTextColor" format="color"/>     <attr name="sLeftTopTextColor" format="color"/>     <attr name="sLeftBottomTextColor" format="color"/>     <attr name="sLeftBottomTextColor2" format="color"/>     <attr name="sRightTextColor" format="color"/>     <attr name="sCenterTextColor" format="color"/>     <attr name="sLineShow" format="enum">         <enum name="none" value="0"/>         <enum name="top" value="1"/>         <enum name="bottom" value="2"/>         <enum name="both" value="3"/>     </attr> </declare-styleable>

ASP.NET MVC +Layui 实现图片上传功能

ASP.NET MVC +Layui 实现图片上传功能 这是一个前端的添加功能 只展示图片添加的前端代码 <div class="layui-upload"> <button type="button" class="layui-btn" id="ImgUrlbtn" style="float:left;"> <font color="red"></font>请选择图片 </button> <div class="layui-uploa

gods_boy的博客 2180

一个强大的SuperTextview

原文链接:http://p.codekk.com/detail/Android/lygttpod/SuperTextView SuperTextView 项目地址:lygttpod/SuperTextView  简介:一个功能强大的 TextView,可以满足日常大部分布局方式,开发者可已自行组合属性配置出属于自己风格的样式! 更多:作者   提 Bug    标签: TextView...

lanrenxiaowen的博客 1727

【ASP.NET】原生JavaScript加Asp.net实现多图片上传

记录一下,原生Javascript加asp.net实现多文件上传的方法。前台代码代码分为三个部分,一是HTML代码,二是Style样式代码,三是Javascript代码。在html中加入file控件,multiple设置为multiple,该控件主要是实现图片文件多选,并返回所选数据。添加2个DIV标签,一个ID设置为“progressBar”,用来显示上传进度。该标签包含两个子DIV标签,一个图形显示进度,一个文字显示进度。另一个ID设置为“picBox”,用

zhaoyang314的博客 1366

ASP.NET MVC 上传图片到项目目录中的文件夹并显示

因项目需求,需要一个上传图片并显示的功能,类似于上传头像并显示出来。查阅了网上资料,写了个Demo,希望能帮助到更多的人。此Demo基于ASP.NET MVC实现。 选择图片: 点击按钮进行上传: 一、先在项目中新建一个文件夹用于存放图片 二、View页面代码 @{ Layout = null; } <!DOCTYPE html> <html> <he...

机械键盘侠博客 3197

使用SuperTextView报错

如果报红说明地址出错了,需要重新配置最新的指令 如果报错 android.view.InflateException: Binary XML file line #139: Binary XML file line #139: Error inflating class <unknown> 需要添加​Kotlin资源库 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" ...

chezabo6116的博客 1602

在ASP.NET中把图片保存到SQL SERVER数据库

在ASP.NET中把图片保存到SQL SERVER数据库翻译:吕绍伟介绍在很多情况下,我们需要把图片保存到数据库中。在某些应用程序中,存在一些敏感信息不能被存储到文件系统中,因为存储在文件系统上的任何图片都很容易被用户非法获得。本文将讨论在ASP.NET中怎样把图片保存到SQL SERVER数据库中。在本文中我们将了解到以下几方面的内容:l         上载图片文件的要

comy的专栏 1895

第三方开源库:TextView相关

MarqueeViewDemogithub:https://github.com/gongwen/MarqueeViewLibrary 通过MarqueeFactory来提供各种样式的跑马灯View,支持自定义跑马灯ItemView。 下面是官方的README.md效果图使用Gradle:compile 'com.gongwen:marqueelibrary:1.0.4'属性 Attribu

Java技术博客,不再更新Android内容 2740

ASP.NET MVC 图片上传到服务器

今天在做项目中需要做一个功能是:把个人图片上传到服务器中,并把路径保存到数据库中!自己摸索着做了出来,但不是很完善,先记录下来,后台获取到前端传过来的文件进行上传!后台代码: /// &lt;summary&gt; /// 把图片上传到服务器并保存路径到服务器 /// &lt;/summary&gt; /// &lt;...

molixiangshi的博客 1万+

c# Asp.Net上传图片

c# Asp.Net上传图片 aspx页面 <asp:Image ID="imgBindShow" runat="server" /> <asp:FileUpload ID="uploadImage" runat="server" accept=".jpg,.png,.jpeg"/> <as...

大蛋的博客 1841

一个功能强大的 TextView,可以满足日常大部分布局方式,开发者可已自行组合属性配置出属于自己风格的样式!

一个功能强大的 TextView,可以满足日常大部分布局方式,开发者可已自行组合属性配置出属于自己风格的样式!

未来很长,但我会努力的走下去。 1994

ASP.NET图片盗链防护指南

图片盗链(Hotlinking)是指其他网站直接链接到你服务器上的图片资源,消耗你的带宽资源却不带来任何流量收益。某些浏览器或隐私模式可能不发送Referer头,需考虑合法用户的访问。// 盗链请求,返回替代图片或错误。搜索引擎爬虫通常有合法的Referer,需做例外处理。// 或者返回一个替代图片。// 合法请求,返回图片。使用令牌验证:为图片URL添加时效性令牌。带宽限制:对可疑IP进行带宽限制。设置CORS策略:限制跨域请求。日志监控:记录可疑的盗链行为。CDN服务可能需要特殊配置。

2501_91207543的博客 883

asp.net存储和读取数据库图片

1. 创建asp.net web窗体项目 代码如下: <body> <form id="form1" runat="server"> <h2>上传图片</h2> <div> <asp:FileUpload ID="ful_image" runat="server" /&...

merciaMA的博客 2215

ASP.NET读取网络或本地图片显示

写这个的缘由是在CSDN看到的两个问题:1、抓取网络图片,不在本地保存而直接显示2、在站点服务器上某个磁盘的文件里有图片,想能够在网站上显示出来,图片文件夹不在站点目录 一、读取网络图片

IHandler的专栏 4757

ASP.NET 多张图片上传,并可以预览。

一、首先先上效果图: 1、上传前 2、上传后 二、主要使用控件:FileUpload,DataList展示多张图片 三、代码 1、前台aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProductZiZhiUpload.aspx.cs" Inherits="ProductZiZhiUpload" %...

liang15zhu的专栏 2051

SuperTextView:Android的超级textview

超文本视图 重磅推出SuperTextView2.x版本,属性参数索引1.x一些变化,1.x的用户升级2.x的时候请注意 1,功能描述 是一个功能强大的视图,可以满足日常的大部分布局样式,开发者可已自己组合属性配置出属于自己的风格的样式!可能描述起来没有概念,还是直接看效果图吧! 拥有shape文件的大部分属性,从此后写shape属性变得非常简单 只是SuperTextView的逻辑简化,其实功能并不差少哦,有兴趣的可以看看 如果觉得对你有用的话,点一下右上的星星赞一下吧! 2,效果 3,如何使用 3.1,Android Studio导入方法,添加Gradle依赖 先在项目根目录的build.gradle的存储库添加: allprojects { repositories { ... maven { url "h

SuperTextView-从未如此惊艳!一个超级的TextView.zip

简介欢迎使用SuperTextView,这篇文档将会向你展示如何使用这个控件来提高你构建项目的效率。CoverSuperTextView继承自TextView,它能够大量的减少布局的复杂程度,并且使得一些常见的效果变得十分容易实现且高效。同时,它内置了动画驱动,你只需要合理编写Adjuster,然后startAnim()就可以看到预期的动画效果。它仅仅是一个控件,所以你可以不费吹灰之力的在你的项目中集成使用。特点你从此不必再为背景图编写和管理大量文件了。重新优化的状态图功能使得你能够精确的控制状态图的大小,以及在SuperTextView中的位置。支持设置圆角,并且能够精确的控制圆角位置。能够轻松的实现控件边框效果。支持文字描边,这使得空心文字效果成为了可能。内置动画驱动,你只需配合Adjuster合理的使用即可。Adjuster的出现,使得你对控件的绘制过程具有了掌控权,良好的设计使得它能够完美的实现绝大部分你脑海中的效果。使用指南支持的属性SuperTextView十分方便的支持在xml中直接设置属性,并且你能够立即看到效果。就像你平时使用TextView一样方便。<SuperTextView     android:layout_width="50dp"     android:layout_height="50dp"     //设置圆角。会同时作用于填充和边框(如果边框存在的话)。     //如果要设置为圆形,只需要把该值设置为宽或长的1/2即可。      app:corner="25dp"       //设置左上角圆角     app:left_top_corner="true"     //设置右上角圆角     app:right_top_corner="true"     //设置左下角圆角     app:left_bottom_corner="true"     //设置右下角圆角     app:right_bottom_corner="true"     //设置填充颜色     app:solid="@color/red"       //设置边框颜色     app:stroke_color="@color/black"       //设置边框的宽度。     app:stroke_width="2dp"      //放置一个drawable在背景层上。默认居中显示。     //并且默认大小为SuperTextView的一半。     app:state_drawable="@drawable/emoji"       //设置drawable的显示模式。可选值如下:     // left、top、right、bottom、center(默认值)、     //leftTop、rightTop、leftBottom、rightBottom、     //fill(充满整个SuperTextView,此时会使设置drawable的大小失效)     app:state_drawable_mode="center"      //设置drawable的height     app:state_drawable_height="30dp"     //设置drawable的width     app:state_drawable_width="30dp"     //设置drawble相对于基础位置左边的距离     app:state_drawable_padding_left="10dp"     //设置drawble相对于基础位置上边的距离     app:state_drawable_padding_top="10dp"     // boolean类型。是否显示drawable。     //如果你想要设置的drawable显示出来,必须设置为true。     //当不想让它显示时,再设置为false即可。     app:isShowState="true"      //是否开启文字描边功能。     //注意,启用这个模式之后通过setTextColor()设置的颜色将会被覆盖。     //你需要通过text_fill_color来设置文字的颜色。     app:text_stroke="true"      // 文字的描边颜色。默认为Color.BLACK。     app:text_stroke_color="@color/black"     // 文字描边的宽度。     app:text_stroke_width="1dp"     // 文

上一篇: 使用ZXing实现二维码扫描
下一篇: 视图动画
land_kun
博客等级 码龄10年 5粉丝 47原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值