-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Abrynos/view-binding
Migrate kotlin synthetics to Android view binding
- Loading branch information
Showing
10 changed files
with
145 additions
and
64 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
36 changes: 36 additions & 0 deletions
36
app/src/main/java/pl/edu/pjwstk/s999844/shoppinglist/Extensions.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,36 @@ | ||
/* | ||
* _____ _ _ _ _ _ | ||
* / ___| | (_) | | (_) | | | ||
* \ `--.| |__ ___ _ __ _ __ _ _ __ __ _| | _ ___| |_ | ||
* `--. \ '_ \ / _ \| '_ \| '_ \| | '_ \ / _` | | | / __| __| | ||
* /\__/ / | | | (_) | |_) | |_) | | | | | (_| | |___| \__ \ |_ | ||
* \____/|_| |_|\___/| .__/| .__/|_|_| |_|\__, \_____/_|___/\__| | ||
* | | | | __/ | | ||
* |_| |_| |___/ | ||
* | ||
* Copyright (C) 2021-2021 Sebastian Göls | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; version 2 of the License only | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
|
||
package pl.edu.pjwstk.s999844.shoppinglist | ||
|
||
import android.view.LayoutInflater | ||
import androidx.viewbinding.ViewBinding | ||
import pl.edu.pjwstk.s999844.shoppinglist.activities.AbstractShoppingActivity | ||
|
||
|
||
inline fun <T : ViewBinding> AbstractShoppingActivity.viewBinding(crossinline bindingInflater: (LayoutInflater) -> T) = lazy(LazyThreadSafetyMode.NONE) { | ||
bindingInflater.invoke(layoutInflater) | ||
} |
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
Oops, something went wrong.