Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix attributes to avoid name collisions with other libraries #86

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
app:behavior_peekHeight="@dimen/bottom_sheet_peek_height"
android:id="@+id/bottom_sheet"
app:layout_behavior="@string/BottomSheetBehaviorGoogleMapsLike"
app:anchorPoint="@dimen/anchor_point"
app:customBottomSheetBehaviorAnchorPoint="@dimen/anchor_point"
app:behavior_hideable="true"
android:fitsSystemWindows="true">

Expand Down
11 changes: 4 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,22 @@
buildscript {
repositories {
google()
jcenter()
gradlePluginPortal()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.android.tools.build:gradle:7.2.2'
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

plugins {
id "com.jfrog.bintray" version "1.7.3"
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand All @@ -38,3 +34,4 @@ ext {
task clean(type: Delete) {
delete rootProject.buildDir
}

Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public BottomSheetBehaviorGoogleMapsLike( Context context, AttributeSet attrs )
mCollapsible = true;
a = context.obtainStyledAttributes(attrs, R.styleable.CustomBottomSheetBehavior);
if (attrs != null) {
mAnchorPoint = (int) a.getDimension( R.styleable.CustomBottomSheetBehavior_anchorPoint, 0);
mState = a.getInt(R.styleable.CustomBottomSheetBehavior_defaultState, STATE_ANCHOR_POINT);
mAnchorPoint = (int) a.getDimension( R.styleable.CustomBottomSheetBehavior_customBottomSheetBehaviorAnchorPoint, 0);
mState = a.getInt(R.styleable.CustomBottomSheetBehavior_customBottomSheetBehaviorDefaultState, STATE_ANCHOR_POINT);
}
a.recycle();

Expand Down
4 changes: 2 additions & 2 deletions googlemaps-like/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="CustomBottomSheetBehavior">
<attr name="anchorPoint" format="dimension"/>
<attr name="defaultState" format="enum">
<attr name="customBottomSheetBehaviorAnchorPoint" format="dimension"/>
<attr name="customBottomSheetBehaviorDefaultState" format="enum">
<enum name="stateAnchorPoint" value="3" />
<enum name="stateExpanded" value="4"/>
<enum name="stateCollapsed" value="5"/>
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Feb 07 15:10:05 COT 2019
#Mon Aug 19 14:31:24 CEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip