diff --git a/app/build.gradle b/app/build.gradle index 1a51e95..6467e6f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,13 +4,13 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 28 + compileSdkVersion 30 defaultConfig { applicationId "govind.iiitl.app" minSdkVersion 16 - targetSdkVersion 28 - versionCode 7 - versionName "2.5.2" + targetSdkVersion 30 + versionCode 9 + versionName "2.6.0" compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/app/src/main/java/govind/iiitl/app/MainActivity.kt b/app/src/main/java/govind/iiitl/app/MainActivity.kt index c9b50e0..2c413cd 100644 --- a/app/src/main/java/govind/iiitl/app/MainActivity.kt +++ b/app/src/main/java/govind/iiitl/app/MainActivity.kt @@ -118,7 +118,7 @@ class MainActivity : AppCompatActivity() { private val isNetworkConnected: Boolean get() { val cm = (getSystemService(CONNECTIVITY_SERVICE) as ConnectivityManager) - return cm.activeNetworkInfo != null && cm.activeNetworkInfo.isConnected + return cm.activeNetworkInfo != null && cm.activeNetworkInfo!!.isConnected } private fun setUpToolbar() { diff --git a/app/src/main/java/govind/iiitl/app/activities/AboutPageActivity.java b/app/src/main/java/govind/iiitl/app/activities/AboutPageActivity.java index 6935fd7..a465336 100644 --- a/app/src/main/java/govind/iiitl/app/activities/AboutPageActivity.java +++ b/app/src/main/java/govind/iiitl/app/activities/AboutPageActivity.java @@ -1,5 +1,6 @@ package govind.iiitl.app.activities; +import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.pm.PackageManager; import android.graphics.Color; @@ -27,6 +28,7 @@ protected void onCreate(Bundle savedInstanceState) { LinearLayout fork = findViewById(R.id.Star_on_github); LinearLayout developers = findViewById(R.id.developers); LinearLayout rateApp = findViewById(R.id.rate_the_app); + LinearLayout sendMail = findViewById(R.id.send_mail); ImageView dsc_about = findViewById(R.id.dsc_about); TextView versionTextView = findViewById(R.id.app_version); @@ -34,6 +36,7 @@ protected void onCreate(Bundle savedInstanceState) { developers.setOnClickListener(this); rateApp.setOnClickListener(this); dsc_about.setOnClickListener(this); + sendMail.setOnClickListener(this); try { versionName = getApplicationContext().getPackageManager() @@ -61,11 +64,24 @@ public void onClick(View view) { case R.id.dsc_about: chromeCustomTabs(getResources().getString(R.string.dsc_website)); break; + case R.id.send_mail: + sendArticle(); + break; default: break; } } + private void sendArticle() { + String mailto = "mailto:dsc@iiitl.ac.in?subject=Question Paper submission"; + Intent emailIntent = new Intent(Intent.ACTION_SENDTO); + emailIntent.setData(Uri.parse(mailto)); + try { + startActivity(emailIntent); + } catch (ActivityNotFoundException e) { + } + } + private void chromeCustomTabs(String url) { CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); builder.setToolbarColor(Color.parseColor("#000000")); diff --git a/app/src/main/java/govind/iiitl/app/activities/signIn/Login.kt b/app/src/main/java/govind/iiitl/app/activities/signIn/Login.kt index 9a63fe4..2a12212 100644 --- a/app/src/main/java/govind/iiitl/app/activities/signIn/Login.kt +++ b/app/src/main/java/govind/iiitl/app/activities/signIn/Login.kt @@ -26,9 +26,10 @@ class Login : AppCompatActivity() { } else { //Init Providers providers = listOf( - EmailBuilder().build(), // new AuthUI.IdpConfig.PhoneBuilder().build(), + EmailBuilder().build() + // new AuthUI.IdpConfig.PhoneBuilder().build(), // new AuthUI.IdpConfig.FacebookBuilder().build(), - GoogleBuilder().build() + // GoogleBuilder().build() ) showSignInOptions() } diff --git a/app/src/main/res/layout/activity_about_page.xml b/app/src/main/res/layout/activity_about_page.xml index 487f76a..e204070 100644 --- a/app/src/main/res/layout/activity_about_page.xml +++ b/app/src/main/res/layout/activity_about_page.xml @@ -224,23 +224,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + android:orientation="horizontal" + android:padding="10dp"> + android:text="Made with" + android:textColor="#ffffff" + android:textSize="16sp" /> + android:textSize="16sp" /> + android:textSize="16sp" + android:textStyle="bold" /> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 1b93f83..bb5f86e 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -11,7 +11,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:background="@android:color/black"> + android:background="@color/colorBackground"> @@ -55,7 +54,6 @@