I'm a developer of 企鹅FM
. Our app constantly report ClassCastException
on ArrayMap
, some stack trace looks like this.
Intent i = new Intent(ACTION);
i.putExtra(KEY, VALUE); // crashes here
{"remapKeys":{"inProcess":[{"originalKeys":"91","newRemapKeys":"162"},{"originalKeys":"164","newRemapKeys":"91"},{"originalKeys":"162","newRemapKeys":"164"}]},"remapShortcuts":{"global":[{"originalKeys":"162;32","newRemapKeys":"162;164;32"},{"originalKeys":"91;8","newRemapKeys":"163;8"},{"originalKeys":"91;37","newRemapKeys":"163;37"},{"originalKeys":"91;39","newRemapKeys":"163;39"},{"originalKeys":"91;160;37","newRemapKeys":"162;160;37"},{"originalKeys":"91;160;39","newRemapKeys":"162;160;39"},{"originalKeys":"91;162;37","newRemapKeys":"164;37"},{"originalKeys":"91;162;39","newRemapKeys":"164;39"}],"appSpecific":[{"originalKeys":"164;32","newRemapKeys":"162;32","targetApp":"code"},{"originalKeys":"162;8","newRemapKeys":"162;89","targetApp":"code"},{"originalKeys":"91;13","newRemapKeys":"164;13","targetApp":"code"},{"originalKeys":"91;162;76","newRemapKeys":"162;164;76","targetApp":"code"}]}} |
import android.animation.* | |
import android.app.Activity | |
import android.content.* | |
import android.content.Context.CLIPBOARD_SERVICE | |
import android.content.pm.PackageManager | |
import android.content.res.ColorStateList | |
import android.graphics.Color | |
import android.graphics.Typeface | |
import android.net.Uri | |
import android.provider.Settings |
/* | |
* Copyright (C) 2019 Shen Lin | |
* | |
* 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 |
I'm a developer of 企鹅FM
. Our app constantly report ClassCastException
on ArrayMap
, some stack trace looks like this.
Intent i = new Intent(ACTION);
i.putExtra(KEY, VALUE); // crashes here
public Bitmap blurBitmap(Bitmap bitmap){ | |
//Let's create an empty bitmap with the same size of the bitmap we want to blur | |
Bitmap outBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Config.ARGB_8888); | |
//Instantiate a new Renderscript | |
RenderScript rs = RenderScript.create(getApplicationContext()); | |
//Create an Intrinsic Blur Script using the Renderscript | |
ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)); |
/** | |
* An example of adding these transitions to a Fragment. This simple | |
* version just applies opposite transitions to any Fragment whether it is | |
* entering or exiting view. You can also inspect the transit mode parameter | |
* (i.e. TRANSIT_FRAGMENT_OPEN, TRANSIT_FRAGMENT_CLOSE) in combination to do | |
* different animations for, say, adding a fragment versus popping the back stack. | |
* | |
* Transactions without an explicit transit mode set, in this example, will not | |
* animate. Allowing the initial fragment add, for example, to simply appear. | |
*/ |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentStatePagerAdapter; | |
import android.support.v4.view.ViewPager; | |
/** | |
* Created by Chaojun Wang on 5/6/14. | |
*/ | |
public class ViewPagerUtils { | |
private ViewPagerUtils() {} |