配有英伟达显卡的主机,装完 Ubuntu 16.04 后出现闪屏现象,是由于没有安装显卡驱动。
显卡型号
NVIDIA Corporation GM204 [GeForce GTX 970]
| <layout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:bind="http://schemas.android.com/apk/res-auto"> | |
| <data> | |
| <import type="com.liangfeizc.databindingsamples.basic.User" /> | |
| <variable | |
| name="user" | |
| type="User" /> |
| #!/usr/bin/python | |
| # License for any modification to the original (linked below): | |
| # ---------------------------------------------------------------------------- | |
| # "THE BEER-WARE LICENSE" (Revision 42): | |
| # Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain | |
| # this notice you can do whatever you want with this stuff. If we meet some day, | |
| # and you think this stuff is worth it, you can buy us a beer in return. | |
| import argparse, sys, subprocess, tempfile |
| apply plugin: 'java' | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| // ... | |
| } |
| Dagger step 1: Add android-apt, dagger 2, dagger2-compiler, and javax annotation to the build.gradle files. | |
| Note that they're not all "compile" dependencies. | |
| Step 2: Add our module. Our ApplicationModule will be able to inject the ApplicationContext to classes that need it. | |
| Step 3: Add our Component.Dagger 2 generates code for each Component you create, | |
| using the file name Dagger(NameOfComponent). | |
| Example: DaggerApplicationComponent. | |
| Components can have multiple modules, in our case we have one. |
| package despotoski.nikola.appbarlayoutsamples.view; | |
| import android.animation.IntEvaluator; | |
| import android.animation.ValueAnimator; | |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.support.design.widget.AppBarLayout; | |
| import android.support.design.widget.CoordinatorLayout; | |
| import android.support.v4.view.ViewCompat; | |
| import android.support.v4.view.ViewPropertyAnimatorCompat; |
| /* | |
| * Copyright 2016 Google Inc. | |
| * | |
| * 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 |
| val spanned = spannable{ bold("some") + italic(" formatted") + color(Color.RED, " text") } | |
| val nested = spannable{ bold(italic("nested ")) + url("www.google.com", "text") } | |
| val noWrapping = bold("no ") + sub("wrapping ) + sup("also ") + "works" | |
| text_view.text = spanned + nested + noWrapping |
| fun addDecoration() { | |
| recyclerView.addItemDecoration( | |
| StickyHeaderItemDecoration( | |
| epoxyController, | |
| listOf( | |
| TitleBindingModel_().id("title 3").id(), // steal the conversion from the ID constructors to its long value | |
| TitleBindingModel_().id("title 20").id() | |
| ) | |
| ) | |
| ) |