Skip to content

Instantly share code, notes, and snippets.

View mhd-zulqarnain's full-sized avatar
⛰️
Working from home

Muhammad Zulqarnain mhd-zulqarnain

⛰️
Working from home
  • PureVPN
  • Karachi
View GitHub Profile
@mhd-zulqarnain
mhd-zulqarnain / ShortKeys.md
Last active January 22, 2020 11:39
Short key in android studio
  • alt + insert -->to insert test function in tests
  • crlt + alt + l---> reformat code
  • crlt + alt +t --> add folding of heighted code
  • alt + rightarrow or left arrow --> to switch betwee classes you recently working
@mhd-zulqarnain
mhd-zulqarnain / ReportManualFragment.kt
Last active January 10, 2020 12:25
Pdf generation itext android containing watermark ,images and table
//..fragement stuff and import
/// dependency itextg implementation 'com.itextpdf:itextg:5.5.10'
fun generatePdf() {
val id = System.currentTimeMillis()
val dest = Utils.getPath(activity!!) + id + ".pdf"
if (File(dest).exists()) {
File(dest).delete()
}
try {
val reqj= Gson().toJson(req)
val json = Gson().fromJson(reqj, JsonObject::class.java)
val tmp =
(json.get("body") as JsonObject)
.getAsJsonArray("countries")
@mhd-zulqarnain
mhd-zulqarnain / location permission
Created November 27, 2019 13:25
location permission
fun getLocationPermission() {
if (ContextCompat.checkSelfPermission(
this@NearbyRestaurantActivity,
android.Manifest.permission.ACCESS_FINE_LOCATION
) == PackageManager.PERMISSION_GRANTED
) {
mLocationPermissionGranted = true
@mhd-zulqarnain
mhd-zulqarnain / interactiveinfowindow with fragment and multiple formview
Created November 27, 2019 11:14
Interactiveinfowindow using InteractiveInfoWindowAndroid with fragment and multiple formview .Marker coordinates will be fetch from server
package com.reactivelogix.nefsy.nearby
import android.location.Location
import android.os.Bundle
import android.support.v4.app.Fragment
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
package com.squadtechs.markhor.foodapp.trader.fragments.trader_fragment_add_non_food_item
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.graphics.Bitmap
import android.os.Bundle
import android.util.Base64
import android.util.Log
import android.util.TypedValue
public class test extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
doWork("paremter", new ServiceListener<String>() {
@Override
public void success(String obj) {
@mhd-zulqarnain
mhd-zulqarnain / README.md
Created August 23, 2019 06:08 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@mhd-zulqarnain
mhd-zulqarnain / config.yml
Created August 22, 2019 18:29
circle.ci Android version 28 config.yml file configuration
version: 2
jobs:
build:
working_directory: ~/ProjectName
docker:
- image: circleci/android:api-28-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>