Skip to content

Instantly share code, notes, and snippets.

View aggarwalpulkit596's full-sized avatar
🏠
Working from home

Pulkit Aggarwal aggarwalpulkit596

🏠
Working from home
View GitHub Profile
@aggarwalpulkit596
aggarwalpulkit596 / GSoC_20_Report_Pulkit_Aggarwal.md
Last active September 27, 2020 09:46
Summary of work done on the project "Introduce additional interaction types" during Google Summer of Code 2020 under the Oppia Foundation.

GSoC 2020 Work Product | Pulkit Aggarwal

6ebdd900-b879-11e9-927a-490af85f8567

Project Details

Project Idea: Introduce additional interaction types

// Copyright 2020 The Oppia Authors. All Rights Reserved.
//
// 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
// distributed under the License is distributed on an "AS-IS" BASIS,
<input type="text" ng-model="$ctrl.localValue.label" class="form-control" ui-validate="'$ctrl.isValidRatio()'">
<div class="oppia-form-error oppia-ratio-error">
<[$ctrl.warningText]>
</div>
<style>
.oppia-ratio-error {
position: absolute;
}
@aggarwalpulkit596
aggarwalpulkit596 / ItemDetailsLookup.kt
Last active February 3, 2020 21:13
ItemDetailsLoopup
class MyItemDetailsLookup(private val recyclerView: RecyclerView) :
ItemDetailsLookup<String>() {
override fun getItemDetails(event: MotionEvent): ItemDetails<String>? {
val view = recyclerView.findChildViewUnder(event.x, event.y)
if (view != null) {
return (recyclerView.getChildViewHolder(view) as NotesAdapter.ItemViewHolder).getItemDetails()
}
return null
}
}
package com.puldroid.recyclerviewselection
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.selection.SelectionTracker
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.item_note.view.*
fun updateProgress(contentId: String) {
val constraints = Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build()
val progressData = workDataOf(CONTENT_ID to contentId, RUN_ATTEMPT_ID to attemptId)
val request: OneTimeWorkRequest =
OneTimeWorkRequestBuilder<ProgressWorker>()
.setConstraints(constraints)
.setInputData(progressData)
.setBackoffCriteria(BackoffPolicy.EXPONENTIAL, 20, TimeUnit.SECONDS)
class ProgressWorker(context: Context, private val workerParameters: WorkerParameters)
:Worker(context, workerParameters), KoinComponent {
override fun doWork(): Result {
//fecthing the paramaters to make the network call
val contentId = workerParameters.inputData.getString(CONTENT_ID)
val attemptId = workerParameters.inputData.getString(RUN_ATTEMPT_ID)
val progress = Progress()
progress.status = "DONE"
@aggarwalpulkit596
aggarwalpulkit596 / image1.png
Last active April 7, 2019 20:56
UI Mockups
1.Redesigned ‘Events’ Tab with more sections and better UX.
2.Added more filtering options for better search results.
3.Redesigned Login, Rounded buttons, and Material design everywhere.
4.Added Chips, rounded corner, etc. for better UI.
5.Redesigned Event Detail Fragment.
Redesigned Login, Rounded buttons, and Material design everywhere (Left)
Added more filtering options for better search results (Right)
Redesigned Login, Rounded buttons, and Material design everywhere (Left)
Added more filtering options for better search results (Right)