This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2014 skyfish.jy@gmail.com | |
* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EndlessListActivity<D> extends Activity { | |
private EndlessRecyclerOnScrollListener mEndlessScrollListener; | |
private EndlessListAdapter mAdapter; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
RecyclerView listView = (RecyclerView) findViewById(R.id.list); | |
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// digunakan untuk Highlight text yang sedang dicari | |
private void setColor(TextView view, String fulltext, String subtext, int color) { | |
view.setText(fulltext, TextView.BufferType.SPANNABLE); | |
Spannable str = (Spannable) view.getText(); | |
int i = fulltext.indexOf(subtext); | |
str.setSpan(new ForegroundColorSpan(color), i, i + subtext.length(), | |
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Alachiq extends MultiDexApplication { | |
... | |
private static Context context; | |
public static SlidrConfig config; | |
private GithubService githubService; | |
private Picasso picasso; | |
private static GithubApplicationComponent component; | |
private JobManager jobManager; | |
private static Alachiq instance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:moor_flutter/moor_flutter.dart'; | |
part 'database.g.dart'; | |
class User extends Table { | |
//@formatter:off | |
IntColumn get id =>integer().autoIncrement()(); | |
IntColumn get active =>integer()(); | |
TextColumn get name =>text()(); | |
TextColumn get email =>text().nullable()(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Build; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.view.Window; | |
import io.flutter.app.FlutterActivity; | |
import io.flutter.plugins.GeneratedPluginRegistrant; | |
public class MainActivity extends FlutterActivity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function slugify($string, $separator = '-'): array|string|null | |
{ | |
$_transliteration = ["/ö|œ/" => "e", | |
"/ü/" => "e", | |
"/Ä/" => "e", | |
"/Ü/" => "e", | |
"/Ö/" => "e", | |
"/À|Á|Â|Ã|Å|Ǻ|Ā|Ă|Ą|Ǎ/" => "", | |
"/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/" => "", | |
"/Ç|Ć|Ĉ|Ċ|Č/" => "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'dart:ui'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/physics.dart'; | |
import 'package:flutter/scheduler.dart'; | |
void main() { | |
// debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia; |