-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
19 changed files
with
181 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package br.com.developbox.desenhosabe; | ||
|
||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.view.Menu; | ||
import android.view.MenuItem; | ||
import android.view.View; | ||
import android.widget.Button; | ||
|
||
public class Info extends AppCompatActivity { | ||
|
||
Button seeMoreButton; | ||
Button bugReportButton; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_info); | ||
|
||
seeMoreButton = (Button) findViewById(R.id.seeMoreButton); | ||
bugReportButton = (Button) findViewById(R.id.bugReportButton); | ||
|
||
seeMoreButton.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View view) { | ||
Uri githubUrl = Uri.parse("https://github.com/1fabiosoares/DesenhoSabe"); | ||
Intent it = new Intent(Intent.ACTION_VIEW, githubUrl); | ||
|
||
startActivity(it); | ||
} | ||
}); | ||
|
||
bugReportButton.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View view) { | ||
composeEmail(new String[] {"fabioars@live.com"}, getString(R.string.bug_repport)+":"+getString(R.string.app_name)+" "+getString(R.string.app_version), getString(R.string.bug_text)); | ||
} | ||
}); | ||
} | ||
|
||
@Override | ||
public boolean onCreateOptionsMenu(Menu menu){ | ||
getSupportActionBar().setDisplayHomeAsUpEnabled(true); | ||
|
||
getSupportActionBar().setTitle(R.string.info); | ||
|
||
return super.onCreateOptionsMenu(menu); | ||
} | ||
@Override | ||
public boolean onOptionsItemSelected(MenuItem item){ | ||
switch (item.getItemId()){ | ||
case android.R.id.home: | ||
finish(); | ||
return true; | ||
} | ||
|
||
return super.onOptionsItemSelected(item); | ||
} | ||
public void composeEmail(String[] addresses, String subject, String text) { | ||
Intent intent = new Intent(Intent.ACTION_SENDTO); | ||
intent.setData(Uri.parse("mailto:")); // only email apps should handle this | ||
intent.putExtra(Intent.EXTRA_EMAIL, addresses); | ||
intent.putExtra(Intent.EXTRA_SUBJECT, subject); | ||
if (intent.resolveActivity(getPackageManager()) != null) { | ||
startActivity(intent); | ||
} | ||
} | ||
|
||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,70 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin" | ||
tools:context="br.com.developbox.desenhosabe.Info"> | ||
|
||
<ImageView | ||
android:layout_width="200dp" | ||
android:layout_height="200dp" | ||
android:id="@+id/imageView" | ||
android:layout_alignParentTop="true" | ||
android:layout_centerHorizontal="true" | ||
android:src="@drawable/ic_launcher"/> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textAppearance="?android:attr/textAppearanceLarge" | ||
android:text="@string/app_name" | ||
android:id="@+id/textView" | ||
android:layout_below="@+id/imageView" | ||
android:layout_centerHorizontal="true" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textAppearance="?android:attr/textAppearanceMedium" | ||
android:text="@string/app_submane" | ||
android:id="@+id/textView2" | ||
android:layout_below="@+id/textView" | ||
android:layout_centerHorizontal="true" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/app_version" | ||
android:id="@+id/textView3" | ||
android:layout_below="@+id/textView2" | ||
android:layout_centerHorizontal="true" /> | ||
|
||
<LinearLayout | ||
android:orientation="horizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_below="@+id/textView3" | ||
android:layout_marginTop="30dp" | ||
android:layout_alignParentRight="true" | ||
android:layout_alignParentEnd="true"> | ||
|
||
<Button | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/bug_repport" | ||
android:id="@+id/bugReportButton" | ||
style="@style/Widget.AppCompat.Button.Borderless.Colored" /> | ||
|
||
<Button | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/see_more" | ||
android:id="@+id/seeMoreButton" | ||
style="@style/Widget.AppCompat.Button.Colored" /> | ||
</LinearLayout> | ||
|
||
</RelativeLayout> |
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 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:id="@+id/infoBarButton" | ||
android:title="@string/info" | ||
android:icon="@drawable/ic_info_outline_white_24dp" | ||
android:showAsAction="ifRoom"/> | ||
|
||
</menu> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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