-
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.
Merge pull request #10 from DevLuuk/develop
Develop
- Loading branch information
Showing
11 changed files
with
250 additions
and
49 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
45 changes: 45 additions & 0 deletions
45
app/src/main/java/nl/devluuk/sleepywifi/AboutActivity.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,45 @@ | ||
package nl.devluuk.sleepywifi; | ||
|
||
import android.app.ActionBar; | ||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.support.v4.app.NavUtils; | ||
import android.view.MenuItem; | ||
|
||
public class AboutActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_about); | ||
ActionBar actionBar = this.getActionBar(); | ||
if (actionBar != null){ | ||
actionBar.setDisplayHomeAsUpEnabled(true); | ||
} | ||
} | ||
|
||
/** | ||
* This hook is called whenever an item in your options menu is selected. | ||
* The default implementation simply returns false to have the normal | ||
* processing happen (calling the item's Runnable or sending a message to | ||
* its Handler as appropriate). You can use this method for any items | ||
* for which you would like to do processing without those other | ||
* facilities. | ||
* | ||
* <p>Derived classes should call through to the base class for it to | ||
* perform the default menu handling.</p> | ||
* | ||
* @param item The menu item that was selected. | ||
* @return boolean Return false to allow normal menu processing to | ||
* proceed, true to consume it here. | ||
* @see #onCreateOptionsMenu | ||
*/ | ||
@Override | ||
public boolean onOptionsItemSelected(MenuItem item) { | ||
int id = item.getItemId(); | ||
if (id == R.id.home){ | ||
NavUtils.navigateUpFromSameTask(this); | ||
} | ||
return super.onOptionsItemSelected(item); | ||
} | ||
} |
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,74 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".AboutActivity"> | ||
|
||
<ImageView | ||
android:id="@+id/imageView" | ||
android:layout_width="145dp" | ||
android:layout_height="145dp" | ||
android:layout_alignParentTop="true" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginTop="71dp" | ||
android:contentDescription="@string/image_description" | ||
android:src="@drawable/ic_launcher_round" /> | ||
|
||
<TextView | ||
android:id="@+id/about_info" | ||
android:layout_width="320dp" | ||
android:layout_height="79dp" | ||
android:layout_alignParentStart="true" | ||
android:layout_alignParentBottom="true" | ||
android:layout_marginStart="46dp" | ||
android:layout_marginBottom="285dp" | ||
android:fontFamily="sans-serif-condensed" | ||
android:text="@string/about_infoT" | ||
android:textAlignment="center" | ||
android:textSize="18sp" | ||
android:typeface="normal" /> | ||
|
||
<TextView | ||
android:id="@+id/author" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentBottom="true" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginBottom="240dp" | ||
android:text="@string/about_author" | ||
android:textAppearance="@style/TextAppearance.AppCompat.Display1" | ||
android:textSize="30sp" /> | ||
|
||
<TextView | ||
android:id="@+id/author_text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentBottom="true" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginBottom="220dp" | ||
android:text="@string/about_authorT" | ||
android:textSize="16sp" /> | ||
|
||
<TextView | ||
android:id="@+id/license" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentBottom="true" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginBottom="160dp" | ||
android:text="@string/about_license" | ||
android:textAppearance="@style/TextAppearance.AppCompat.Display1" | ||
android:textSize="30sp" /> | ||
|
||
<TextView | ||
android:id="@+id/license_text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentBottom="true" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginBottom="140dp" | ||
android:text="@string/about_licenseT" | ||
android:textSize="16sp" /> | ||
</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
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,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
<!--<item--> | ||
<!--android:orderInCategory="1"--> | ||
<!--android:id="@+id/action_settings"--> | ||
<!--android:title="@string/settings"--> | ||
<!--app:showAsAction="never" />--> | ||
<item | ||
android:orderInCategory="2" | ||
android:id="@+id/action_about" | ||
android:title="@string/about" | ||
app:showAsAction="never"/> | ||
</menu> |
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,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="app_name">SleepyWifi</string> | ||
<string name="on">Aan</string> | ||
<string name="off">Uit</string> | ||
<string name="about">Over</string> | ||
<string name="action_about">Over SleepyWifi</string> | ||
<string name="settings">Instellingen</string> | ||
<string name="action_settings">SleepyWifi Instellingen</string> | ||
<string name="about_info">SleepyWifi Informatie</string> | ||
<string name="about_license">Licensie</string> | ||
<string name="about_author">Auteur</string> | ||
<string name="about_licenseT">SleepyWifi heeft de GPL-3.0 of later licensie</string> | ||
<string name="about_authorT">SleepyWifi is ontwikkeld door Devluuk</string> | ||
<string name="about_infoT">Deze Android app brengt de optie \'Zet Wifi uit als de telefoon in slaapstand is\' terug voor android 8.1 of nieuwer.</string> | ||
<string name="app_state">"De app service staat: "</string> | ||
</resources> |
Oops, something went wrong.