Base on MuPDF a custom view that simplify displaying Pdf files.
This file contains hidden or 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
| class PeekingLinearLayoutManager : LinearLayoutManager { | |
| @Suppress("Unused") | |
| @JvmOverloads | |
| constructor(context: Context?, @RecyclerView.Orientation orientation: Int = RecyclerView.VERTICAL, reverseLayout: Boolean = false) : super(context, orientation, reverseLayout) | |
| @Suppress("Unused") | |
| constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) | |
| override fun generateDefaultLayoutParams() = | |
| scaledLayoutParams(super.generateDefaultLayoutParams()) |
This file contains hidden or 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
| package fr.airweb.dood.widgets | |
| import android.annotation.SuppressLint | |
| import android.content.Context | |
| import android.support.v4.view.ViewPager | |
| import android.util.AttributeSet | |
| import android.view.MotionEvent | |
| class NoScrollViewPager : ViewPager { |
This file contains hidden or 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
| package fr.airweb.tixipass.ui; | |
| import org.jetbrains.annotations.Nullable; | |
| public class Merge2List { | |
| static class Node { | |
| int data; | |
| @Nullable |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context=".MainActivity"> | |
| <android.support.v4.widget.NestedScrollView | |
| android:layout_width="match_parent" |
This file contains hidden or 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
| android.variantFilter { variant -> | |
| def currentDevFlavor = FLAVOR_NAME | |
| def flavorName = variant.getFlavors().get(0).name | |
| if(currentDevFlavor && flavorName != currentDevFlavor) { | |
| variant.setIgnore(true) | |
| } | |
| } |
This file contains hidden or 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
| configurations.all { | |
| resolutionStrategy.eachDependency { DependencyResolveDetails details -> | |
| def requested = details.requested | |
| if (requested.group == 'com.android.support') { | |
| if (!requested.name.startsWith("multidex")) { | |
| details.useVersion support_lib_version | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or 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
| 一篇不太一样的RxJava介绍(二):关于操作符 | |
| 前言: 上篇文章介绍了Observable这个类的来历。但是操作符是RxJava又一大优势。深受大家好评,这篇文章我会介绍一下操作符相关概念。 | |
| (读完这篇文章可能会引起身体强烈不适,甚至出现你以前懂操作符,读了之后反而不懂的情况。甚至这篇文章对你开发Android App不会有很大帮助,所以这篇文章需要谨慎阅读) | |
| 我们在了解操作符之前,首先要了解几个概念: **Monad** 和 **函数式编程**。这里我会一一介绍他们,但是不会太详细,一篇文章肯定不能详细的介绍完这两个**巨大**的概念,甚至我自己都没有理解透彻这两个概念,但是这并不妨碍我们理解RxJava的操作符。 | |
| ## 函数式编程 | |
| 我们首先来说函数式编程,函数式编程的意义很简单。就是 用函数来编程。或者说,是用数学概念上的函数( *mathematical functions* )来编程。函数是两个集合之间的一种映射。 | |
| 我们常常用 f:x -> y 这种形式来表示**函数**f是从X到Y的一种映射。 |
This file contains hidden or 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
| package com.airweb.waw.wawmusicplayer.ui.widgets | |
| import android.content.Context | |
| import android.support.v4.view.ViewCompat | |
| import android.support.v4.view.WindowInsetsCompat | |
| import android.util.AttributeSet | |
| import android.view.View | |
| import android.view.ViewGroup | |
| import android.widget.FrameLayout |
This file contains hidden or 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
| /* | |
| * Copyright 2017 WBinaryTree | |
| * | |
| * 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 |
NewerOlder
