Skip to content

Instantly share code, notes, and snippets.

View Licience.txt
MIT License
Copyright (c) 2018 Karthik M
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
View strings.xml
<resources>
<string name="app_name">Android WebView App</string>
<string name="hello_world">Hello world!</string>
<string name="share">Share</string>
<string name="action_websearch">Web search</string>
</resources>
@Karthik128
Karthik128 / Facebook Popup Like Box
Last active Nov 10, 2016
Facebook Popup Like Box
View Facebook Popup Like Box
<script type="text/javascript" language="javascript">
function ccpop()
{
document.getElementById("overlay").style.display = 'block';
}
window.onload = ccpop;
</script>
<!--CodingCrazy.com Popup Like and Subscribtion Box-->
<style>
@import url(http://fonts.googleapis.com/css?family=Electrolize);
View activity_splash.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/vert_loading"
tools:context=".Splash" >
</RelativeLayout>
View Splashscreeb.java
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.widget.ImageView;
import com.androidmkab.randomsplash.MainActivity;
import java.util.Random;
View MainActivity.java
materialDesignFAM = (FloatingActionMenu) findViewById(R.id.social_floating_menu);
floatingActionButton1 = (FloatingActionButton) findViewById(R.id.floating_facebook);
floatingActionButton2 = (FloatingActionButton) findViewById(R.id.floating_twitter);
floatingActionButton3 = (FloatingActionButton) findViewById(R.id.floating_linkdin);
floatingActionButton4 = (FloatingActionButton) findViewById(R.id.floating_google_plus);
floatingActionButton5 = (FloatingActionButton) findViewById(R.id.floating_instagram);
floatingActionButton6 = (FloatingActionButton) findViewById(R.id.floating_youtube);
floatingActionButton1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
View MainActivity.java
public static Intent getOpenFacebookIntent(Context context) {
try {
context.getPackageManager()
.getPackageInfo("com.facebook.katana", 0); //Checks if FB is even installed.
return new Intent(Intent.ACTION_VIEW,
Uri.parse("fb://page/376227335860239")); //Trys to make intent with FB's URI
} catch (Exception e) {
return new Intent(Intent.ACTION_VIEW,
Uri.parse("https://www.facebook.com/karthikofficialpage")); //catches and opens a url to the desired page
View ActivityMain.java
FloatingActionMenu materialDesignFAM;
FloatingActionButton floatingActionButton1, floatingActionButton2, floatingActionButton3, floatingActionButton4, floatingActionButton5, floatingActionButton6;
View activity.xml
<com.github.clans.fab.FloatingActionMenu
android:id="@+id/social_floating_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="11dp"
android:layout_marginLeft="11dp"
android:layout_marginRight="11dp"
fab:menu_animationDelayPerItem="55"
View build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.0'
compile 'com.github.clans:fab:1.6.2'
}