title: check file exist in assets folder in android
body: <p>how to check file exist in assets folder in android ?</p>
  
  <p>I'm using Android Studio and it doesn't seem like I have a assets folder. So I created one.</p>
  
  <p>I'm using this code to load my fonts :</p>
  
  <pre><code>File pdfFile = null;
  try {
      pdfFile = new File(new URI(("file:///android_assets/tahoma.ttf")));
      if (pdfFile.exists())
          Toast.makeText(MainActivity.this,"Exist",Toast.LENGTH_LONG).show();
      else
          Toast.makeText(MainActivity.this,"No Exist",Toast.LENGTH_LONG).show();
  } catch (URISyntaxException e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>structure for a project in Android Studio 0.5.2:</p>
  
  <pre><code>root-module
  |--.idea
  |--app
  |----build
  |----src
  |------main
  |--------assets
  |----------tahoma.ttf
  |--------java
  |----------source code here
  |--------res
  |------AndroidManifest.xml
  |----build.gradle
  </code></pre>
  
  <p>buidl.gradle file :</p>
  
  <pre><code>apply plugin: 'android'
  
  android {
      compileSdkVersion 19
      buildToolsVersion '19.1.0'
      sourceSets {
          main {
              assets.srcDirs = ['assets']
          }
      }
      defaultConfig {
          minSdkVersion 11
          targetSdkVersion 17
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
      dependencies {
          compile fileTree(dir: 'libs', include: ['*.jar'])
          compile files('libs/android-support-v4.jar')
  
      }
  }
  </code></pre>