Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Vamsi Tallapudi vamsitallapudi

🎯
Focusing
Block or report user

Report or block vamsitallapudi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View styles.xml
<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
View AndroidManifest.xml
<?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"
View CustomFontApp.java
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
*/
View FontsOverride.java
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 {
View AndroidManifest.xml
<?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
View SplashScreen.java
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 {
View splash.xml
<?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"/>
View UploadToServer.php
<?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";
}
?>
View MainActivity.java
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;
View FilePath.java
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;
You can’t perform that action at this time.