Skip to content

Commit

Permalink
Merge pull request #59 from TheAndroidMaster/develop
Browse files Browse the repository at this point in the history
Version 0.1.4
  • Loading branch information
fennifith authored Sep 29, 2018
2 parents ed12bb1 + 13f4fde commit 41c6019
Show file tree
Hide file tree
Showing 19 changed files with 372 additions and 378 deletions.
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,13 @@ For demonstration and experimentation, an apk of the sample project can be downl
## Usage

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.

##### AndroidX

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.

```gradle
implementation 'me.jfenn:attribouter:0.1.3'
```

##### Old Support Libraries

```gradle
implementation 'me.jfenn:attribouter:0.1.2'
implementation 'me.jfenn:attribouter:0.1.4'
```
##### Support Libraries

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`.

### Starting an Activity
This is pretty simple.
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
implementation 'com.google.android.material:material:1.0.0-rc02'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
Expand Down
12 changes: 6 additions & 6 deletions attribouter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'me.jfenn'
PUBLISH_ARTIFACT_ID = 'attribouter'
PUBLISH_VERSION = '0.1.3'
PUBLISH_VERSION = '0.1.4'
}

android {
Expand All @@ -12,8 +12,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 28
versionCode 12
versionName "0.1.3"
versionCode 13
versionName "0.1.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand All @@ -30,9 +30,9 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
implementation 'androidx.browser:browser:1.0.0-rc02'
implementation 'com.google.android.material:material:1.0.0-rc02'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.browser:browser:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.code.gson:gson:2.8.4'
implementation 'com.google.android:flexbox:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.7.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.Context;
import android.content.res.XmlResourceParser;
import android.view.View;
import android.webkit.URLUtil;
import android.widget.ImageView;
import android.widget.TextView;

Expand Down Expand Up @@ -44,7 +45,8 @@ public LinkWedge(@Nullable String id, @Nullable String name, @Nullable String ur
super(R.layout.item_attribouter_link);
this.id = id;
this.name = name;
this.url = url;
if (url != null && url.length() > 0)
this.url = url.startsWith("http") ? url : "http://" + url;
this.icon = icon;
this.isHidden = isHidden;
this.priority = priority;
Expand All @@ -69,7 +71,7 @@ public String getName(Context context) {
*/
@Nullable
public View.OnClickListener getListener(Context context) {
if (url != null && url.length() > 0)
if (url != null && url.length() > 0 && URLUtil.isValidUrl(url))
return new UrlClickListener(ResourceUtils.getString(context, url));
else return null;
}
Expand Down
34 changes: 17 additions & 17 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ Welcome to Attribouter's in-depth documentation page! It provides several exampl

## Tutorials

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

## Docs

- [AppWedge](./wedges/APP.md)
- [ContributorsWedge](./wedges/CONTRIBUTORS.md)
- [ContributorWedge](./wedges/CONTRIBUTOR.md)
- [LicensesWedge](./wedges/LICENSES.md)
- [LicenseWedge](./wedges/LICENSE.md)
- [TranslatorsWedge](./wedges/TRANSLATORS.md)
- [TranslatorWedge](./wedges/TRANSLATOR.md)
- [TextWedge](./wedges/TEXT.md)
- [LinkWedge](./wedges/LINK.md)
- [EmailLinkWedge](./wedges/LINK.md#email)
- [LicenseLinkWedge](./wedges/LINK.md#license)
- [PlayStoreLinkWedge](./wedges/LINK.md#play-store)
- [AppWedge](./wedges/app.md)
- [ContributorsWedge](./wedges/contributors.md)
- [ContributorWedge](./wedges/contributor.md)
- [LicensesWedge](./wedges/licenses.md)
- [LicenseWedge](./wedges/license.md)
- [TranslatorsWedge](./wedges/translators.md)
- [TranslatorWedge](./wedges/translator.md)
- [TextWedge](./wedges/text.md)
- [LinkWedge](./wedges/link.md)
- [EmailLinkWedge](./wedges/link.md#email)
- [LicenseLinkWedge](./wedges/link.md#license)
- [PlayStoreLinkWedge](./wedges/link.md#play-store)

## Automation

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

0 comments on commit 41c6019

Please sign in to comment.