Skip to content

Instantly share code, notes, and snippets.

View alhazmy13's full-sized avatar
👽
keep calm and work hard

Abdullah Alhazmy alhazmy13

👽
keep calm and work hard
View GitHub Profile
1. create assets folder in src under your app name.
2. In this assets folder keep your pdf files e.g. file.pdf.
3 now come your activity i.e MainActivity.java
4. setListener on any UI component what you want i.e (Button,ImageView,ImageButton);
5. In this listener call one user defined method i.e. openPDFFiles("file.pdf");
the openPDFFiles() method have below code:—-
private void openPDFFiles(String fileName) //fileName is the pdf file name which is keep in assets folder. ex file.pdf
{
@alhazmy13
alhazmy13 / index.js
Created February 13, 2019 08:41 — forked from MoOx/index.js
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
@alhazmy13
alhazmy13 / Example.java
Last active November 21, 2019 19:35
RxJava and Retrofit - Example with Github API
package com.company;
import retrofit.RestAdapter;
import retrofit.http.GET;
import retrofit.http.Path;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action1;
import rx.functions.Func1;
import rx.functions.Func2;
@alhazmy13
alhazmy13 / STATS.md
Last active September 20, 2020 09:53

Alhazmy github stats

@alhazmy13
alhazmy13 / 📊 Weekly development breakdown
Last active October 29, 2020 13:41
📊 Weekly development breakdown
HTML 7 mins █████████▏░░░░░░░░░░░ 43.8%
JSON 4 mins █████▍░░░░░░░░░░░░░░░ 26.1%
Vue.js 3 mins ███▊░░░░░░░░░░░░░░░░░ 18.0%
CSS 1 min ██▏░░░░░░░░░░░░░░░░░░ 10.5%
Other 0 secs ▎░░░░░░░░░░░░░░░░░░░░ 1.6%