forked from mozilla/MozStumbler
-
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
6 changed files
with
93 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:orientation="vertical" | ||
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=".AboutActivity" > | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center" | ||
android:textAppearance="?android:attr/textAppearanceLarge" | ||
android:text="@string/app_name" /> | ||
|
||
<TextView | ||
android:id="@+id/about_version" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center" | ||
android:textAppearance="?android:attr/textAppearanceMedium" | ||
android:text="@string/about_version" /> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center" | ||
android:textAppearance="?android:attr/textAppearanceMedium" | ||
android:paddingTop="32dp" | ||
android:onClick="onClick_ViewMore" | ||
android:clickable="true" | ||
android:textColor="#00e" | ||
android:text="@string/about_more" /> | ||
|
||
</LinearLayout> |
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,41 @@ | ||
package org.mozilla.mozstumbler; | ||
|
||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.view.Menu; | ||
import android.view.View; | ||
import android.widget.TextView; | ||
|
||
public class AboutActivity extends Activity { | ||
private static final String ABOUT_PAGE_URL = "https://wiki.mozilla.org/Services/Location/About"; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_about); | ||
} | ||
|
||
@Override | ||
protected void onStart() | ||
{ | ||
super.onStart(); | ||
|
||
TextView textView = (TextView) findViewById(R.id.about_version); | ||
String str = getResources().getString(R.string.about_version); | ||
str = String.format(str, PackageUtils.getAppVersion(this)); | ||
textView.setText(str); | ||
} | ||
|
||
public void onClick_ViewMore(View v) { | ||
Intent openAboutPage = new Intent(Intent.ACTION_VIEW, Uri.parse(ABOUT_PAGE_URL)); | ||
startActivity(openAboutPage); | ||
} | ||
|
||
@Override | ||
public boolean onCreateOptionsMenu(Menu menu) { | ||
return false; | ||
} | ||
|
||
} |
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