Skip to content

Instantly share code, notes, and snippets.

package com.learnpainless.androidnavigation.fragments
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.navigation.fragment.findNavController
import com.learnpainless.androidnavigation.R
import kotlinx.android.synthetic.main.fragment_second.*
<?xml version="1.0" encoding="utf-8"?>
<navigation 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/main_graph"
app:startDestination="@id/firstFragment">
<fragment
android:id="@+id/secondFragment"
android:name="com.learnpainless.androidnavigation.fragments.SecondFragment"
<?php namespace Config;
use CodeIgniter\Config\BaseConfig;
class Filters extends BaseConfig
{
// Makes reading things below nicer,
// and simpler to change out script that's used.
public $aliases = [
'csrf' => \CodeIgniter\Filters\CSRF::class,
<?php namespace Config;
// Create a new instance of our RouteCollection class.
$routes = Services::routes(true);
// Load the system's routing file first, so that the app and ENVIRONMENT
// can override as needed.
if (file_exists(SYSTEMPATH . 'Config/Routes.php'))
{
require SYSTEMPATH . 'Config/Routes.php';
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
padding: 0;
margin: 0;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>404 HTML Tempalte by Prolong Services</title>
package com.edablogs.tubelite.api;
import com.edablogs.tubelite.model.update.UpdateModel;
import com.edablogs.tubelite.model.youtube.ChannelModel;
import com.edablogs.tubelite.model.youtube.LatestModel;
import com.edablogs.tubelite.model.youtube.YoutubeResponse;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
package com.edablogs.tubelite.api;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import static com.edablogs.tubelite.utils.Constants.BASE_URL;
import static com.edablogs.tubelite.utils.Constants.GIT_BASE_URL;
/**
* Created by pawneshwer on 11/11/16.
package com.edablogs.tubelite.model.youtube;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class ItemLatest {
@SerializedName("kind")
@Expose
private String kind;
public static boolean isConnectionAvailable(Context context) {
ConnectivityManager connectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectivityManager != null) {
NetworkInfo netInfo = connectivityManager.getActiveNetworkInfo();
if (netInfo != null && netInfo.isConnected()
&& netInfo.isConnectedOrConnecting()
&& netInfo.isAvailable()) {
return true;