Resolves Ticket
- Update next release draft
// Good example - Do! | |
sealed class GoodExample | |
class AwesomeSubclass : GoodExample() | |
object WorksToo : GoodExample() | |
// ! Bad example - do NOT do | |
sealed class BadExample { | |
class PrettyBadSubclass : BadExample() | |
object NotOkay : BadExample() |
import androidx.recyclerview.widget.RecyclerView; | |
public class RecyclerViewSwipeListener extends RecyclerView.OnFlingListener { | |
private static final int SWIPE_VELOCITY_THRESHOLD = 2000; | |
boolean mIsScrollingVertically; | |
// change swipe listener depending on whether we are scanning items horizontally or vertically | |
RecyclerViewSwipeListener(boolean vertical) { |
final String description = ""; | |
// Create ParseFile to save image from camera on Parse backend | |
final ParseFile imageFile = new ParseFile(photoFile); | |
// make an async call to save image on backend | |
imageFile.saveInBackground(new SaveCallback() { | |
@Override | |
public void done(ParseException e) { | |
if (e == null) { | |
// if upload is successful let's create and save post | |
final Post post = new Post(); |
class FindViewHolder(val parent: View) { | |
val adunitTitle: TextView = parent.findViewById(R.id.adunitTitle) | |
val companyText: TextView = parent.findViewById(R.id.companyText) | |
val companyLogo: ImageView = parent.findViewById(R.id.companyLogo) | |
val unifiedNativeAdView: UnifiedNativeAdView = parent.findViewById(R.id.unifiedNativeAdView) | |
val mediaView: MediaView = parent.findViewById(R.id.mediaView) | |
val textWrapper: View = parent.findViewById(R.id.textWrapper) | |
} | |
private val vh: FindViewHolder |
Resolves Ticket
class ApptimizeBivariantTestFeature(private val experimentTag: String) : IFeature { | |
override fun isEnabled(): Single<Boolean> { | |
return Single.create<Boolean> { emitter: SingleEmitter<Boolean> -> | |
Apptimize.runTest(experimentTag, object : ApptimizeTest() { | |
override fun baseline() { | |
// Variant: control, treat as disabled | |
emitter.onSuccess(false) | |
} | |
@Suppress("unused") |
override fun onCreate(savedInstanceState: Bundle?) { | |
// ... | |
window.addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL) | |
window.addFlags(WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH) | |
} | |
override fun onBackPressed() { | |
broadcastUserCanceled() | |
super.onBackPressed() | |
} |
private val broadcastReceiver = object : BroadcastReceiver() { | |
override fun onReceive(context: Context?, intent: Intent?) { | |
// Receiving the result from local broadcast and triggering a callback on listener. | |
@BillingResponse | |
val responseCode = intent?.getIntExtra(DebugBillingActivity.RESPONSE_CODE, BillingResponse.ERROR) | |
?: BillingResponse.ERROR | |
var purchases: List<Purchase>? = null | |
if (responseCode == BillingResponse.OK) { | |
val resultData = intent?.getBundleExtra(DebugBillingActivity.RESPONSE_BUNDLE) |
override fun onBackPressed() { | |
broadcastResult(BillingResponse.USER_CANCELED, Bundle()) | |
super.onBackPressed() | |
} |
{ | |
"data": { | |
"checkUsername": { | |
"success": true, | |
"suggestions": [ | |
"username6303", | |
"greatusername6303" | |
] | |
} | |
} |