This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from os import listdir | |
from os.path import isfile, join | |
import os | |
import shutil | |
from PIL import Image | |
import string | |
xxhdpi = './drawable-xxhdpi/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//设置ActionBar图片常显 | |
@Override | |
public boolean onMenuOpened(int featureId, Menu menu) { | |
if (featureId == Window.FEATURE_ACTION_BAR && menu != null) { | |
if (menu.getClass().getSimpleName().equals("MenuBuilder")) { | |
try { | |
Method m = menu.getClass().getDeclaredMethod( | |
"setOptionalIconsVisible", Boolean.TYPE); | |
m.setAccessible(true); | |
m.invoke(menu, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.pixite.fragment.widget; | |
import android.content.res.Resources; | |
import android.graphics.Canvas; | |
import android.graphics.ColorFilter; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.Drawable.Callback; | |
import android.view.Gravity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.v4.view.ViewPager; | |
import android.view.View; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Parallax transformer for ViewPagers that let you set different parallax | |
* effects for each view in your Fragments. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* <p>Helper class for managing multiple running embedded activities in the same | |
* process. This class is not normally used directly, but rather created for | |
* you as part of the {@link android.app.ActivityGroup} implementation. | |
* | |
* @see ActivityGroup | |
* | |
* @deprecated Use the new {@link Fragment} and {@link FragmentManager} APIs | |
* instead; these are also | |
* available on older platforms through the Android compatibility package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.util.LruCache; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
import android.widget.TextView; | |
import rx.Observable; | |
import rx.Subscription; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ShapeView extends View { | |
private final static String tag = ShapeView.class.getSimpleName(); | |
private final int DEFAULT_SIZE_DP = 100; | |
private int measuredWidth; | |
private int measuredHeight; | |
private Shape shapeType; | |
private int color; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright (C) 2015 The Android Open Source Project | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright (C) 2015 The Android Open Source Project | |
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 |