-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move all resource id of views to ids.xml convert view to appcompat views update gradle and kotlin version
- Loading branch information
Showing
8 changed files
with
89 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Sun Oct 14 21:18:39 MSK 2018 | ||
#Sat Feb 02 14:14:10 MSK 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
library/src/main/java/com/erkutaras/statelayout/ViewExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.erkutaras.statelayout | ||
|
||
import android.view.LayoutInflater | ||
import android.view.View | ||
import androidx.annotation.IdRes | ||
import androidx.annotation.LayoutRes | ||
|
||
/** | ||
* Created by erkutaras on 2.02.2019. | ||
*/ | ||
|
||
internal fun <T : View> View?.findView(@IdRes id: Int, block: T.() -> Unit) { | ||
this?.findViewById<T>(id)?.let { block(it) } | ||
} | ||
|
||
internal fun View.inflate(@LayoutRes layoutId: Int): View? { | ||
return LayoutInflater.from(this.context).inflate(layoutId, null) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<!-- layout_state_loading.xml --> | ||
<item name="textView_state_layout_loading_message" type="id" /> | ||
<item name="progressBar_state_layout" type="id" /> | ||
<item name="view_state_layout_loading" type="id" /> | ||
|
||
<!-- layout_state_info.xml --> | ||
<item name="imageView_state_layout_info" type="id" /> | ||
<item name="textView_state_layout_info_title" type="id" /> | ||
<item name="textView_state_layout_info_message" type="id" /> | ||
<item name="button_state_layout_info" type="id" /> | ||
|
||
<!-- layout_state_loading_with_content.xml --> | ||
<item name="progressBar_state_layout_with_content" type="id" /> | ||
</resources> |