Skip to content

Instantly share code, notes, and snippets.

View wei-spring's full-sized avatar
🏠
Working from home

魏春生 wei-spring

🏠
Working from home
View GitHub Profile
@wei-spring
wei-spring / AES加密解密
Last active August 25, 2016 07:44
AES加密解密
# AES加密解密
import javax.crypto.*;
import java.security.*;
public class Java {
private static SecretKey key = null;
private static Cipher cipher = null;
@wei-spring
wei-spring / BetterRecyclerView.java
Created September 7, 2016 01:41
Recycler嵌套,横向滑动事件冲突
/**
* Fork from :https://gist.github.com/manidesto/ecccd38787fa8e287a3f18bcd9867189
*
* Recycler嵌套,横向滑动事件冲突,垂直方向列表里面各个子条目可以横向滑动
*
* 解决滑动时候手势冲突
*/
public class BetterRecyclerView extends RecyclerView{
private static final int INVALID_POINTER = -1;
@wei-spring
wei-spring / attrs.xml
Created September 17, 2016 08:51
CircularImageView 对应的attrs.xml文件
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="CircularImageView">
<attr name="civ_border" format="boolean"/>
<attr name="civ_border_width" format="dimension"/>
<attr name="civ_border_color" format="color"/>
<attr name="civ_shadow" format="boolean"/>
<attr name="civ_shadow_color" format="color"/>
<attr name="civ_shadow_radius" format="float"/>
@wei-spring
wei-spring / ReadMoreTextView.java
Created September 21, 2016 09:11
查看更多TextView
/*
* Copyright (C) 2016 Borja Bravo Álvarez
*
* 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
@wei-spring
wei-spring / AnimJagDrawable.java
Created September 23, 2016 07:03
锯齿背景+动画效果展示(包含3个文件集合)
'''Java
//------锯齿锯齿锯齿Drawable
package com.sample;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Path;
@wei-spring
wei-spring / NativeViewHierarchyManager.java
Created June 26, 2017 08:28
NativeViewHierarchyManager.java
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.facebook.react.uimanager;
,, , ,,
: ::::, :::,
, ,,: :::::::::::::,, :::: : ,
, ,,, ,:::::::::::::::::::, ,: ,: ,,
:, ::, , , :, ,::::::::::::::::::, ::: ,::::
: : ::, ,:::::::: ::, ,::::
, ,::::: :,:::::::,::::,
,: , ,:,,: :::::::::::::
::,: ,,:::, ,::::::::::::,
,:::, :,,::: ::::::::::::,
@wei-spring
wei-spring / FlymeUtils.java
Created May 7, 2018 08:31 — forked from joinAero/FlymeUtils.java
Android - Helper for 3rd party roms: Flyme & MIUI.
package cc.cubone.turbo.core.rom;
import android.os.Build;
import android.view.Window;
import android.view.WindowManager;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
/**
@wei-spring
wei-spring / shadow.xml
Created May 8, 2018 04:05 — forked from lecho/shadow.xml
Android shadow drawable xml.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Drop Shadow Stack -->
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
@wei-spring
wei-spring / full_width_dialog.dart
Created May 12, 2020 07:52
Full width dialog for flutter .
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';