GithubHelp home page GithubHelp logo

pdfreader-android's People

Contributors

io7m avatar mattniehoff avatar swandog30 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

pdfreader-android's Issues

Update build.gradle structure

Want to use a system where we put most of the config in the main build.gradle and then just manage dependencies in each module's build.gradle.

Migrate to Maven Central

To allow others to build the app, we should be publishing the PDF module to Maven Central rather than NYPL's nexus repository.

Move INDENT_PIXELS to resource file

In the TableOfContents adapter, we've had to use a const in a companion object to get the RecyclerView.ViewHolder to honor the integer value for leftIndent here:

        fun bindContents(content: TableOfContentsItemWrapper) {
            this.content = content
            view.reader_toc_element_title.text = content.title
            view.reader_toc_element_page_number.text = content.pageNumber.toString()

            val params = RelativeLayout.LayoutParams(
                ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT
            )

            val leftIndent = content.indent * INDENT_PIXELS

            params.setMargins(leftIndent, 0, 0, 0)

            view.layoutParams = params
        }

This should really be in a resource file of some sort, but attempts to put it into dimens yielded results that pushed anything with an indent off the screen.

val pixels = R.dimen.table_of_contents_element_indent_width as Int
val leftIndent = content.indent * pixels

pixels ends up being 2131099867 when I hit the breakpoint in the above code.

The rest of the dimensions were properly moved over in #5, but this still remains.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.