alexoro/roboto-fonts


Roboto Fonts

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.alexoro:roboto-fonts:1.0'
	}
	dependencies {
		implementation("com.github.alexoro:roboto-fonts:1.0")
	}
	<dependency>
	    <groupId>com.github.alexoro</groupId>
	    <artifactId>roboto-fonts</artifactId>
	    <version>1.0</version>
	</dependency>

                            
    libraryDependencies += "com.github.alexoro" % "roboto-fonts" % "1.0"
        
        

                            
    :dependencies [[com.github.alexoro/roboto-fonts "1.0"]]
        
        

Readme


Fluid Horizontal Layout

Android Custom View Group, that acts like a Horizontal LinearLayout, but allows one element to be a various size and not pushing next Views out of screen.

For example, you have a View of 3 items: 1) User avatar 2) Message's body 3) Message's time

Imagine, that you want to show these items in one line and allow message's body be wrap_content, but not push message's time out of screen. There's no default Android ViewGroup for such case.

See the difference on the image below. The blue is the message's time is pushed out of screen by text by LinearLayout. Fluid horizontal layout leaves it and reduces the text size.

<img src="https://raw.githubusercontent.com/alexoro/fluid-horizontal-layout/master/docs/diff.png" width="240">

How to include in project

Library is distributed via jitpack.io

// Add this lines into your roou build.gradle
allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}
// Add dependency to library in any target project module
dependencies {
    compile 'com.github.alexoro:fluid-horizontal-layout:VERSION'
}

Usage

It is important to mark the fluid View with app:layout_isFluid. View will crash if no fluid view is found or more than 1 fluid view is found.

<com.alexoro.fluidhorizontallayout.FluidHorizontalLayout
    android:layout_width="wrap_content"
    android:layout_height="100dp">
    <View
        android:layout_width="60dp"
        android:layout_height="match_parent"
        android:background="#f00"
        />
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_gravity="center_vertical"
        app:layout_isFluid="true"
        android:text="@string/text_short"
        android:textSize="20sp"
        android:textColor="#000"
        />
    <View
        android:layout_width="60dp"
        android:layout_height="match_parent"
        android:background="#00f"
        />
</com.alexoro.fluidhorizontallayout.FluidHorizontalLayout>

Library has 2 custom fields:

app:layout_gravity=(no_gravity|top|bottom|center_vertical)
app:app:layout_isFluid=(true|false)