Gradle Android Rtl

A gradle plugin that auto generates the fixed RTL layout
Alternatives To Gradle Android Rtl
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Vue Grid Layout6,3831041543 days ago42August 03, 2022224mitJavaScript
A draggable and resizable grid layout, for Vue.js.
Mylinearlayout4,113
252 years ago42December 23, 201926mitObjective-C
MyLayout is a powerful iOS UI framework implemented by Objective-C. It integrates the functions with Android Layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,PathLayout,GridLayout,LayoutSizeClass to build your App 自动布局 UIView UITableView UICollectionView RTL
Pinlayout2,148
2916 days ago70December 18, 202014mitSwift
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]
Recyclertablayout1,289
4 years ago13apache-2.0Java
An efficient TabLayout library implemented with RecyclerView.
Tailwindcss Rtl29565 months ago12February 05, 202214mitJavaScript
Enabling bidirectional support on tailwindcss framework
Looping Layout254
2 months ago7March 31, 202116apache-2.0Kotlin
A looping LayoutManager for the Android RecyclerView.
R21612,945234 years ago12August 07, 20147JavaScript
a CSS LTR ∞ RTL converter for i18 friendly layouts
Ubtokenbar135
6 years ago2October 09, 20173mitSwift
Flexible and extensible UICollectionView based TokenBar written in Swift
Jqcollectionviewalignlayout63
12 years ago9January 14, 2021mitObjective-C
A custom layout object based on flow layout. Added supports for horizontal, vertical alignment and RTL direction of collection view items.(available for both UICollectionView and NSCollectionView)
Skiasharp.textblocks483a month ago19June 03, 2022mitC#
SkiaSharp.TextBlock adds text block and rich text layout to SkiaSharp
Alternatives To Gradle Android Rtl
Select To Compare


Alternative Project Comparisons
Readme

gradle-android-rtl

概述

用于自动修复布局文件中未添加RTL支持的标签,如果你有一个大工程需要处理。

Android RTL Support

Native RTL support in Android 4.2

Android Studio插件

在AndroidStudio中通过Refactor->Add RTL Support Where Possible... 可以调出自动修复工具,这个工具也挺方便的。

与该工具的差别:

  • 性能更好。在处理大批量文件修改时,用AS工具会出现卡顿
  • 支持padding标签的补齐

配置

buildscript {
    repositories {
        // ...
        maven { url "https://jitpack.io" }
    }
    dependencies {
        classpath 'com.github.znyang:gradle-android-rtl:0.0.4'
    }
}

apply plugin: 'com.zen.plugin.rtl'

rtl {
    from = fileTree("${project.projectDir}/src/main/res/layout/")
    // into = "${project.buildDir}/outputs/rtl/res/layout"
}

输出

gradle androidRtl

需要修复的layout文件会生成在rtl.into的目录下,可以在确认后覆盖到你的layout目录下,再进行一遍检查!

注:未定义rtl.into的情况下,修复的文件会直接覆盖原文件!

支持的标签如下:

{
    "layout_toLeftOf", "layout_toStartOf",
    "layout_toRightOf", "layout_toEndOf",

    "layout_marginLeft", "layout_marginStart",
    "layout_marginRight", "layout_marginEnd",

    "layout_alignLeft", "layout_alignStart",
    "layout_alignRight", "layout_alignEnd",

    "layout_alignParentLeft", "layout_alignParentStart",
    "layout_alignParentRight", "layout_alignParentEnd",

    "drawableLeft", "drawableStart",
    "drawableRight", "drawableEnd",
}

// padding只要存在left/right,就会补充四个标签
{
    "paddingLeft", "paddingStart",
    "paddingRight", "paddingEnd"
}

// 支持对以下标签的value替换(left->start, right->end)
{
    "layout_gravity",
    "gravity"
}

如何验证修复完善?

Android>Lint>Internationalization>Bidirectional Text

Popular Layout Projects
Popular Rtl Projects
Popular User Interface Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Layout
Gradle
Android Studio
Rtl
Gradle Plugin