Skip to content

Commit 764357d

Browse files
committed
Add about page
1 parent 1862135 commit 764357d

File tree

7 files changed

+88
-31
lines changed

7 files changed

+88
-31
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Hold a wifi entry to display more details.
1111
- ~~Sort networks alphabetically~~ Done.
1212
- ~~An xposed component that adds an option in the stock wifi settings to display the QR code/password~~ Done.
1313
- ~~Backport to older android versions~~ Done.
14-
- An about page
14+
- ~~An about page~~ Done.
1515
- ~~Setting to choose the quality of the QR code generated~~ [Done.](https://github.com/hacker1024/android-wifi-qr-code-generator/commit/22a23887bc334000e5c71f66fcbbfda0197d7348)
1616
- ~~A dark theme~~ Done.
1717
- Make new bugs

app/src/main/AndroidManifest.xml

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,18 @@
44
package="tk.superl2.xwifi">
55

66
<!-- Ads are disabled while my account's under review. -->
7-
<!--<uses-permission android:name="android.permission.INTERNET" />-->
8-
<!--<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />-->
9-
<!--<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />-->
10-
<!--<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />-->
11-
<!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />-->
12-
7+
<!-- <uses-permission android:name="android.permission.INTERNET" /> -->
8+
<!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> -->
9+
<!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> -->
10+
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> -->
11+
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
1312
<application
1413
android:allowBackup="true"
1514
android:icon="@mipmap/ic_launcher"
1615
android:label="@string/app_name"
1716
android:roundIcon="@mipmap/ic_launcher_round"
1817
android:supportsRtl="true"
1918
android:theme="@style/AppTheme">
20-
2119
<meta-data
2220
android:name="xposedmodule"
2321
android:value="true" />
@@ -34,43 +32,51 @@
3432

3533
<category android:name="android.intent.category.LAUNCHER" />
3634
</intent-filter>
35+
3736
<meta-data
3837
android:name="android.app.searchable"
3938
android:resource="@xml/searchable" />
4039
</activity>
4140
<activity
4241
android:name=".SettingsActivity"
42+
android:exported="true"
4343
android:label="@string/title_activity_settings"
4444
android:parentActivityName=".MainActivity"
45-
tools:ignore="UnusedAttribute"
46-
android:exported="true">
45+
tools:ignore="UnusedAttribute">
46+
<meta-data
47+
android:name="android.support.PARENT_ACTIVITY"
48+
android:value="tk.superl2.xwifi.MainActivity" />
49+
</activity>
50+
<activity android:name=".AboutActivity"
51+
android:label="@string/title_activity_about"
52+
android:parentActivityName=".MainActivity">
4753
<meta-data
4854
android:name="android.support.PARENT_ACTIVITY"
4955
android:value="tk.superl2.xwifi.MainActivity" />
5056
</activity>
5157

5258
<!-- Ads are diabled while my account's under review. -->
53-
<!--<activity-->
54-
<!--android:name="com.mopub.common.MoPubBrowser"-->
55-
<!--android:configChanges="keyboardHidden|orientation|screenSize" />-->
56-
<!--<activity-->
57-
<!--android:name="com.mopub.mobileads.MoPubActivity"-->
58-
<!--android:configChanges="keyboardHidden|orientation|screenSize" />-->
59-
<!--<activity-->
60-
<!--android:name="com.mopub.mobileads.MraidActivity"-->
61-
<!--android:configChanges="keyboardHidden|orientation|screenSize" />-->
62-
<!--<activity-->
63-
<!--android:name="com.mopub.mobileads.RewardedMraidActivity"-->
64-
<!--android:configChanges="keyboardHidden|orientation|screenSize" />-->
65-
<!--<activity-->
66-
<!--android:name="com.mopub.mobileads.MraidVideoPlayerActivity"-->
67-
<!--android:configChanges="keyboardHidden|orientation|screenSize" />-->
68-
<!--<activity-->
69-
<!--android:name="com.applovin.adview.AppLovinInterstitialActivity"-->
70-
<!--android:configChanges="orientation|screenSize" />-->
71-
<!--<activity-->
72-
<!--android:name="com.applovin.adview.AppLovinConfirmationActivity"-->
73-
<!--android:configChanges="orientation|screenSize" />-->
59+
<!-- <activity -->
60+
<!-- android:name="com.mopub.common.MoPubBrowser" -->
61+
<!-- android:configChanges="keyboardHidden|orientation|screenSize" /> -->
62+
<!-- <activity -->
63+
<!-- android:name="com.mopub.mobileads.MoPubActivity" -->
64+
<!-- android:configChanges="keyboardHidden|orientation|screenSize" /> -->
65+
<!-- <activity -->
66+
<!-- android:name="com.mopub.mobileads.MraidActivity" -->
67+
<!-- android:configChanges="keyboardHidden|orientation|screenSize" /> -->
68+
<!-- <activity -->
69+
<!-- android:name="com.mopub.mobileads.RewardedMraidActivity" -->
70+
<!-- android:configChanges="keyboardHidden|orientation|screenSize" /> -->
71+
<!-- <activity -->
72+
<!-- android:name="com.mopub.mobileads.MraidVideoPlayerActivity" -->
73+
<!-- android:configChanges="keyboardHidden|orientation|screenSize" /> -->
74+
<!-- <activity -->
75+
<!-- android:name="com.applovin.adview.AppLovinInterstitialActivity" -->
76+
<!-- android:configChanges="orientation|screenSize" /> -->
77+
<!-- <activity -->
78+
<!-- android:name="com.applovin.adview.AppLovinConfirmationActivity" -->
79+
<!-- android:configChanges="orientation|screenSize" /> -->
7480

7581
<provider
7682
android:name=".PreferenceProvider"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package tk.superl2.xwifi
2+
3+
import android.content.Intent
4+
import android.net.Uri
5+
import android.support.v7.app.AppCompatActivity
6+
import android.os.Bundle
7+
import android.preference.PreferenceManager
8+
import android.view.View
9+
import husaynhakeem.com.aboutpage.AboutPage
10+
import husaynhakeem.com.aboutpage.Item
11+
12+
class AboutActivity: AppCompatActivity() {
13+
override fun onCreate(savedInstanceState: Bundle?) {
14+
setThemeFromSharedPrefs(PreferenceManager.getDefaultSharedPreferences(this))
15+
super.onCreate(savedInstanceState)
16+
setContentView(AboutPage(this)
17+
.setImage(R.mipmap.ic_launcher)
18+
.setDescription(R.string.about_description)
19+
.addItem(Item("Wifi QR Code Creator v${BuildConfig.VERSION_NAME}", R.mipmap.ic_launcher_round, View.OnClickListener {
20+
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/hacker1024/android-wifi-qr-code-generator/releases/tag/v${BuildConfig.VERSION_NAME}")))
21+
}))
22+
.addItem(Item("README on Github", R.drawable.ic_info_outline_24dp, View.OnClickListener {
23+
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/hacker1024/android-wifi-qr-code-generator/blob/v${BuildConfig.VERSION_NAME}/README.md")))
24+
}))
25+
.addEmail("Contact me by email", "[email protected]")
26+
.addGithub("hacker1024/android-wifi-qr-code-generator")
27+
.create())
28+
}
29+
}

app/src/main/java/tk/superl2/xwifi/MainActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,11 @@ class MainActivity: AppCompatActivity() {
375375
sortWifiEntries(false, true)
376376
true
377377
}
378+
R.id.aboutItem -> {
379+
// Start about activity
380+
startActivity(Intent(this, AboutActivity::class.java))
381+
true
382+
}
378383
else -> super.onOptionsItemSelected(item)
379384
}
380385
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="?attr/textColorAlertDialogListItem"
8+
android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z" />
9+
</vector>

app/src/main/res/menu/menu_activity_main.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@
1818
android:icon="@drawable/ic_settings_24dp"
1919
android:title="@string/item_settings_menu_activity_main"
2020
app:showAsAction="never" />
21+
<item
22+
android:id="@+id/aboutItem"
23+
android:icon="@drawable/ic_info_outline_24dp"
24+
android:title="@string/item_about_menu_activity_main"
25+
app:showAsAction="never" />
2126
</menu>

app/src/main/res/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@
1111
<string name="item_sort_menu_activity_main">Sort order</string>
1212
<string name="item_search_menu_activity_main">Search</string>
1313
<string name="security_type_image_description">Security</string>
14+
<string name="item_about_menu_activity_main">About</string>
15+
<string name="about_description" >This app allows you to easily view saved wifi network details like SSIDs, passwords, and security types, and share them as QR codes. It\'s also an xposed module that puts shortcuts to do those things right in the system wifi settings. Read the README on github for more information.</string>
16+
<string name="title_activity_about">About</string>
1417
</resources>

0 commit comments

Comments
 (0)