• Stars
    star
    245
  • Rank 165,304 (Top 4 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 10 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Advanced TextSwitcher for faster development.

AdvancedTextSwitcher

Advanced TextSwitcher for faster development.

Just like the way how Google+ display recent reviews on their cards.

仿照Google+在卡片上滚动显示最新评论的TextSwitcher。

Preview 预览

Snapshot

Watch Preview on Youtube

Add to your project 添加到你的项目

Add JitPack repository to build.gradle in project root.

在项目根目录下的build.gradle中加入以下内容

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Add the dependency to build.gradle in app root.

在应用目录下的build.gradle中加入以下依赖

dependencies {
        compile 'com.github.SumiMakito:AdvancedTextSwitcher:0.3'
}

You can also add this project as a library to your project directly.(NOT recommended)

Usage 使用说明

Import 导入
import sumimakito.android.advtextswitcher.*;
Add Widget in XML 在XML中加入控件
<sumimakito.android.advtextswitcher.AdvTextSwitcher
		xmlns:app="http://schemas.android.com/apk/res/sumimakito.android.advtextswitcher"
		android:id="@+id/advTextSwitcher"
		android:textColor="#66BCBB"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		app:textSize="32sp"
		app:gravity="center"
		app:inAnim="@android:anim/slide_in_left"
		app:outAnim="@android:anim/slide_out_right" />
Attributes 属性
  • xmlns:app (Don't forget to copy the xmlns:app line.)
  • android:textColor Text color.
  • app:textSize Text size.
  • app:gravity Gravity for each text.(Only support center/left/right, CENTER_VERTICAL is automatically applied.)
  • app:inAnim/outAnim (Optional) Specify anim resources.
Attach AdvTextSwitcher in Java 在Java代码中调用
    //For example, the String array below contains four recent reviews.
    String[] texts = {"Anne: Great!", "Cathy: I do not think so.", "Jimmy: Cloning your repo...", "Aoi: This bug disappeared!"};
    advTextSwitcher = (AdvTextSwitcher) findViewById(R.id.advTextSwitcher);
    //Give them to AdvTextSwitcher
    advTextSwitcher.setTexts(texts);
    //Manually switch to the next text in the String array.
    advTextSwitcher.next();
    //Switch to the previous one.
    advTextSwitcher.previous();

    //Auto switch between texts every 5000ms.
    Switcher switcher = new Switcher(advTextSwitcher, 5000);
    switcher.start();
    //Pause
    switcher.pause();
    //Or use switcher in only one line...
    new Switcher().attach(advTextSwitcher).setDuration(5000).start();

    //Want to know which text is clicked?
    advTextSwitcher.setCallback(new AdvTextSwitcher.Callback(){
			    	@Override
		    		public void onItemClick(int position)
	    			{
		    		    Toast.makeText(MainActivity.this, "ITEM@"+position+" Clicked!", Toast.LENGTH_SHORT).show();
		    		}
    });

Donate & Support 捐赠与支持

Makito是一个自由的软件开发者,也是一名在校大学生。

欢迎您去查看我的其他开源项目,同时也欢迎通过打赏支持我一下。感谢

支付宝/AliPay

826257232#qq.com (#请换成@)

微信支付

PayPal

sumimakito#hotmail.com (replace # with @)

Copyright & License 版权信息与授权协议

Copyright © 2014-2015 Sumi Makito

Licensed under Apache License 2.0 License.

Copyright 2014-2015 Sumi Makito

Licensed 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.

More Repositories

1

AwesomeQRCode

An awesome QR code generator for Android.
Kotlin
1,886
star
2

Awesome-qr.js

An awesome QR code generator written in JavaScript.
JavaScript
1,668
star
3

hexo-theme-typography

Rediscover the beauty of typography.
JavaScript
660
star
4

hexo-theme-Journal

隻言片語・於此匯聚 – Moments piled up. Live demo →
CSS
305
star
5

QuickKV

Lightweight & Easy-to-use Key-Value Library for Android Projects.
Java
132
star
6

AwesomeQRCode-Kotlin

AwesomeQRCode in Kotlin.
Kotlin
61
star
7

GitPro

Use GitHub Like a Pro
CSS
36
star
8

A-star

A*(A-star) pathfinding algorithm in C++
C++
33
star
9

DroidCurvesView

A custom view for Android inspired by Curves Tool in Photoshop.
Java
27
star
10

RhythmView

Kotlin
26
star
11

NeteaseCloudMusic-Now-Playing

C
24
star
12

ReinaDownloader

Multi-thread & Multi-task downloading library for Android projects.
Java
21
star
13

BiliNyan-Android

一个 Material Design 风格的第三方哔哩哔哩 Android 客户端
Java
12
star
14

Chrome-GitHub-Feed-Moderator

CSS
10
star
15

webpxmux.js

A JavaScript library for muxing and demuxing animated WebP images and encoding and decoding WebP images.
JavaScript
10
star
16

Chrome-qwq

The naughtiest qwq that you have never ever seen before.
JavaScript
7
star
17

Stacktodo

A todo list* powered by React.js, Django and PostgreSQL. (*demo)
JavaScript
4
star
18

MaglevIO

An easy-to-use and efficient Java I/O library. Based on Java NativeIO.
Java
4
star
19

raft

An implementation of the Raft distributed consensus algorithm in Go.
Go
4
star
20

chocola-js

4
star
21

sumimakito

3
star
22

HimitsuQR

加密二维码,让二维码更安全。
Java
3
star
23

Decompiled-Chongcai

#Abandoned
3
star
24

apple-watch-rgb

RGB light for your 🎃 (maybe)
Swift
2
star
25

Naive-Solver-for-Word-Guessing-Games

A general but naïve solver for word guessing games.
Python
2
star
26

hexo-renderer-pejs

PEJS renderer for Hexo
1
star
27

Sandcastle-Quality-Tracker

1
star
28

Apple-Watch-RGB

RGB light for your 🎃 (maybe)
Swift
1
star
29

ffmpeg-dmx4a

Modified version of FFmpeg which is used in DMX4A, the core of Bilisound.
1
star
30

TiebaEmailExtractor

Extract email addresses easily.
Java
1
star
31

BuildMaid-CI-Test-Android

Kotlin
1
star
32

uTickets

TypeScript
1
star
33

EFEFDouga

二匚二匚動画です
HTML
1
star