这个是拆机后断了电源,导致时间不对,也就是说现在电脑的时间比U盘制作的时间还早,所以有这样的错误提示。
在终端里面修改时间 请参考下面的代码,按回车键确认:
date 062614102014.30 06是月,26是日,14是时,10是分,2014是年,30是秒 注意:一定要修改为现在的时间,误差不超过1分钟
/** | |
* 转换 View 为 Bitmap | |
*/ | |
public static Bitmap viewToBitmap(View v) { | |
if (v.getMeasuredHeight() <= 0) { | |
v.measure(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); | |
Bitmap b = Bitmap.createBitmap(v.getMeasuredWidth(), v.getMeasuredHeight(), Bitmap.Config.ARGB_8888); | |
Canvas c = new Canvas(b); | |
v.layout(0, 0, v.getMeasuredWidth(), v.getMeasuredHeight()); | |
v.draw(c); |
//1 . Modify your MainActivity section in AndroidManifest.xml, delete from it, line with MAIN category in intent-//filter section | |
<activity android:name="ru.quickmessage.pa.MainActivity" | |
android:configChanges="keyboardHidden|orientation" | |
android:screenOrientation="portrait" | |
android:label="@string/app_name" | |
android:theme="@style/CustomTheme" | |
android:launchMode="singleTask"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> |
这个是拆机后断了电源,导致时间不对,也就是说现在电脑的时间比U盘制作的时间还早,所以有这样的错误提示。
在终端里面修改时间 请参考下面的代码,按回车键确认:
date 062614102014.30 06是月,26是日,14是时,10是分,2014是年,30是秒 注意:一定要修改为现在的时间,误差不超过1分钟
import android.support.v7.widget.RecyclerView; | |
public abstract class OnVerticalScrollListener extends RecyclerView.OnScrollListener { | |
@Override | |
public final void onScrolled(RecyclerView recyclerView, int dx, int dy) { | |
if (!recyclerView.canScrollVertically(1)) { | |
onScrolledToEnd(); | |
} else if (!recyclerView.canScrollVertically(-1)) { | |
onScrolledToTop(); |
// build a jar with source files | |
task sourcesJar(type: Jar) { | |
from android.sourceSets.main.java.srcDirs | |
archiveClassifier.set('sources') | |
} | |
task javadoc(type: Javadoc) { | |
failOnError false | |
source = android.sourceSets.main.java.sourceFiles | |
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) |
import android.text.InputFilter; | |
import android.text.Spanned; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* Created by twiceYuan on 11/10/15. | |
* <p> |
import android.graphics.Rect; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
/** | |
* Created by twiceYuan on 3/30/16. | |
* Email: [email protected] | |
* Site: http://twiceyuan.com | |
* | |
* RecyclerView 分割线高度设定 |
import android.content.Context; | |
import android.util.DisplayMetrics; | |
public class DP { | |
public static int dp2px(Context context, float dpValue) { | |
final float scale = context.getResources().getDisplayMetrics().density; | |
return (int) (dpValue * scale + 0.5f); | |
} |
public static void main(String[] args) throws Exception { | |
final Something oldAnnotation = (Something) Foobar.class.getAnnotations()[0]; | |
System.out.println("oldAnnotation = " + oldAnnotation.someProperty()); | |
Annotation newAnnotation = new Something() { | |
@Override | |
public String someProperty() { | |
return "another value"; | |
} |
public class GenericTypeDemo { | |
public static void main(String args[]) { | |
Foo<String> foo = new Foo<String>() { }; | |
// 在类的外部这样获取 | |
Type type = ((ParameterizedType) foo.getClass().getGenericSuperclass()).getActualTypeArguments()[0]; | |
System.out.println(type); | |
// 在类的内部这样获取 | |
System.out.println(foo.getTClass()); | |
} |