Multi span TextView with Roboto fonts
Download the latest release or grab via Gradle:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.lndmflngs:roboto-span-view:1.0.2'
}
The simplest way is to use RobotoSpanView
like a normal TextView
<com.lockwood.multispan.roboto.RobotoTwoSpanView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:firstRobotoFont="medium"
app:firstText="Username"
app:firstSeparator=":"
app:orientation="vertical"
app:secondRobotoFont="regular"
app:secondText="Mr. Fluffypants" />
You can make your own spans like a AlignTopSuperscriptSpan and apply them in your custom views
For more information see app
directory
- compound-text-view - Change gravity of Image Drawable in TextView 🌌
- multispan-view - TextView with power of Spans 💪
- font-span-view - Multi span TextView with custom fonts
Found a bug? Have an idea for an improvement? Feel free to add an issue
Copyright (C) 2020 Ivan Zinovyev (https://github.com/lndmflngs)
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.