Created
October 23, 2017 05:54
-
-
Save AswinpAshok/d41cf54fa676cb59350f6e8b2dc8a59d to your computer and use it in GitHub Desktop.
School Management Kotlin application class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sandftechnologies.schoolmanagementStaff.ModelClasses | |
import android.app.Application | |
import android.content.Context | |
import android.content.SharedPreferences | |
import android.graphics.Typeface | |
import android.widget.ArrayAdapter | |
import com.facebook.drawee.backends.pipeline.Fresco | |
import com.sandftechnologies.schoolmanagementStaff.Activities.ViewStudent | |
import com.sandftechnologies.schoolmanagementStaff.DataCache | |
import com.sandftechnologies.schoolmanagementStaff.HelperClass.DBHelper | |
import com.sandftechnologies.schoolmanagementStaff.Internet.GlobalVariables | |
/** | |
* Created by PC4 on 5/6/2017. | |
*/ | |
class Global : Application(), GlobalVariables { | |
override fun onCreate() { | |
super.onCreate() | |
Fresco.initialize(this) | |
student = StudentCompleteModel() | |
typeface = Typeface.createFromAsset(assets, "fonts/Roboto-Light.ttf") | |
typefaceBold = Typeface.createFromAsset(assets, "fonts/Roboto-Regular.ttf") | |
val dbHelper = DBHelper.getInstance(this) | |
mDatacache = DataCache.getInstance() | |
val shared = getSharedPreferences(GlobalVariables.Shared_Pref_Name, Context.MODE_PRIVATE) | |
userID = shared.getString("userID", "") | |
firmID = shared.getString("firmID", "") | |
} | |
companion object { | |
//ClassId,RegDate---, flag=0-->details[Name,id,Roll,attendance[0,1,a,p]] | |
//flag=1-->+Atd_Id | |
var CategoryAdapter: ArrayAdapter<String>? = null | |
var SelectedCategoryPosition: Int = 0 | |
var isStudentLoaded = false | |
var student :StudentCompleteModel ?=null/* (Name, Rollnumber, MobileNumber, FatherName, MotherName, Email, DoB, Gender, Religion, Cast, CategoryName, Profilepic, S_Addressline1, S_Addressline2, S_AddressPIN, P_AddressLine1, P_AddressLine2, P_AddressPIN, Id, ClassId, ClassName, AddressFlag, Date_Admsn, Standard_Admited, Identification, Is_Former, Former_Madrasa, MadrasaRegNo, Tc_Number, Guardian_Name, G_AddressLine1, G_AddressLine2, G_AddressPIN, G_Relation, G_Occupation, AdmissionNumber) =*/ | |
var CategoryMap: Map<String, Int>? = null | |
var typeface: Typeface? = null | |
private set | |
var typefaceBold: Typeface? = null | |
private set | |
private var mDatacache: DataCache? = null | |
var userID: String? = null | |
private set | |
var firmID: String? = null | |
private set | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment