-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hotfix/1.3.15' into main
- Loading branch information
Showing
33 changed files
with
1,140 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,2 @@ | ||
Main changes in this version: First change in onboarding screens, including Analytics opt-in. Support for Events with Math added in the labs. | ||
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.3.15 |
This file contains 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 @@ | ||
/build |
This file contains 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,64 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-parcelize' | ||
apply plugin: 'kotlin-kapt' | ||
apply plugin: 'com.jakewharton.butterknife' | ||
|
||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3' | ||
} | ||
} | ||
|
||
android { | ||
compileSdk versions.compileSdk | ||
|
||
defaultConfig { | ||
minSdk versions.minSdk | ||
targetSdk versions.targetSdk | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility versions.sourceCompat | ||
targetCompatibility versions.targetCompat | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation libs.androidx.appCompat | ||
implementation libs.androidx.core | ||
|
||
implementation libs.airbnb.epoxy | ||
kapt libs.airbnb.epoxyProcessor | ||
|
||
implementation libs.airbnb.mavericks | ||
// Span utils | ||
implementation 'me.gujun.android:span:1.7' | ||
|
||
implementation libs.google.material | ||
|
||
implementation libs.jetbrains.coroutinesCore | ||
implementation libs.jetbrains.coroutinesAndroid | ||
|
||
testImplementation 'org.json:json:20190722' | ||
testImplementation libs.tests.junit | ||
androidTestImplementation libs.androidx.junit | ||
androidTestImplementation libs.androidx.espressoCore | ||
} |
This file contains 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 @@ | ||
<manifest package="org.billcarsonfr.jsonviewer" /> |
77 changes: 77 additions & 0 deletions
77
library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerDialog.kt
This file contains 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,77 @@ | ||
/* | ||
* Copyright (c) 2022 New Vector Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.billcarsonfr.jsonviewer | ||
|
||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import android.view.WindowManager | ||
import androidx.fragment.app.DialogFragment | ||
import com.airbnb.mvrx.Mavericks | ||
|
||
class JSonViewerDialog : DialogFragment() { | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
savedInstanceState: Bundle? | ||
): View? { | ||
return inflater.inflate(R.layout.fragment_dialog_jv, container, false) | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
val args: JSonViewerFragmentArgs = arguments?.getParcelable(Mavericks.KEY_ARG) ?: return | ||
if (savedInstanceState == null) { | ||
childFragmentManager.beginTransaction() | ||
.replace( | ||
R.id.fragmentContainer, JSonViewerFragment.newInstance( | ||
args.jsonString, | ||
args.defaultOpenDepth, | ||
true, | ||
args.styleProvider | ||
) | ||
) | ||
.commitNow() | ||
} | ||
} | ||
|
||
override fun onResume() { | ||
super.onResume() | ||
// Get existing layout params for the window | ||
val params = dialog?.window?.attributes | ||
// Assign window properties to fill the parent | ||
params?.width = WindowManager.LayoutParams.MATCH_PARENT | ||
params?.height = WindowManager.LayoutParams.MATCH_PARENT | ||
dialog?.window?.attributes = params | ||
} | ||
|
||
companion object { | ||
fun newInstance( | ||
jsonString: String, | ||
initialOpenDepth: Int = -1, | ||
styleProvider: JSonViewerStyleProvider? = null | ||
): JSonViewerDialog { | ||
val args = Bundle() | ||
val parcelableArgs = | ||
JSonViewerFragmentArgs(jsonString, initialOpenDepth, false, styleProvider) | ||
args.putParcelable(Mavericks.KEY_ARG, parcelableArgs) | ||
return JSonViewerDialog().apply { arguments = args } | ||
} | ||
} | ||
} |
Oops, something went wrong.