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 AvoidSmartManagerActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
overridePendingTransition(0, 0); | |
finish(); | |
} | |
} |
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 MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
TextView tvLinkify = (TextView) findViewById(R.id.tvLinkify); |
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
Palette.from(bitmap).generate(new Palette.PaletteAsyncListener() { | |
@Override | |
public void onGenerated(Palette palette) { | |
if(palette==null) | |
return; | |
Palette.Swatch vibrantSwatch = palette.getVibrantSwatch(); | |
if(vibrantSwatch!=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
Glide.with(this) | |
.load("http://...") | |
.asBitmap() | |
.into(new BitmapImageViewTarget(ivImage) { | |
@Override | |
public void onResourceReady(Bitmap bitmap, GlideAnimation anim) { | |
super.onResourceReady(bitmap, anim); | |
Palette palette=Palette.from(bitmap).generate(); |
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 KoreanUtil { | |
public static final String getComleteWordByJongsung(String name, String firstValue, String secondValue) { | |
char lastName = name.charAt(name.length() - 1); | |
// 한글의 제일 처음과 끝의 범위밖일 경우는 오류 | |
if (lastName < 0xAC00 || lastName > 0xD7A3) { | |
return name; | |
} |
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 ObjectUtils { | |
public static boolean isEmpty(Object s) { | |
if (s == null) { | |
return true; | |
} | |
if ((s instanceof String) && (((String)s).trim().length() == 0)) { | |
return true; | |
} | |
if (s instanceof Map) { |
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
android.app.NotificationManager notificationManager = (android.app.NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); | |
NotificationChannel channelMessage = new NotificationChannel("channel_id", "channel_name", android.app.NotificationManager.IMPORTANCE_DEFAULT); | |
channelMessage.setDescription("channel description"); | |
channelMessage.enableLights(true); | |
channelMessage.setLightColor(Color.GREEN); | |
channelMessage.enableVibration(true); | |
channelMessage.setVibrationPattern(new long[]{100, 200, 100, 200}); | |
channelMessage.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); | |
notificationManager.createNotificationChannel(channelMessage); |
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"?> | |
<FrameLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
> | |
<TextView | |
android:id="@+id/tv_marker" |
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
/** | |
* Created by TedPark on 16. 4. 11.. | |
*/ | |
public class ClearEditText extends AppCompatEditText implements TextWatcher, View.OnTouchListener, View.OnFocusChangeListener { | |
private Drawable clearDrawable; | |
private OnFocusChangeListener onFocusChangeListener; | |
private OnTouchListener onTouchListener; |
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
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | |
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); | |
NotificationChannel notificationChannel = new NotificationChannel("channel_id", "channel_name", NotificationManager.IMPORTANCE_DEFAULT); | |
notificationChannel.setDescription("channel description"); | |
notificationChannel.enableLights(true); | |
notificationChannel.setLightColor(Color.GREEN); | |
notificationChannel.enableVibration(true); | |
notificationChannel.setVibrationPattern(new long[]{100, 200, 100, 200}); | |
notificationChannel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); | |
notificationManager.createNotificationChannel(notificationChannel); |