Skip to content

Instantly share code, notes, and snippets.

View vamsitallapudi's full-sized avatar
🚩
Become better than yesterday

Vamsi Tallapudi vamsitallapudi

🚩
Become better than yesterday
View GitHub Profile
package com.coderefer.uploadfiletoserver;
/**
* Created by vamsi on 24-Feb-16.
*/
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
package com.coderefer.uploadfiletoserver;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
<?php
$file_path = "uploads/";
$file_path = $file_path . basename( $_FILES['uploaded_file']['name']);
if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $file_path) ){
echo "success";
} else{
echo "fail";
}
?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/splash_image"
android:orientation="vertical"/>
package com.coderefer.androidsplashscreenexample;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
/**
* Created by vamsikrishna on 12-Feb-15.
*/
public class SplashScreen extends Activity {
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.coderefer.androidsplashscreenexample">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
package com.coderefer.firebasedatabaseexample.util;
import android.content.Context;
import android.graphics.Typeface;
import java.lang.reflect.Field;
/**
* Created by vamsi on 06-05-2017 for Android custom font article
*/
public class FontsOverride {
package com.coderefer.firebasedatabaseexample;
import android.app.Application;
import com.coderefer.firebasedatabaseexample.util.FontsOverride;
/**
* Created by vamsi on 06-05-2017 for android custom font article
*/
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.coderefer.firebasedatabaseexample">
<application
android:name=".CustomFontApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
<resources> <!-- Base application theme for Android Custom Font -->
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. -->
<item name="android:typeface">monospace</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style> <!--Defining colors for TextInputLayout's EditText-->
<style name="TextLabel" parent="TextAppearance.AppCompat"> <!-- Hint color and label color in FALSE state -->
<item name="android:textColorHint">#9575cd</item>
<item name="android:textSize">20sp