forked from Nilhcem/hosts-editor-android
-
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
8 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
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,43 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res/com.nilhcem.hostseditor" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingBottom="10dp" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="10dp" > | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" > | ||
|
||
<!-- Content --> | ||
<com.nilhcem.hostseditor.widget.TypefacedTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/about_text" | ||
android:textSize="16sp" | ||
app:typeface="fonts/Roboto-Regular.ttf" /> | ||
|
||
<!-- GitHub button --> | ||
<com.nilhcem.hostseditor.widget.TypefacedButton | ||
android:id="@+id/aboutGitHub" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="12dp" | ||
android:layout_marginTop="12dp" | ||
android:text="@string/about_github_button" | ||
app:typeface="fonts/Roboto-Regular.ttf" /> | ||
|
||
<!-- Date - Author --> | ||
<com.nilhcem.hostseditor.widget.TypefacedTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center" | ||
android:text="@string/about_author" | ||
app:typeface="fonts/Roboto-Italic.ttf" /> | ||
</LinearLayout> | ||
|
||
</ScrollView> |
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
37 changes: 37 additions & 0 deletions
37
src/com/nilhcem/hostseditor/about/AboutDialogFragment.java
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,37 @@ | ||
package com.nilhcem.hostseditor.about; | ||
|
||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.Button; | ||
import butterknife.InjectView; | ||
import butterknife.Views; | ||
|
||
import com.actionbarsherlock.app.SherlockDialogFragment; | ||
import com.nilhcem.hostseditor.R; | ||
|
||
public class AboutDialogFragment extends SherlockDialogFragment implements View.OnClickListener { | ||
public static final String TAG = "AboutDialogFragment"; | ||
private static final String GITHUB_URL = "https://github.com/Nilhcem/hosts-editor-android"; | ||
|
||
@InjectView(R.id.aboutGitHub) Button mGitHubBtn; | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | ||
View view = inflater.inflate(R.layout.about_dialog, container, false); | ||
Views.inject(this, view); | ||
getDialog().setTitle(R.string.about_title); | ||
|
||
mGitHubBtn.setOnClickListener(this); | ||
return view; | ||
} | ||
|
||
@Override | ||
public void onClick(View v) { | ||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(GITHUB_URL)); | ||
startActivity(browserIntent); | ||
} | ||
} |
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