Git Product home page Git Product logo

iamyours / wandroid Goto Github PK

View Code? Open in Web Editor NEW
218.0 11.0 27.0 31.53 MB

首款适配玩Android、掘金、简书、CSDN、公众号文章黑夜模式,无广告,支持离线阅读,代码图片显示,关注内容本身,阅读体验升级。

Home Page: https://juejin.im/post/5d80a146518825300a3ec691

Kotlin 57.88% CSS 13.61% Java 21.46% JavaScript 7.04%
mvvm wanandroid dark-theme livedata databinding retrofit

wandroid's Issues

关于glide永久保存图片问题

大神你好,看到你这个glide永久保存图片的文章。现在有一个新需求,不知道有没有方式解决,想实现在getPermanentDirectory() 里面的permanent_images目录下在新建不同的文件夹(如用bean对象的id作为文件夹名)用于保存不同Bean对象图片,请问可以实现这种需求吗?希望大神指点,感谢!

我用webview加载微信公众号链接,按照下面的方式去实现,最后链接都加载不了,是哪里写的有问题吗

 mWebView!!.webViewClient = object : WebViewClient() {
        override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
            view.loadUrl(url)
            return true
        }

        override fun shouldInterceptRequest(view: WebView, request: WebResourceRequest): WebResourceResponse? {
            return super.shouldInterceptRequest(view, request)
        }

        override fun shouldInterceptRequest(view: WebView, url: String): WebResourceResponse? {
            if (url.startsWith("https://mp.weixin.qq.com/s")) {
                val res = replaceCss(url, view.context)
                val input: InputStream = ByteArrayInputStream(res.toByteArray())
                return WebResourceResponse("text/html", "utf-8", input)
            }
            return super.shouldInterceptRequest(view, url)
        }


    }
}

private val rex = "(<style>)([\\S ]*)(</style>)"
private fun replaceCss(url: String, context: Context): String {
    val pattern = Pattern.compile(rex)
    val m = pattern.matcher(url)
    if (m.find()) {
        try {
            val css = getString(context.assets.open("weixin/weixin.css"))
            val sb = StringBuilder()
            sb.append(m.group(1))
            sb.append(css)
            sb.append(m.group(3))
            return url.replace(rex.toRegex(), sb.toString())
        } catch (e: IOException) {
            e.printStackTrace()
        }
    }
    return url
}

如何弹出错误信息

错误信息怎么弹不出来?比如我登录,输入错误的账户密码,点击登录,没有任何错误信息提示

项目运行报错

首先感谢大佬的开源项目,本来想运行一下学习一下,clone下来后发现报错了
报错信息:

.../res/layout/activity_main.xml:18: AAPT: error: attribute tabIndicatorHeight (aka io.github.iamyours.wandroid:tabIndicatorHeight) not found

这个是要添加 material 依赖吗?
我是一个初学者,如果问题有点小白,还请包涵😁

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.