Introduced Mobile development often encounters this situation: we need to do a folding function for the text that is too long, so the react Native,rn-expandabletext is a component that solves the problem, and it is used in the same way as the native text component. But when your content exceeds the specified number of lines, it will help you to automatically fold the content.Click Expand to display all content. Project Address: Https://github.com/geekeren/RN-ExpandableText Install Expandabletext Usage Demos Properties Prop Description Default NumberOfLines The max number of lines the content is, the content exceed this value, the Expandview would show. 5 Expandview A callback function to return Expand-view, you can customize the Expand-view. When it ' s null, Expand-view'll disappear Unexpandview A callback function to return Unexpand-view. Usage the same as Expandview Onexpand A callback when the content expands - Oncollapse A callback when the content collapses - Follow Me Follow me on Wechat
I once saw an academic who entered a strange code on PHP-Storm. When he pressed the Tab key, something magic happened. If HTML is also a programming language, it is privately thought that Html will be the most popular programming language we have come into contact with.Someone may not know what HTML (Hypertext Markup Language) is, but when he first opened the web browser to browse the web in his life, he and the HTML began to humble.... But when he didn't know it was very colorful. Behind the web page is the silent support of the HTML language; HTML+JS+CSS is the front-end three languages.If we compare web pages to humans, HTML gives people skeletons, CSS unknowns give flesh and blood, even clothes and clothing, and JS gives him the soul of sports. This article starts with HTML. The basic knowledge of HTML is beyond the scope of this article. You know, Google.Here, I mainly talk about how to quickly build up the skeleton of HTML. Thinking of HTML as a skeleton is not my whim. I'm just telling myself to write HTML pages with a sense of framework.It goes without saying that my previous HTML code was patchwork.Wherever it
When visiting the blog of Wang Boyuan yesterday, the polar guests discovered that the website jumped to the website www.cjb.net from time to time. It almost jumped to open wangbaiyuan.cn, and other websites did not encounter such strange events. .This situation first appeared only on 360 speed browsers, even if I subconsciously clear the cache, cookies, still did not work.In the end I changed other browsers and found that this was only happening on 360-speed browsers, and it happened occasionally; I had to give up trying to solve the unsuccessful method of uninstalling browser plug-ins.Perhaps 360 speed browser poisoning it, Oh, 360 also known as safe! This evening, I noticed that the annoying automatic jump to cjb.net reappeared, and this time no matter what the browser is, including Edge, IE.This led me to believe that the website was "invaded" and that the "intrusion" method was very obvious, with the js containing the jump code.Because when I examine the element "disable js" the jump will not occur.Then I took a look at Wang Baiyuan’s blog on an article page that references 30 js. As long as one of the js files is embedded with a malicious jump code, there will be
On the mobile-end web pages of JD.com, Baidu.com, etc., there is often a hovering prompt “Click to open the client”. If the user has installed the client on the mobile phone, the client will be automatically invoked to open the client with the same content as the current web page. End page; if the user does not install these apps, the browser will jump to the download site, allowing the user to download the client.This function is also implemented in Wang Baiyuan's blog client. Previously in the "Android implementation to open a specified link to invoke other applications" describes how to automatically invoke the client software if the client clicks on a specific link (APPLINK), and repeat it again here: AndroidManifest in the Activity that you want to jump to when you open the specified link Add an intent-filter tag to the .xml manifest file, and set the scheme, HOST, and other attributes as in the following example. How to link to the client specified page by Category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="wbyblog" android:host="wangbaiyuan.cn" android:pathPrefix="/home"/> This Intent call Activity can not only start the app when the applink is clicked, but also supports HTTP-like GET pass values. This is the prerequisite
A cool navigation page was found on a website a few days ago. The interface was beautiful and atmospheric, and the windows8 tile style was adopted. The website icons were flattened.Later found that this navigation page is open source, so I downloaded a copy, and made a slight modification and optimization on my host, named "hundred yuan navigation."After that I was proud to set "Hundred Dollar Navigation" as the homepage of all my browsers.Because I can confidently tell you that the secondary loading speed of this navigation page is absolutely faster than any navigation site (unfriendly), including mainstream Baidu search, 360 navigation.Not much to say, hundred yuan navigation website: http://wangbaiyuan.cn/daohang, welcome everyone to set it as your browser home page and put forward valuable suggestions. 0.3s fast loading experience Hundred yuan navigation speed for the first time in my 15M broadband, 360 speed browser Google kernel test speed is 851ms, secondary loading speed 260ms, and supports the second time no networking can access.The reason why the loading can be completed in less than 0.3 seconds is because all the resources in the webpage, including CSS, js, and the webpage's own html are cached locally.A second visit is equivalent to opening
I haven't written a technical post for a long time. This time, I have made a video of personal production in the blog for the time being. I use the code provided by Youku: It's an embed video tag, but the video length and width provided by Youku is helpless. The appearance of 600*400 is OK on the computer. The width of the mobile phone is too large to directly detonate the mobile phone screen. The user experience is very bad. The following code is implemented in different devices to automatically adapt to the width.The implementation principle is very simple. It is to use js (jquery) to dynamically set the long width of the video. Add the following code to the theme's functions.php file, and replace all #main-wrap-left in the code with the class name or ID of the article's div.