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 ImageUtil { | |
/** | |
* 图片变灰 | |
* @param bmpOriginal | |
* @return | |
*/ | |
public static Bitmap toGrayscale(Bitmap bmpOriginal) { | |
int width, height; | |
height = bmpOriginal.getHeight(); |
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 jp.classmethod.android.sample.volley; | |
import android.graphics.Bitmap; | |
import android.support.v4.util.LruCache; | |
import com.android.volley.toolbox.ImageLoader.ImageCache; | |
public class BitmapCache implements ImageCache { | |
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
class MyOnGestureListener extends GestureDetector.SimpleOnGestureListener { | |
@Override | |
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { | |
if (e2.getX() - e1.getX() > Constants.SWIPE_MIN_DISTANCE && Math.abs(velocityX) > Constants.SWIPE_MIN_VELOCITY | |
&& mViewPager.getCurrentItem() == 0) | |
finish(); | |
return true; | |
} | |
return false; |
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 ScreenSlidePagerAdapter extends FragmentStatePagerAdapter { | |
SparseArray<Fragment> registeredFragments = new SparseArray<Fragment>(); | |
private ScreenSlidePagerAdapter(FragmentManager fm) { | |
super(fm); | |
} | |
@Override | |
public android.support.v4.app.Fragment getItem(int i) { | |
switch (i) { |
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 JamNotification { | |
@SerializedName("wall_comment") | |
public JamFeedComment feedComment = new JamFeedComment(); | |
/* Variable name for internal use */ | |
@SerializedName("member_id") | |
private int memberId; | |
@SerializedName("obj_id") | |
private int objId; |
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
@Override | |
public void setContentView(int rootViewId) { | |
LayoutInflater inflator = getLayoutInflater(); | |
ViewGroup allContent = (ViewGroup)inflator.inflate(R.layout.base_authenticated_screen, null); | |
ViewGroup content = ((ViewGroup)allContent.findViewById(R.id.screen_content)); // R.id.screen_content是放置子类内容的ViewGroup | |
content.removeAllViews(); | |
content.addView(inflator.inflate(rootViewId, null)); |
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 org.example.ShaderTest; | |
import android.content.Context; | |
import android.graphics.*; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
/** |
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 ctrip.business.help; | |
import ctrip.business.ServiceHelper; | |
import ctrip.business.ServiceInfoModel; | |
import ctrip.business.handle.ClassModel; | |
import ctrip.business.handle.ClassModelCache; | |
import ctrip.business.handle.FieldAnnotationModel; | |
import ctrip.business.handle.FieldModel; | |
import ctrip.business.handle.annotation.SerializeField; | |
import org.xmlpull.v1.XmlPullParserException; |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.995968 0.995968 0.995968 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Bold - 14.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0.995968 0.995968 0.995968 1</string> |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
OlderNewer