Skip to content

Commit

Permalink
Update for Release 0.0.0.5
Browse files Browse the repository at this point in the history
Fixed clash of attribute names #6 by adding a library specific prefix (breaking change) and removing some unused attributes
Fixed some Typos in docs
Updated some library versions
Fixed release signing Typo
Updated sdk version as required by some libraries
  • Loading branch information
Zardozz committed Jan 19, 2022
1 parent 2072405 commit 1094567
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Every contribution is welcome to the library. Simply [open a new Pull Request](h
Note that by making a contribution to this project you are agreeing to have your contributions governed by the [MIT License](https://github.com/Zardozz/FixedHeaderTableLayout/blob/master/LICENSE) copyright statement.
This means that to the extent possible under law, you transfer all copyright and related or neighbouring rights of the code or documents you contribute to the project itself. You also represent that you have the authority to perform the above waiver with respect to the entirety of you contributions.

Ideally contributions should have an demo of any new feature in the Demo App (that can be turned on or off if it impacts other feature demos) and or some automated tests related to the contribution
Ideally contributions should have a demo of any new feature in the Demo App (that can be turned on/off or a separate demo if it impacts other feature demos) and or some automated tests related to the contribution
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Add Maven Central to the project's `build.gradle` :
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
Expand All @@ -75,7 +74,7 @@ allprojects {
Add the following dependency into your module's `build.gradle`:
```
dependencies {
implementation 'com.github.Zardozz:fixedheadertablelayout:0.0.0.4'
implementation 'com.github.Zardozz:fixedheadertablelayout:0.0.0.5'
}
```

Expand Down
24 changes: 13 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,23 @@ plugins {

File keystorePropertiesFile = project.rootProject.file('local.properties')
if (keystorePropertiesFile.exists()) {
System.out.println('Signing Keyfile exists ')
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
// If the property file has enough properties to enable releasing
if (keystoreProperties['keystore'] != null &&
keystoreProperties['keystore.storePassword'] != null &&
keystoreProperties['keystore.keyAlias'] != null &&
keystoreProperties['keystore.password'] != null
keystoreProperties['keystore.keyPassword'] != null
) {
System.out.println('Keyfile has enough properties')
android {
signingConfigs {
release {
storeFile file(keystoreProperties['keystore'])
storePassword keystoreProperties['keystore.storePassword']
keyAlias keystoreProperties['keystore.keyAlias']
keyPassword keystoreProperties['keystore.password']
keyPassword keystoreProperties['keystore.keyPassword']
}
}
}
Expand All @@ -64,14 +66,14 @@ if (keystorePropertiesFile.exists()) {
}

android {
compileSdkVersion 30
compileSdkVersion 31

defaultConfig {
applicationId "com.github.zardozz.fixedheadertablelayoutsample"
minSdkVersion 16
targetSdkVersion 30
versionCode 4
versionName "0.0.0.4"
targetSdkVersion 31
versionCode 5
versionName "0.0.0.5"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -91,11 +93,11 @@ android {

dependencies {

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation project(path: ':fixedheadertablelayout')
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_main_example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
android:fadeScrollbars="true"
android:scrollbarSize="10dp"
android:scrollbarStyle="insideOverlay"
app:fhtl_max_scale="1.5"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.android.tools.build:gradle:7.0.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -15,7 +15,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
12 changes: 6 additions & 6 deletions fixedheadertablelayout/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ plugins {

ext {
PUBLISH_GROUP_ID = 'com.github.Zardozz'
PUBLISH_VERSION = '0.0.0.4'
PUBLISH_VERSION = '0.0.0.5'
PUBLISH_ARTIFACT_ID = 'fixedheadertablelayout'
}

Expand All @@ -42,15 +42,15 @@ if (keystorePropertiesFile.exists()) {
if (keystoreProperties['keystore'] != null &&
keystoreProperties['keystore.storePassword'] != null &&
keystoreProperties['keystore.keyAlias'] != null &&
keystoreProperties['keystore.password'] != null
keystoreProperties['keystore.keyPassword'] != null
) {
android {
signingConfigs {
release {
storeFile file(keystoreProperties['keystore'])
storePassword keystoreProperties['keystore.storePassword']
keyAlias keystoreProperties['keystore.keyAlias']
keyPassword keystoreProperties['keystore.password']
keyPassword keystoreProperties['keystore.keyPassword']
}
}
}
Expand All @@ -72,11 +72,11 @@ if (keystorePropertiesFile.exists()) {
}

android {
compileSdkVersion 30
compileSdkVersion 31

defaultConfig {
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 31

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -99,7 +99,7 @@ android {
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.appcompat:appcompat:1.4.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:rules:1.4.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,6 @@ public class FixedHeaderTableLayout extends FrameLayout implements ScaleGestureD
private float scaledRightBound;
private float scaledBottomBound;

private CornerViewLocation mCornerViewLocation;

private boolean mReverseLayout = false;

public enum CornerViewLocation {
TOP_LEFT(0),
TOP_RIGHT(1),
BOTTOM_LEFT(2),
BOTTOM_RIGHT(3);
int id;

CornerViewLocation(int id) {
this.id = id;
}

static CornerViewLocation fromId(int id) {
for (CornerViewLocation c : values()) {
if (c.id == id) return c;
}
// If enum not found return default of Top Left
return TOP_LEFT;
}
}

private static final String LOG_TAG = FixedHeaderTableLayout.class.getSimpleName();


Expand Down Expand Up @@ -130,33 +106,20 @@ private void initialDefaultValues(@Nullable AttributeSet attrs) {
return;
}

// Cornerview location
mCornerViewLocation = FixedHeaderTableLayout.CornerViewLocation.TOP_LEFT;

// Reverse Layout
mReverseLayout = false;

// Get values from xml attributes
TypedArray a = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable
.FixedHeaderTableLayout, 0, 0);

try {
minScale = a.getFloat(R.styleable.FixedHeaderTableLayout_min_scale, minScale);
maxScale = a.getFloat(R.styleable.FixedHeaderTableLayout_max_scale, maxScale);

// CornerView location
mCornerViewLocation = CornerViewLocation.fromId(a.getInt(R.styleable.FixedHeaderTableLayout_corner_view_location, 0));

// Reverse Layout
mReverseLayout = a.getBoolean(R.styleable.FixedHeaderTableLayout_reverse_layout, mReverseLayout);

minScale = a.getFloat(R.styleable.FixedHeaderTableLayout_fhtl_min_scale, minScale);
maxScale = a.getFloat(R.styleable.FixedHeaderTableLayout_fhtl_max_scale, maxScale);
} finally {
a.recycle();
}
}

private void init(Context context){
Log.d(LOG_TAG, "mainTable:init");
//Log.d(LOG_TAG, "mainTable:init");

// Get our current View slop for Scrolling
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
Expand Down
11 changes: 2 additions & 9 deletions fixedheadertablelayout/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,8 @@

<resources>
<declare-styleable name="FixedHeaderTableLayout">
<attr name="min_scale" format="float"/>
<attr name="max_scale" format="float"/>
<attr name="corner_view_location">
<enum name="top_left" value="0"/>
<enum name="top_right" value="1"/>
<enum name="bottom_left" value="2"/>
<enum name="bottom_right" value="3"/>
</attr>
<attr name="reverse_layout" format="boolean" />
<attr name="fhtl_min_scale" format="float"/>
<attr name="fhtl_max_scale" format="float"/>
</declare-styleable>

</resources>

0 comments on commit 1094567

Please sign in to comment.