Skip to content

Commit 41c6019

Browse files
authored
Merge pull request #59 from TheAndroidMaster/develop
Version 0.1.4
2 parents ed12bb1 + 13f4fde commit 41c6019

File tree

19 files changed

+372
-378
lines changed

19 files changed

+372
-378
lines changed

README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,13 @@ For demonstration and experimentation, an apk of the sample project can be downl
1515
## Usage
1616

1717
The Gradle dependency is available through jCenter, which is used by default in Android Studio. To add the dependency to your project, copy this line into the dependencies section of your app's build.gradle file.
18-
19-
##### AndroidX
2018

21-
The Android support libraries are being refactored from `android.support.*` to `androidx.*` as detailed [here](https://developer.android.com/topic/libraries/support-library/androidx-overview). Until the refactored libraries reach version `1.0.0` (as of the time of writing the latest verison is `1.0.0-rc02`), two versions of Attribouter will be released - one for AndroidX, and one for old support libraries.
22-
2319
```gradle
24-
implementation 'me.jfenn:attribouter:0.1.3'
25-
```
26-
27-
##### Old Support Libraries
28-
29-
```gradle
30-
implementation 'me.jfenn:attribouter:0.1.2'
20+
implementation 'me.jfenn:attribouter:0.1.4'
3121
```
22+
##### Support Libraries
3223

24+
The Android support libraries have been refactored from `android.support.*` to `androidx.*` as detailed [here](https://developer.android.com/topic/libraries/support-library/androidx-overview). As such, Attribouter only uses the new dependencies. If your project still uses the older support libraries for some reason, you may either compile your own version of Attribouter or use the last version to use the old support libraries, `0.1.2`.
3325

3426
### Starting an Activity
3527
This is pretty simple.

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ android {
2424

2525
dependencies {
2626
implementation fileTree(dir: 'libs', include: ['*.jar'])
27-
implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
28-
implementation 'com.google.android.material:material:1.0.0-rc02'
27+
implementation 'androidx.appcompat:appcompat:1.0.0'
28+
implementation 'com.google.android.material:material:1.0.0'
2929
testImplementation 'junit:junit:4.12'
3030
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
3131
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'

attribouter/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
33
ext {
44
PUBLISH_GROUP_ID = 'me.jfenn'
55
PUBLISH_ARTIFACT_ID = 'attribouter'
6-
PUBLISH_VERSION = '0.1.3'
6+
PUBLISH_VERSION = '0.1.4'
77
}
88

99
android {
@@ -12,8 +12,8 @@ android {
1212
defaultConfig {
1313
minSdkVersion 15
1414
targetSdkVersion 28
15-
versionCode 12
16-
versionName "0.1.3"
15+
versionCode 13
16+
versionName "0.1.4"
1717

1818
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1919
vectorDrawables.useSupportLibrary = true
@@ -30,9 +30,9 @@ android {
3030

3131
dependencies {
3232
implementation fileTree(dir: 'libs', include: ['*.jar'])
33-
implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
34-
implementation 'androidx.browser:browser:1.0.0-rc02'
35-
implementation 'com.google.android.material:material:1.0.0-rc02'
33+
implementation 'androidx.appcompat:appcompat:1.0.0'
34+
implementation 'androidx.browser:browser:1.0.0'
35+
implementation 'com.google.android.material:material:1.0.0'
3636
implementation 'com.google.code.gson:gson:2.8.4'
3737
implementation 'com.google.android:flexbox:1.0.0'
3838
implementation 'com.github.bumptech.glide:glide:4.7.1'

attribouter/src/main/java/me/jfenn/attribouter/wedges/link/LinkWedge.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.content.Context;
44
import android.content.res.XmlResourceParser;
55
import android.view.View;
6+
import android.webkit.URLUtil;
67
import android.widget.ImageView;
78
import android.widget.TextView;
89

@@ -44,7 +45,8 @@ public LinkWedge(@Nullable String id, @Nullable String name, @Nullable String ur
4445
super(R.layout.item_attribouter_link);
4546
this.id = id;
4647
this.name = name;
47-
this.url = url;
48+
if (url != null && url.length() > 0)
49+
this.url = url.startsWith("http") ? url : "http://" + url;
4850
this.icon = icon;
4951
this.isHidden = isHidden;
5052
this.priority = priority;
@@ -69,7 +71,7 @@ public String getName(Context context) {
6971
*/
7072
@Nullable
7173
public View.OnClickListener getListener(Context context) {
72-
if (url != null && url.length() > 0)
74+
if (url != null && url.length() > 0 && URLUtil.isValidUrl(url))
7375
return new UrlClickListener(ResourceUtils.getString(context, url));
7476
else return null;
7577
}

docs/README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@ Welcome to Attribouter's in-depth documentation page! It provides several exampl
22

33
## Tutorials
44

5-
- [The Configuration File](./CONFIGURATION.md)
6-
- [Overriding Resources and Providing Translations](./RESOURCES.md)
7-
- [Extending A Wedge](./SUBWEDGING.md)
8-
- [Custom Themes](./THEMING.md)
5+
- [The Configuration File](./configuration.md)
6+
- [Overriding Resources and Providing Translations](./resources.md)
7+
- [Extending A Wedge](./subwedging.md)
8+
- [Custom Themes](./theming.md)
99

1010
## Docs
1111

12-
- [AppWedge](./wedges/APP.md)
13-
- [ContributorsWedge](./wedges/CONTRIBUTORS.md)
14-
- [ContributorWedge](./wedges/CONTRIBUTOR.md)
15-
- [LicensesWedge](./wedges/LICENSES.md)
16-
- [LicenseWedge](./wedges/LICENSE.md)
17-
- [TranslatorsWedge](./wedges/TRANSLATORS.md)
18-
- [TranslatorWedge](./wedges/TRANSLATOR.md)
19-
- [TextWedge](./wedges/TEXT.md)
20-
- [LinkWedge](./wedges/LINK.md)
21-
- [EmailLinkWedge](./wedges/LINK.md#email)
22-
- [LicenseLinkWedge](./wedges/LINK.md#license)
23-
- [PlayStoreLinkWedge](./wedges/LINK.md#play-store)
12+
- [AppWedge](./wedges/app.md)
13+
- [ContributorsWedge](./wedges/contributors.md)
14+
- [ContributorWedge](./wedges/contributor.md)
15+
- [LicensesWedge](./wedges/licenses.md)
16+
- [LicenseWedge](./wedges/license.md)
17+
- [TranslatorsWedge](./wedges/translators.md)
18+
- [TranslatorWedge](./wedges/translator.md)
19+
- [TextWedge](./wedges/text.md)
20+
- [LinkWedge](./wedges/link.md)
21+
- [EmailLinkWedge](./wedges/link.md#email)
22+
- [LicenseLinkWedge](./wedges/link.md#license)
23+
- [PlayStoreLinkWedge](./wedges/link.md#play-store)
2424

2525
## Automation
2626

27-
- [Fetching CrowdIn Translations](./utils/CROWDIN.md) by [@deletescape](https://github.com/deletescape)
27+
- [Fetching CrowdIn Translations](./utils/crowdin.md) by [@deletescape](https://github.com/deletescape)

0 commit comments

Comments
 (0)