Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New split viewdsl support compat #48

Merged
merged 2 commits into from
Mar 20, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Move nestedScrollView(…) from sample to new split
  • Loading branch information
LouisCAD committed Mar 20, 2018
commit f8ba4698c4dc602f8aedec5ff12109f40d79e169
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ import splitties.viewdsl.design.SCROLL
import splitties.viewdsl.design.appBarLParams
import splitties.viewdsl.design.contentScrollingWithAppBarLParams
import splitties.viewdsl.design.defaultLParams
import splitties.viewdsl.support.compat.nestedScrollView
import splitties.views.appcompat.Toolbar
import splitties.views.imageResource
import splitties.views.setCompoundDrawables
import splitties.views.textResource
import xyz.louiscad.splittiessample.R
import xyz.louiscad.splittiessample.extensions.nestedScrollView

class MainUi(override val ctx: Context) : Ui {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@

@file:Suppress("NOTHING_TO_INLINE")

package xyz.louiscad.splittiessample.extensions
package splitties.viewdsl.support.compat

import android.content.Context
import android.support.v4.widget.NestedScrollView
import splitties.views.inflate
import xyz.louiscad.splittiessample.R

inline fun nestedScrollView(ctx: Context): NestedScrollView = ctx.inflate(R.layout.nestedscrollview_with_scrollbars)
21 changes: 21 additions & 0 deletions viewdsl-support-compat/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2018. Louis Cognault Ayeva Derman
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<style name="WithScrollbarsStyle">
<item name="android:scrollbars">horizontal|vertical</item>
</style>
</resources>