Skip to content

Instantly share code, notes, and snippets.

View Avjeet's full-sized avatar

Avjeet Avjeet

  • Rooter Sports Technologies
  • Delhi
  • 19:12 (UTC -12:00)
View GitHub Profile
public class Holder extends RecyclerView.ViewHolder {
public TextView applicationName;
public ImageView applicationIcon;
public Holder(View itemView) {
super(itemView);
this.applicationName = (TextView) itemView.findViewById(R.id.application_name);
this.applicationIcon = (ImageView) itemView.findViewById(R.id.application_icon);
}
@Avjeet
Avjeet / custom_bottomsheet_guide.xml
Created June 25, 2018 19:07
This gist contains code for layout of bottomsheet guide as used to show information regarding instruments
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/bottom_sheet_side_margin"
android:layout_marginRight="@dimen/bottom_sheet_side_margin"
android:orientation="vertical"
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/data_item_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/logger_card_margin"
app:cardCornerRadius="@dimen/logger_card_corner_rad">
<LinearLayout
package io.pslab.activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/data_view_cl"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
class MainActivity : AppCompatActivity(), CacheDataSource.EventListener, TransferListener {
private var player: SimpleExoPlayer? = null
companion object {
// About 10 seconds and 1 meg.
// const val VIDEO_URL = "https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4"
// About 1 minute and 5.3 megs
const val VIDEO_URL = "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
public class BroadcastSimulator implements ListItemClicked {
private static final int SIZE = 10;
public static final int LOAD_MORE_UP = 45;
private final AdapterBroadcastComments adapter;
private HashMap<Integer, SparseArray<List<BroadcastComment>>> commentMap;
private final Context context;
private final int sessionId;
private Long duration;
private Long startTimeInSec;
private int timer = 0;
public class MyFirebaseMessagingService extends FirebaseMessagingService {
private static final String TAG = MyFirebaseMessagingService.class.getSimpleName();
public MyFirebaseMessagingService() {
}
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {