-
Notifications
You must be signed in to change notification settings - Fork 54
Fixes for issues #18, #19, #21, #22, #23, Migration to AndroidX and kotlin and updated all dependencies #24
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
Open
vyguera
wants to merge
15
commits into
MobiDevelop:master
Choose a base branch
from
vyguera:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4244797
Update of Android Studio's plugin for Gradle to version 3.6.0 and gra…
05e0d87
Migrated to AndroidX
586d099
Refactor of activity in demo app to reuse code.
b0e68a7
Converted to kotlin
be0b2a1
Clean up code
40be4f4
Fix for issue #18
8466fd4
Fix for issue #19
e3e5619
Fix for issue #19
9dec7d7
Refactoring of check method
49637e0
Fix for issue #20
8e191ed
Removed orientation as it doesn't have sense because it will override…
6f1fa0d
Fix for issue #21. splitterTouchSlop now works even when children are…
5a8fd56
Fix for issue #22
befaa4f
Fix for issue #23, splitter is shown entirely when placed at borders.
a184051
Revert of almost all changes for #20. Just remains some default const…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #Tue Jul 31 20:52:57 MST 2018 | ||
| #Tue Mar 03 18:55:52 CET 2020 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 0 additions & 47 deletions
47
split-pane-layout-demo/src/main/java/com/mobidevelop/spl/demo/MainActivity.java
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
split-pane-layout-demo/src/main/java/com/mobidevelop/spl/demo/MainActivity.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| package com.mobidevelop.spl.demo | ||
|
|
||
| import android.app.Activity | ||
| import android.os.Bundle | ||
| import com.mobidevelop.spl.widget.SplitPaneLayout | ||
| import com.mobidevelop.spl.widget.SplitPaneLayout.OnSplitterPositionChangedListener | ||
| import kotlinx.android.synthetic.main.activity_main.* | ||
| import java.text.DecimalFormat | ||
| import java.util.* | ||
|
|
||
| class MainActivity : Activity(), OnSplitterPositionChangedListener { | ||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
| setContentView(R.layout.activity_main) | ||
| layout.onSplitterPositionChangedListener = this | ||
| } | ||
|
|
||
| override fun onResume() { | ||
| super.onResume() | ||
| updateViews() | ||
| } | ||
|
|
||
| override fun onSplitterPositionChanged(splitPaneLayout: SplitPaneLayout, fromUser: Boolean) { | ||
| updateViews() | ||
| } | ||
|
|
||
| private fun updateViews() { | ||
| val percent = DecimalFormat.getPercentInstance(Locale.getDefault()) | ||
| first.text = percent.format(layout.splitterPositionPercent.toDouble()) | ||
| second.text = percent.format(1f - layout.splitterPositionPercent.toDouble()) | ||
| } | ||
| } |
15 changes: 9 additions & 6 deletions
15
split-pane-layout-demo/src/main/res/layout-land/activity_main.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,31 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
|
|
||
| <com.mobidevelop.spl.widget.SplitPaneLayout | ||
| xmlns:android="http://schemas.android.com/apk/res/android" | ||
| <com.mobidevelop.spl.widget.SplitPaneLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:spl="http://schemas.android.com/apk/res-auto" | ||
| android:id="@+id/layout" | ||
| android:layout_width="fill_parent" | ||
| android:layout_height="fill_parent" | ||
| spl:orientation="horizontal" | ||
| spl:splitterSize="4dip" | ||
| spl:splitterPosition="33%" | ||
| spl:paneSizeMin="48dip" | ||
| spl:splitterBackground="@drawable/splitter_bg_h" | ||
| spl:splitterDraggingBackground="#88000000" | ||
| spl:paneSizeMin="48dip"> | ||
| spl:splitterPosition="33%" | ||
| spl:splitterSize="4dip" | ||
| spl:splitterTouchSlop="48dp"> | ||
|
|
||
| <TextView | ||
| android:id="@+id/first" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:clickable="true" | ||
| android:focusable="true" | ||
| android:text="@string/hello_world" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/second" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:clickable="true" | ||
| android:focusable="true" | ||
| android:text="@string/hello_world" /> | ||
|
|
||
| </com.mobidevelop.spl.widget.SplitPaneLayout> |
15 changes: 9 additions & 6 deletions
15
split-pane-layout-demo/src/main/res/layout/activity_main.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,31 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
|
|
||
| <com.mobidevelop.spl.widget.SplitPaneLayout | ||
| xmlns:android="http://schemas.android.com/apk/res/android" | ||
| <com.mobidevelop.spl.widget.SplitPaneLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:spl="http://schemas.android.com/apk/res-auto" | ||
| android:id="@+id/layout" | ||
| android:layout_width="fill_parent" | ||
| android:layout_height="fill_parent" | ||
| spl:orientation="vertical" | ||
| spl:splitterSize="4dip" | ||
| spl:splitterPosition="50%" | ||
| spl:paneSizeMin="48dip" | ||
| spl:splitterBackground="@drawable/splitter_bg_v" | ||
| spl:splitterDraggingBackground="#88000000" | ||
| spl:paneSizeMin="48dip"> | ||
| spl:splitterPosition="50%" | ||
| spl:splitterSize="4dip" | ||
| spl:splitterTouchSlop="48dp"> | ||
|
|
||
| <TextView | ||
| android:id="@+id/first" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:clickable="true" | ||
| android:focusable="true" | ||
| android:text="@string/hello_world" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/second" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:clickable="true" | ||
| android:focusable="true" | ||
| android:text="@string/hello_world" /> | ||
|
|
||
| </com.mobidevelop.spl.widget.SplitPaneLayout> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(SOLUCION DE PROBLEMAS)