Skip to content

Commit

Permalink
chore: big bump
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Jul 14, 2022
1 parent e406baa commit 70b21f1
Show file tree
Hide file tree
Showing 141 changed files with 2,191 additions and 1,353 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const ignoreWarnings = new Set(['a11y-no-onchange', 'a11y-label-has-associated-control']);
const ignoreWarnings = new Set(['a11y-no-onchange', 'a11y-label-has-associated-control', 'a11y-autofocus']);
module.exports = {
extends: ['plugin:prettier/recommended'],
env: {
Expand Down
4 changes: 2 additions & 2 deletions App_Resources/Android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NS_DEFAULT_ANDROID_BUILD_TOOLS_VERSION=7.1.2
ns_default_kotlin_version=1.7.0
NS_DEFAULT_ANDROID_BUILD_TOOLS_VERSION=7.2.1
# ns_default_kotlin_version=1.7.10
android.enableJetifier=false
android.enableR8.fullMode=true
android.experimental.enableNewResourceShrinker.preciseShrinking=true
53 changes: 12 additions & 41 deletions App_Resources/Android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,52 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-sdk android:targetSdkVersion="__APILEVEL__"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<!-- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="__PACKAGE__">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature android:name="android.hardware.location.gps" />
<application
android:requestLegacyExternalStorage="true"
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:networkSecurityConfig="@xml/network_security_config"
android:icon="@mipmap/icon"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="com.tns.NativeScriptActivity"
android:label="@string/title_activity_kimera"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
android:theme="@style/LaunchScreenTheme" android:exported="true">
<application android:requestLegacyExternalStorage="true" android:name="com.tns.NativeScriptApplication" android:allowBackup="true" android:hardwareAccelerated="true" android:networkSecurityConfig="@xml/network_security_config" android:icon="@mipmap/icon" android:label="@string/app_name" android:theme="@style/AppTheme">
<activity android:name="com.tns.NativeScriptActivity" android:label="@string/title_activity_kimera" android:windowSoftInputMode="stateHidden|adjustPan" android:launchMode="singleTask" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode" android:theme="@style/LaunchScreenTheme" android:exported="true">
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.tns.ErrorReportActivity" android:exported="false"/>
<activity android:name="com.nativescript.preferences.NativescriptSettingsActivity" android:theme="@style/SettingsTheme" android:exported="true"/>
<activity android:name="com.tns.ErrorReportActivity" android:exported="false" />
<activity android:name="com.nativescript.preferences.NativescriptSettingsActivity" android:theme="@style/SettingsTheme" android:exported="true" />
<meta-data android:name="io.sentry.anr.enable" android:value="false" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="__PACKAGE__.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
<provider android:name="androidx.core.content.FileProvider" android:authorities="__PACKAGE__.provider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />
</provider>
</application>
</manifest>
</manifest>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
package com.nativescript.popover;

import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Rect;
import android.os.Build;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.PopupWindow;

import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
import androidx.core.widget.PopupWindowCompat;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
* @author kakajika
* @since 2016/07/01
* @contributor akylas
* @since 2022/03/30
*/
public class RelativePopupWindow extends PopupWindow {

@IntDef({
VerticalPosition.CENTER,
VerticalPosition.ABOVE,
VerticalPosition.BELOW,
VerticalPosition.ALIGN_TOP,
VerticalPosition.ALIGN_BOTTOM,
})
@Retention(RetentionPolicy.SOURCE)
public @interface VerticalPosition {
int CENTER = 0;
int ABOVE = 1;
int BELOW = 2;
int ALIGN_TOP = 3;
int ALIGN_BOTTOM = 4;
}

@IntDef({
HorizontalPosition.CENTER,
HorizontalPosition.LEFT,
HorizontalPosition.RIGHT,
HorizontalPosition.ALIGN_LEFT,
HorizontalPosition.ALIGN_RIGHT,
})
@Retention(RetentionPolicy.SOURCE)
public @interface HorizontalPosition {
int CENTER = 0;
int LEFT = 1;
int RIGHT = 2;
int ALIGN_LEFT = 3;
int ALIGN_RIGHT = 4;
}

public RelativePopupWindow(Context context) {
super(context);
}
public RelativePopupWindow(View contentView, int width, int height, boolean focusable) {
super(contentView, width, height, focusable);
}

/**
* Show at relative position to anchor View with translation.
* @param anchor Anchor View
* @param vertPos Vertical Position Flag
* @param horizPos Horizontal Position Flag
* @param x Translation X
* @param y Translation Y
* @param fitInScreen Automatically fit in screen or not
*/
public void showOnAnchor(
@NonNull View anchor,
@VerticalPosition int vertPos,
@HorizontalPosition int horizPos,
int x,
int y,
boolean fitInScreen
) {
setClippingEnabled(fitInScreen);
final View contentView = getContentView();
final Rect windowRect = new Rect();
contentView.getWindowVisibleDisplayFrame(windowRect);
final int windowW = windowRect.width();
final int windowH = windowRect.height();
contentView.measure(
makeDropDownMeasureSpec(getWidth(), windowW),
makeDropDownMeasureSpec(getHeight(), windowH)
);
final int measuredW = contentView.getMeasuredWidth();
final int measuredH = contentView.getMeasuredHeight();
setHeight(measuredH);
final int[] anchorLocation = new int[2];
anchor.getLocationInWindow(anchorLocation);
final int anchorBottom = anchorLocation[1] + anchor.getHeight();
if (!fitInScreen) {
x += anchorLocation[0];
y += anchorBottom;
}
switch (vertPos) {
case VerticalPosition.ABOVE:
y -= measuredH + anchor.getHeight();
break;
case VerticalPosition.ALIGN_BOTTOM:
y -= measuredH;
break;
case VerticalPosition.CENTER:
y -= anchor.getHeight()/2 + measuredH/2;
break;
case VerticalPosition.ALIGN_TOP:
y -= anchor.getHeight();
break;
case VerticalPosition.BELOW:
// Default position.
break;
}
switch (horizPos) {
case HorizontalPosition.LEFT:
x -= measuredW;
break;
case HorizontalPosition.ALIGN_RIGHT:
x -= measuredW - anchor.getWidth();
break;
case HorizontalPosition.CENTER:
x += anchor.getWidth()/2 - measuredW/2;
break;
case HorizontalPosition.ALIGN_LEFT:
// Default position.
break;
case HorizontalPosition.RIGHT:
x += anchor.getWidth();
break;
}
if (fitInScreen) {
if (y + anchorBottom < 0) {
y = -anchorBottom;
} else if (y + anchorBottom + measuredH > windowH) {
y = windowH - anchorBottom - measuredH;
}
PopupWindowCompat.showAsDropDown(this, anchor, x, y, Gravity.NO_GRAVITY);
} else {
showAtLocation(anchor, Gravity.NO_GRAVITY, x, y);
}
}

private static int makeDropDownMeasureSpec(int measureSpec, int maxSize) {
return View.MeasureSpec.makeMeasureSpec(
getDropDownMeasureSpecSize(measureSpec, maxSize),
getDropDownMeasureSpecMode(measureSpec)
);
}

private static int getDropDownMeasureSpecSize(int measureSpec, int maxSize) {
switch (measureSpec) {
case ViewGroup.LayoutParams.MATCH_PARENT:
return maxSize;
default:
return View.MeasureSpec.getSize(measureSpec);
}
}

private static int getDropDownMeasureSpecMode(int measureSpec) {
switch (measureSpec) {
case ViewGroup.LayoutParams.WRAP_CONTENT:
return View.MeasureSpec.UNSPECIFIED;
default:
return View.MeasureSpec.EXACTLY;
}
}
}

This file was deleted.

15 changes: 0 additions & 15 deletions App_Resources/Android/src/main/res/drawable-v21/splash_screen.xml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.999"
android:scaleY="0.999"
android:translateX="35.343174"
android:translateY="34.02">
<path
android:pathData="m32.74,8v32h-22A6,6 0,0 1,4.74 34V0H24.74Z"
android:fillColor="#edebf2"/>
<path
android:pathData="m32.74,8h-8L24.74,0ZM27.74,19L7.74,19a1,1 0,0 1,0 -2L27.74,17a1,1 0,0 1,0 2zM27.74,14L7.74,14a1,1 0,0 1,0 -2L27.74,12a1,1 0,0 1,0 2zM27.74,24L7.74,24a1,1 0,0 1,0 -2L27.74,22a1,1 0,0 1,0 2zM27.74,29L7.74,29a1,1 0,0 1,0 -2L27.74,27a1,1 0,0 1,0 2zM17.74,34L7.74,34a1,1 0,0 1,0 -2h10a1,1 0,0 1,0 2z"
android:fillColor="#c6c3d8"/>
<path
android:pathData="M0.73,22.078h35.891v0.844h-35.891z"
android:strokeLineJoin="round"
android:strokeWidth="1.45975"
android:fillColor="#da5669"
android:strokeColor="#da5669"
android:fillType="evenOdd"
android:strokeLineCap="round"/>
<path
android:pathData="M4.647,23.36h28.056v7.247h-28.056z"
android:strokeAlpha="0.523316"
android:strokeLineJoin="round"
android:strokeWidth="2.12622"
android:fillColor="#da5669"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.196891"
android:strokeLineCap="round"/>
</group>
</vector>
19 changes: 9 additions & 10 deletions App_Resources/Android/src/main/res/drawable/splash_screen.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="fill">
<!-- <item><bitmap android:gravity="fill" android:src="@drawable/background" /></item> -->
<item>
<shape android:shape="rectangle">
<solid android:color="#000000" />
</shape>
</item>
<item>
<bitmap android:gravity="center|clip_vertical" android:src="@mipmap/icon" />
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/background"
android:gravity="fill" />
<item android:left="27dp" android:right="27dp">
<bitmap
android:gravity="clip_horizontal|center_vertical"
android:src="@drawable/ic_launcher_foreground"/>
</item>
</layer-list>
15 changes: 0 additions & 15 deletions App_Resources/Android/src/main/res/drawable/splash_screen_dark.xml

This file was deleted.

Loading

0 comments on commit 70b21f1

Please sign in to comment.