-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90ddba6
commit 9bbaac6
Showing
19 changed files
with
225 additions
and
66 deletions.
There are no files selected for viewing
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":6},"path":"app-release.apk","properties":{"packageId":"com.piapps.flashcardpro","split":"","minSdkVersion":"17"}}] | ||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":9},"path":"app-release.apk","properties":{"packageId":"com.piapps.flashcardpro","split":"","minSdkVersion":"17"}}] |
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
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
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
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
63 changes: 31 additions & 32 deletions
63
app/src/main/java/com/piapps/flashcardpro/ui/AboutActivity.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,47 @@ | ||
package com.piapps.flashcardpro.ui | ||
|
||
import android.content.ActivityNotFoundException | ||
import android.content.Intent | ||
import android.net.Uri | ||
import android.os.Bundle | ||
import android.support.v7.app.AppCompatActivity | ||
import android.view.Gravity | ||
import android.view.View | ||
import android.widget.Toast | ||
import com.piapps.flashcardpro.R | ||
import mehdi.sakout.aboutpage.AboutPage | ||
import mehdi.sakout.aboutpage.Element | ||
import java.util.* | ||
import kotlinx.android.synthetic.main.activity_about.* | ||
|
||
|
||
/** | ||
* Created by abduaziz on 8/8/18. | ||
*/ | ||
|
||
class AboutActivity : AppCompatActivity(){ | ||
class AboutActivity : AppCompatActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
val aboutPage = AboutPage(this) | ||
.isRTL(false) | ||
.setImage(R.drawable.art) | ||
.setDescription(getString(R.string.description)) | ||
.addItem(Element().setTitle("Version ${packageManager.getPackageInfo(packageName,0).versionName}")) | ||
.addGroup("Connect with us") | ||
.addEmail("kayumovabduaziz@gmail.com") | ||
.addWebsite("http://inha.uz") | ||
.addFacebook("abduaziz.kayumov") | ||
.addYoutube("UCnQ3vq3LNsxrYGlGdziTrhA") | ||
.addPlayStore("com.piapps.flashcardpro") | ||
.addItem(getCopyRightsElement()) | ||
.create() | ||
setContentView(aboutPage) | ||
} | ||
setContentView(R.layout.activity_about) | ||
|
||
internal fun getCopyRightsElement(): Element { | ||
val copyRightsElement = Element() | ||
val copyrights = String.format(getString(R.string.copy_right), Calendar.getInstance().get(Calendar.YEAR)) | ||
copyRightsElement.setTitle(copyrights) | ||
copyRightsElement.setIconTint(mehdi.sakout.aboutpage.R.color.about_item_icon_color) | ||
copyRightsElement.iconNightTint = android.R.color.white | ||
copyRightsElement.gravity = Gravity.CENTER | ||
copyRightsElement.onClickListener = View.OnClickListener { Toast.makeText(this@AboutActivity, copyrights, Toast.LENGTH_SHORT).show() } | ||
return copyRightsElement | ||
} | ||
tvVersion.text = "Version ${packageManager.getPackageInfo(packageName, 0).versionName}" | ||
|
||
llEmail.setOnClickListener { | ||
val emailIntent = Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:")) | ||
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, arrayOf("kayumovabduaziz@gmail.com")) | ||
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Flashcards Maker") | ||
startActivity(emailIntent) | ||
} | ||
|
||
llGithub.setOnClickListener { | ||
val url = "https://github.com/AbduazizKayumov/Flashcard-Maker-Android" | ||
val i = Intent(Intent.ACTION_VIEW) | ||
i.data = Uri.parse(url) | ||
startActivity(i) | ||
} | ||
|
||
llPlayStore.setOnClickListener { | ||
val appPackageName = packageName | ||
try { | ||
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=$appPackageName"))) | ||
} catch (anfe: android.content.ActivityNotFoundException) { | ||
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=$appPackageName"))) | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24.0" | ||
android:viewportHeight="24.0"> | ||
<path | ||
android:fillColor="#E57373" | ||
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/> | ||
</vector> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.