diff --git a/README.md b/README.md index c91559f..a9833b2 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ For demonstration and experimentation, an apk of the sample project can be downl 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. ```gradle -implementation 'me.jfenn:attribouter:0.1.1' +implementation 'me.jfenn:attribouter:0.1.2' ``` #### Starting an Activity diff --git a/attribouter/build.gradle b/attribouter/build.gradle index 853a909..7f78793 100644 --- a/attribouter/build.gradle +++ b/attribouter/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'com.android.library' ext { PUBLISH_GROUP_ID = 'me.jfenn' PUBLISH_ARTIFACT_ID = 'attribouter' - PUBLISH_VERSION = '0.1.1' + PUBLISH_VERSION = '0.1.2' } android { @@ -12,8 +12,8 @@ android { defaultConfig { minSdkVersion 15 targetSdkVersion 27 - versionCode 10 - versionName "0.1.1" + versionCode 11 + versionName "0.1.2" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true diff --git a/attribouter/src/main/java/me/jfenn/attribouter/wedges/AppWedge.java b/attribouter/src/main/java/me/jfenn/attribouter/wedges/AppWedge.java index 23e2a24..6bc1665 100644 --- a/attribouter/src/main/java/me/jfenn/attribouter/wedges/AppWedge.java +++ b/attribouter/src/main/java/me/jfenn/attribouter/wedges/AppWedge.java @@ -132,15 +132,15 @@ public void bind(final Context context, ViewHolder viewHolder) { } else viewHolder.links.setVisibility(View.GONE); } - static class ViewHolder extends Wedge.ViewHolder { + protected static class ViewHolder extends Wedge.ViewHolder { - ImageView appIconView; - TextView nameTextView; - TextView versionTextView; - TextView descriptionTextView; - RecyclerView links; + protected ImageView appIconView; + protected TextView nameTextView; + protected TextView versionTextView; + protected TextView descriptionTextView; + protected RecyclerView links; - private ViewHolder(View v) { + protected ViewHolder(View v) { super(v); appIconView = v.findViewById(R.id.appIcon); nameTextView = v.findViewById(R.id.appName); diff --git a/attribouter/src/main/java/me/jfenn/attribouter/wedges/ContributorWedge.java b/attribouter/src/main/java/me/jfenn/attribouter/wedges/ContributorWedge.java index 0e19056..6419b21 100644 --- a/attribouter/src/main/java/me/jfenn/attribouter/wedges/ContributorWedge.java +++ b/attribouter/src/main/java/me/jfenn/attribouter/wedges/ContributorWedge.java @@ -57,7 +57,7 @@ public ContributorWedge(XmlResourceParser parser) throws XmlPullParserException, addChildren(parser); } - ContributorWedge(@Nullable String login, @Nullable String name, @Nullable String avatarUrl, @Nullable String task, @Nullable Integer position, @Nullable String bio, @Nullable String blog, @Nullable String email) { + protected ContributorWedge(@Nullable String login, @Nullable String name, @Nullable String avatarUrl, @Nullable String task, @Nullable Integer position, @Nullable String bio, @Nullable String blog, @Nullable String email) { super(R.layout.item_attribouter_contributor); this.login = login; this.name = name; @@ -172,13 +172,13 @@ public void onClick(View view) { } } - static class ViewHolder extends Wedge.ViewHolder { + protected static class ViewHolder extends Wedge.ViewHolder { - private ImageView imageView; - private TextView nameView; - private TextView taskView; + protected ImageView imageView; + protected TextView nameView; + protected TextView taskView; - ViewHolder(View v) { + protected ViewHolder(View v) { super(v); imageView = v.findViewById(R.id.image); nameView = v.findViewById(R.id.name); diff --git a/attribouter/src/main/java/me/jfenn/attribouter/wedges/ContributorsWedge.java b/attribouter/src/main/java/me/jfenn/attribouter/wedges/ContributorsWedge.java index e680a30..4dc61a2 100644 --- a/attribouter/src/main/java/me/jfenn/attribouter/wedges/ContributorsWedge.java +++ b/attribouter/src/main/java/me/jfenn/attribouter/wedges/ContributorsWedge.java @@ -266,29 +266,29 @@ public void onClick(View v) { } else viewHolder.expand.setVisibility(View.GONE); } - class ViewHolder extends Wedge.ViewHolder { - - private TextView titleView; - - private View topThreeView; - private View firstView; - private ImageView firstImageView; - private TextView firstNameView; - private TextView firstTaskView; - private View secondView; - private ImageView secondImageView; - private TextView secondNameView; - private TextView secondTaskView; - private View thirdView; - private ImageView thirdImageView; - private TextView thirdNameView; - private TextView thirdTaskView; - private View expand; - private TextView overflow; - - private RecyclerView recycler; - - ViewHolder(View v) { + protected class ViewHolder extends Wedge.ViewHolder { + + protected TextView titleView; + + protected View topThreeView; + protected View firstView; + protected ImageView firstImageView; + protected TextView firstNameView; + protected TextView firstTaskView; + protected View secondView; + protected ImageView secondImageView; + protected TextView secondNameView; + protected TextView secondTaskView; + protected View thirdView; + protected ImageView thirdImageView; + protected TextView thirdNameView; + protected TextView thirdTaskView; + protected View expand; + protected TextView overflow; + + protected RecyclerView recycler; + + protected ViewHolder(View v) { super(v); titleView = v.findViewById(R.id.contributorsTitle); diff --git a/attribouter/src/main/java/me/jfenn/attribouter/wedges/LicenseWedge.java b/attribouter/src/main/java/me/jfenn/attribouter/wedges/LicenseWedge.java index 08df0b4..f890d22 100644 --- a/attribouter/src/main/java/me/jfenn/attribouter/wedges/LicenseWedge.java +++ b/attribouter/src/main/java/me/jfenn/attribouter/wedges/LicenseWedge.java @@ -81,7 +81,7 @@ public LicenseWedge(XmlResourceParser parser) throws IOException, XmlPullParserE addChildren(parser); } - public LicenseWedge(@Nullable String repo, @Nullable String title, @Nullable String description, @Nullable String licenseName, @Nullable String websiteUrl, @Nullable String gitHubUrl, @Nullable String licenseUrl, @Nullable String[] licensePermissions, @Nullable String[] licenseConditions, @Nullable String[] licenseLimitations, @Nullable String licenseDescription, @Nullable String licenseBody, @Nullable String licenseKey) { + protected LicenseWedge(@Nullable String repo, @Nullable String title, @Nullable String description, @Nullable String licenseName, @Nullable String websiteUrl, @Nullable String gitHubUrl, @Nullable String licenseUrl, @Nullable String[] licensePermissions, @Nullable String[] licenseConditions, @Nullable String[] licenseLimitations, @Nullable String licenseDescription, @Nullable String licenseBody, @Nullable String licenseKey) { super(R.layout.item_attribouter_license); this.repo = repo; this.title = title; @@ -340,14 +340,14 @@ public boolean isHidden() { return false; } - static class ViewHolder extends Wedge.ViewHolder { + protected static class ViewHolder extends Wedge.ViewHolder { - private TextView titleView; - private TextView descriptionView; - private TextView licenseView; - private RecyclerView links; + protected TextView titleView; + protected TextView descriptionView; + protected TextView licenseView; + protected RecyclerView links; - ViewHolder(View v) { + protected ViewHolder(View v) { super(v); titleView = v.findViewById(R.id.title); diff --git a/attribouter/src/main/java/me/jfenn/attribouter/wedges/LicensesWedge.java b/attribouter/src/main/java/me/jfenn/attribouter/wedges/LicensesWedge.java index 3062659..bdc5dc2 100644 --- a/attribouter/src/main/java/me/jfenn/attribouter/wedges/LicensesWedge.java +++ b/attribouter/src/main/java/me/jfenn/attribouter/wedges/LicensesWedge.java @@ -221,14 +221,14 @@ public void onClick(View v) { } else viewHolder.expand.setVisibility(View.GONE); } - static class ViewHolder extends Wedge.ViewHolder { + protected static class ViewHolder extends Wedge.ViewHolder { - private TextView titleView; - private RecyclerView recycler; - private View expand; - private TextView overflow; + protected TextView titleView; + protected RecyclerView recycler; + protected View expand; + protected TextView overflow; - ViewHolder(View v) { + protected ViewHolder(View v) { super(v); titleView = v.findViewById(R.id.title); recycler = v.findViewById(R.id.recycler); diff --git a/attribouter/src/main/java/me/jfenn/attribouter/wedges/TranslatorWedge.java b/attribouter/src/main/java/me/jfenn/attribouter/wedges/TranslatorWedge.java index 863f632..d13d1de 100644 --- a/attribouter/src/main/java/me/jfenn/attribouter/wedges/TranslatorWedge.java +++ b/attribouter/src/main/java/me/jfenn/attribouter/wedges/TranslatorWedge.java @@ -42,7 +42,7 @@ public TranslatorWedge(XmlResourceParser parser) throws IOException, XmlPullPars parser.getAttributeValue(null, "email")); } - TranslatorWedge(@Nullable String login, @Nullable String name, @Nullable String avatarUrl, @Nullable String locales, @Nullable String blog, @Nullable String email) { + protected TranslatorWedge(@Nullable String login, @Nullable String name, @Nullable String avatarUrl, @Nullable String locales, @Nullable String blog, @Nullable String email) { super(R.layout.item_attribouter_translator); this.login = login; this.name = name; @@ -131,12 +131,12 @@ public void bind(Context context, ViewHolder viewHolder) { } else viewHolder.itemView.setOnClickListener(null); } - static class ViewHolder extends Wedge.ViewHolder { + protected static class ViewHolder extends Wedge.ViewHolder { - private ImageView imageView; - private TextView nameView; + protected ImageView imageView; + protected TextView nameView; - ViewHolder(View v) { + protected ViewHolder(View v) { super(v); imageView = v.findViewById(R.id.image); nameView = v.findViewById(R.id.name); diff --git a/attribouter/src/main/java/me/jfenn/attribouter/wedges/TranslatorsWedge.java b/attribouter/src/main/java/me/jfenn/attribouter/wedges/TranslatorsWedge.java index 42bc53b..5688c32 100644 --- a/attribouter/src/main/java/me/jfenn/attribouter/wedges/TranslatorsWedge.java +++ b/attribouter/src/main/java/me/jfenn/attribouter/wedges/TranslatorsWedge.java @@ -158,14 +158,14 @@ public void onClick(View v) { } else viewHolder.expand.setVisibility(View.GONE); } - class ViewHolder extends Wedge.ViewHolder { + protected class ViewHolder extends Wedge.ViewHolder { - private TextView titleView; - private RecyclerView recycler; - private View expand; - private TextView overflow; + protected TextView titleView; + protected RecyclerView recycler; + protected View expand; + protected TextView overflow; - ViewHolder(View v) { + protected ViewHolder(View v) { super(v); titleView = v.findViewById(R.id.contributorsTitle); diff --git a/attribouter/src/main/java/me/jfenn/attribouter/wedges/Wedge.java b/attribouter/src/main/java/me/jfenn/attribouter/wedges/Wedge.java index 51c6d35..9e4d8e8 100644 --- a/attribouter/src/main/java/me/jfenn/attribouter/wedges/Wedge.java +++ b/attribouter/src/main/java/me/jfenn/attribouter/wedges/Wedge.java @@ -32,7 +32,7 @@ public Wedge(@LayoutRes int layoutRes) { children = new ArrayList<>(); } - void addChildren(XmlResourceParser parser) throws IOException, XmlPullParserException { + protected void addChildren(XmlResourceParser parser) throws IOException, XmlPullParserException { while (parser.next() != XmlResourceParser.END_TAG || !parser.getName().equals(getClass().getName())) { if (parser.getEventType() == XmlResourceParser.START_TAG) { try { diff --git a/attribouter/src/main/java/me/jfenn/attribouter/wedges/link/LinkWedge.java b/attribouter/src/main/java/me/jfenn/attribouter/wedges/link/LinkWedge.java index 290e117..7952e78 100644 --- a/attribouter/src/main/java/me/jfenn/attribouter/wedges/link/LinkWedge.java +++ b/attribouter/src/main/java/me/jfenn/attribouter/wedges/link/LinkWedge.java @@ -9,10 +9,10 @@ import android.widget.TextView; import me.jfenn.attribouter.R; -import me.jfenn.attribouter.wedges.Wedge; import me.jfenn.attribouter.interfaces.Mergeable; import me.jfenn.attribouter.utils.ResourceUtils; import me.jfenn.attribouter.utils.UrlClickListener; +import me.jfenn.attribouter.wedges.Wedge; public class LinkWedge extends Wedge implements Mergeable { @@ -145,12 +145,12 @@ public int compareTo(Context context, @NonNull LinkWedge o) { return ((o.priority - priority) * 2) + (comparison != 0 ? comparison / Math.abs(comparison) : 0); } - public static class ViewHolder extends Wedge.ViewHolder { + protected static class ViewHolder extends Wedge.ViewHolder { - private TextView nameView; - private ImageView iconView; + protected TextView nameView; + protected ImageView iconView; - ViewHolder(View v) { + protected ViewHolder(View v) { super(v); nameView = v.findViewById(R.id.name); iconView = v.findViewById(R.id.icon);