Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request #26 from zeoflow/improve-text-layout
Browse files Browse the repository at this point in the history
Improve text layout
  • Loading branch information
ingrid-uk authored Aug 25, 2020
2 parents 29eb176 + 2a83444 commit 29b106d
Show file tree
Hide file tree
Showing 31 changed files with 439 additions and 28 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ build
release
*.iml
gradlew*
material-elements/zflow_materialelements.gpg
material-elements/package.properties
material-elements/material-elements.gpg
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ allprojects {

ext {

compileSdkVersion = 29
compileSdkVersion = 30
buildToolsVersion = '30.0.1'
minSdkVersion = 14
targetSdkVersion = 28
targetSdkVersion = 30
versionCode = 3
versionName = "1.1.1"

androidXVersions = [
annotation : '1.0.1',
Expand Down
93 changes: 72 additions & 21 deletions material-elements/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,72 @@
apply plugin: 'com.android.library'

ext {
androidXVersions = [
annotation : '1.0.1',
appCompat : '1.1.0',
cardView : '1.0.0',
constraintlayout : '1.1.3',
coordinatorlayout : '1.1.0',
core : '1.2.0',
experimental : '1.0.0',
fragment : '1.0.0',
lifecycle : '2.0.0',
recyclerView : '1.0.0',
recyclerViewSelection: '1.0.0',
transition : '1.2.0',
vectorDrawable : '1.1.0',
viewpager2 : '1.0.0',
]
}

def compatibility(name) {
switch (name) {
case "annotation":
return "androidx.annotation:annotation:${androidXVersions.annotation}"
case "appcompat":
return "androidx.appcompat:appcompat:${androidXVersions.appCompat}"
case "cardview":
return "androidx.cardview:cardview:${androidXVersions.cardView}"
case "constraintlayout":
return "androidx.constraintlayout:constraintlayout:${androidXVersions.constraintlayout}"
case "coordinatorlayout":
return "androidx.coordinatorlayout:coordinatorlayout:${androidXVersions.coordinatorlayout}"
case "core":
return "androidx.core:core:${androidXVersions.core}"
case "fragment":
return "androidx.fragment:fragment:${androidXVersions.fragment}"
case "lifecycleRuntime":
return "androidx.lifecycle:lifecycle-runtime:${androidXVersions.lifecycle}"
case "recyclerview":
return "androidx.recyclerview:recyclerview:${androidXVersions.recyclerView}"
case "transition":
return "androidx.transition:transition:${androidXVersions.transition}"
case "vectordrawable":
return "androidx.vectordrawable:vectordrawable:${androidXVersions.vectorDrawable}"
case "recyclerViewSelection":
return "androidx.recyclerview:recyclerview-selection:${androidXVersions.recyclerViewSelection}"
case "viewpager2":
return "androidx.viewpager2:viewpager2:${androidXVersions.viewpager2}"
case "experimental":
return "androidx.annotation:annotation-experimental:${androidXVersions.experimental}"
default:
throw new IllegalArgumentException("No mapping exists for name: $name.")
}
}

dependencies {
api compatibility("annotation")
api compatibility("appcompat")
api compatibility("cardview")
api compatibility("coordinatorlayout")
api compatibility("core")
api compatibility("experimental")
api compatibility("fragment")
api compatibility("lifecycleRuntime")
api compatibility("recyclerview")
api compatibility("transition")
api compatibility("vectordrawable")
api compatibility("viewpager2")
implementation compatibility("annotation")
implementation compatibility("appcompat")
implementation compatibility("cardview")
implementation compatibility("coordinatorlayout")
implementation compatibility("core")
implementation compatibility("experimental")
implementation compatibility("fragment")
implementation compatibility("lifecycleRuntime")
implementation compatibility("recyclerview")
implementation compatibility("transition")
implementation compatibility("vectordrawable")
implementation compatibility("viewpager2")
}

def srcDirs = [
Expand Down Expand Up @@ -84,10 +138,13 @@ android {
}

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
vectorDrawables.useSupportLibrary = true
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion 30
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
vectorDrawables.useSupportLibrary = true
}

testOptions {
Expand All @@ -104,14 +161,8 @@ android {
}

dexOptions {
preDexLibraries = rootProject.ext.preDexLibs
preDexLibraries = !project.hasProperty('disablePreDex')
}
}

ext {
PUBLISH_GROUP_ID = 'com.zeoflow'
PUBLISH_ARTIFACT_ID = 'material-elements'
PUBLISH_VERSION = '1.0.0'
}

apply from: "${rootProject.projectDir}/material-elements/maven-push.gradle"
7 changes: 4 additions & 3 deletions material-elements/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ POM_NAME=MaterialElements
POM_ARTIFACT_ID=material-elements
POM_PACKAGING=aar

VERSION_NAME=1.1.0
VERSION_CODE=2
VERSION_NAME=1.1.1
VERSION_CODE=3
GROUP=com.zeoflow

POM_DESCRIPTION=Material Elements help developers execute Material Elements. Developed by a core team of engineers and UX designers, these elements enable a reliable development workflow to build beautiful and functional Android apps.
Expand All @@ -17,9 +17,10 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=zeoflow
POM_DEVELOPER_NAME=ZeoFlow

org.gradle.daemon=true

NEXUS_USERNAME=
NEXUS_PASSWORD=
signing.keyId=
signing.password=
signing.secretKeyRingFile=
org.gradle.daemon=true
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,14 @@ public EditText getEditText()
return editText;
}

public void setText(String text)
{
if (this.editText != null)
{
editText.setText(text);
}
}

private void setEditText(EditText editText)
{
// If we already have an EditText, throw an exception
Expand Down
1 change: 1 addition & 0 deletions sample/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
39 changes: 39 additions & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "com.zeoflow.material.elements"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true;
}

lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0'

implementation project(':material-elements')
// implementation zeoflow.z_core
}
17 changes: 17 additions & 0 deletions sample/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/jakubkinst/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
26 changes: 26 additions & 0 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zeoflow.core.sample">

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
18 changes: 18 additions & 0 deletions sample/src/main/java/com/zeoflow/core/sample/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.zeoflow.core.sample;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity
{

@Override
protected void onCreate(@Nullable Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

}
}
30 changes: 30 additions & 0 deletions sample/src/main/res/drawable-v24/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#D6F3FF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
Loading

0 comments on commit 29b106d

Please sign in to comment.