-
Notifications
You must be signed in to change notification settings - Fork 27
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
46118cc
commit 35ac97c
Showing
6 changed files
with
102 additions
and
23 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,13 +28,15 @@ 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); | ||
|
||
fork.setOnClickListener(this); | ||
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:[email protected]?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")); | ||
|
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