Skip to content

Commit abd6beb

Browse files
committed
Build134
- Fixed long text issue for Russian in Location panel - Fixed padding issue in icons dialog - Improved Level panel now shows degrees for x/y axis - New black icon - Updated Romanian translation
1 parent 58950ef commit abd6beb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+528
-90
lines changed

.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ android {
5050

5151
compileSdkVersion 30
5252

53-
def appVersionCode = 133
53+
def appVersionCode = 134
5454
def appVersionName = "positional_build_${appVersionCode}_final"
5555

5656
defaultConfig {
5757
applicationId "app.simple.positional"
58-
minSdkVersion 24
58+
minSdkVersion 23
5959
//noinspection OldTargetApi
6060
targetSdkVersion 30
6161
versionCode appVersionCode

app/src/main/AndroidManifest.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
<activity-alias
8383
android:name=".activities.alias.IconOneAlias"
8484
android:enabled="true"
85+
android:exported="true"
8586
android:icon="@mipmap/ic_launcher_default"
8687
android:roundIcon="@mipmap/ic_launcher_default_round"
8788
android:targetActivity=".activities.main.LauncherActivity">
@@ -99,6 +100,7 @@
99100
<activity-alias
100101
android:name=".activities.alias.IconTwoAlias"
101102
android:enabled="false"
103+
android:exported="true"
102104
android:icon="@mipmap/ic_launcher_two"
103105
android:label="@string/app_name"
104106
android:roundIcon="@mipmap/ic_launcher_two_round"
@@ -115,6 +117,7 @@
115117
<activity-alias
116118
android:name=".activities.alias.IconLegacyAlias"
117119
android:enabled="false"
120+
android:exported="true"
118121
android:icon="@mipmap/ic_launcher_legacy"
119122
android:label="@string/app_name"
120123
android:roundIcon="@mipmap/ic_launcher_legacy_round"
@@ -131,6 +134,7 @@
131134
<activity-alias
132135
android:name=".activities.alias.IconThreeAlias"
133136
android:enabled="false"
137+
android:exported="true"
134138
android:icon="@mipmap/ic_launcher_three"
135139
android:label="@string/app_name"
136140
android:roundIcon="@mipmap/ic_launcher_three_round"
@@ -147,6 +151,7 @@
147151
<activity-alias
148152
android:name=".activities.alias.IconFourAlias"
149153
android:enabled="false"
154+
android:exported="true"
150155
android:icon="@mipmap/ic_launcher_four"
151156
android:label="@string/app_name"
152157
android:roundIcon="@mipmap/ic_launcher_four_round"
@@ -163,6 +168,7 @@
163168
<activity-alias
164169
android:name=".activities.alias.IconFiveAlias"
165170
android:enabled="false"
171+
android:exported="true"
166172
android:icon="@mipmap/ic_launcher_five"
167173
android:label="@string/app_name"
168174
android:roundIcon="@mipmap/ic_launcher_five_round"
@@ -179,6 +185,7 @@
179185
<activity-alias
180186
android:name=".activities.alias.IconSixAlias"
181187
android:enabled="false"
188+
android:exported="true"
182189
android:icon="@mipmap/ic_launcher_six"
183190
android:label="@string/app_name"
184191
android:roundIcon="@mipmap/ic_launcher_six_round"
@@ -195,6 +202,7 @@
195202
<activity-alias
196203
android:name=".activities.alias.IconSevenAlias"
197204
android:enabled="false"
205+
android:exported="true"
198206
android:icon="@mipmap/ic_launcher_seven"
199207
android:label="@string/app_name"
200208
android:roundIcon="@mipmap/ic_launcher_seven_round"
@@ -211,6 +219,7 @@
211219
<activity-alias
212220
android:name=".activities.alias.IconEightAlias"
213221
android:enabled="false"
222+
android:exported="true"
214223
android:icon="@mipmap/ic_launcher_eight"
215224
android:label="@string/app_name"
216225
android:roundIcon="@mipmap/ic_launcher_eight_round"
@@ -227,6 +236,7 @@
227236
<activity-alias
228237
android:name=".activities.alias.IconNineAlias"
229238
android:enabled="false"
239+
android:exported="true"
230240
android:icon="@mipmap/ic_launcher_nine"
231241
android:label="@string/app_name"
232242
android:roundIcon="@mipmap/ic_launcher_nine_round"
@@ -240,6 +250,23 @@
240250
android:resource="@xml/shortcuts" />
241251
</activity-alias>
242252

253+
<activity-alias
254+
android:name=".activities.alias.IconTenAlias"
255+
android:enabled="false"
256+
android:exported="true"
257+
android:icon="@mipmap/ic_launcher_ten"
258+
android:label="@string/app_name"
259+
android:roundIcon="@mipmap/ic_launcher_ten_round"
260+
android:targetActivity=".activities.main.LauncherActivity">
261+
<intent-filter>
262+
<action android:name="android.intent.action.MAIN" />
263+
<category android:name="android.intent.category.LAUNCHER" />
264+
</intent-filter>
265+
<meta-data
266+
android:name="android.app.shortcuts"
267+
android:resource="@xml/shortcuts" />
268+
</activity-alias>
269+
243270
<!-- Activities -->
244271

245272
<activity

app/src/main/assets/html/translators.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,13 @@ <h3>German</h3>
153153
<div class="entry">
154154
<div class="title">
155155
<h3>Spanish</h3>
156-
<p>53%</p>
156+
<p>54%</p>
157157
</div>
158158
<div class="body">
159159
<p>Este idioma es traducido por</p>
160160
<ul>
161161
<li>Joel Ibarra Rojas</li>
162+
<li>Alexis Villa</li>
162163
</ul>
163164
</div>
164165
</div>
32 KB
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package app.simple.positional.activities.alias
2+
3+
class IconTenAlias

app/src/main/java/app/simple/positional/adapters/settings/AdapterIcons.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ class AdapterIcons : RecyclerView.Adapter<AdapterIcons.Holder>() {
7676
context.packageManager.getComponentEnabledSetting(ComponentName(context, IconNineAlias::class.java)) -> {
7777
9
7878
}
79+
context.packageManager.getComponentEnabledSetting(ComponentName(context, IconTenAlias::class.java)) -> {
80+
10
81+
}
7982
else -> {
8083
0
8184
}
@@ -93,6 +96,7 @@ class AdapterIcons : RecyclerView.Adapter<AdapterIcons.Holder>() {
9396
context.packageManager.setComponentEnabledSetting(ComponentName(context, IconSevenAlias::class.java), getStatusFromPosition(position == 7), PackageManager.DONT_KILL_APP)
9497
context.packageManager.setComponentEnabledSetting(ComponentName(context, IconEightAlias::class.java), getStatusFromPosition(position == 8), PackageManager.DONT_KILL_APP)
9598
context.packageManager.setComponentEnabledSetting(ComponentName(context, IconNineAlias::class.java), getStatusFromPosition(position == 9), PackageManager.DONT_KILL_APP)
99+
context.packageManager.setComponentEnabledSetting(ComponentName(context, IconTenAlias::class.java), getStatusFromPosition(position == 10), PackageManager.DONT_KILL_APP)
96100
}
97101

98102
private fun getStatusFromPosition(position: Boolean): Int {
@@ -114,7 +118,8 @@ class AdapterIcons : RecyclerView.Adapter<AdapterIcons.Holder>() {
114118
R.mipmap.ic_launcher_six,
115119
R.mipmap.ic_launcher_seven,
116120
R.mipmap.ic_launcher_eight,
117-
R.mipmap.ic_launcher_nine
121+
R.mipmap.ic_launcher_nine,
122+
R.mipmap.ic_launcher_ten
118123
)
119124
}
120125
}

app/src/main/java/app/simple/positional/decorations/views/MapToolbar.kt renamed to app/src/main/java/app/simple/positional/decorations/maps/MapToolbar.kt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package app.simple.positional.decorations.views
1+
package app.simple.positional.decorations.maps
22

33
import android.animation.LayoutTransition
44
import android.content.Context
@@ -8,6 +8,7 @@ import android.util.AttributeSet
88
import android.view.LayoutInflater
99
import android.view.View
1010
import android.view.animation.DecelerateInterpolator
11+
import android.widget.TextView
1112
import app.simple.positional.R
1213
import app.simple.positional.constants.LocationPins.locationsPins
1314
import app.simple.positional.decorations.corners.DynamicCornerLinearLayout
@@ -38,20 +39,24 @@ class MapToolbar : DynamicCornerLinearLayout, OnSharedPreferenceChangeListener {
3839
initViews()
3940
layoutTransition = LayoutTransition()
4041
getSharedPreferences()
41-
.registerOnSharedPreferenceChangeListener(this)
42+
.registerOnSharedPreferenceChangeListener(this)
4243
}
4344

4445
private fun initViews() {
4546
val view = LayoutInflater.from(context).inflate(R.layout.toolbar_map_panel, this, true)
4647
setPadding(resources.getDimensionPixelOffset(R.dimen.toolbar_padding),
47-
resources.getDimensionPixelOffset(R.dimen.toolbar_padding) + StatusBarHeight.getStatusBarHeight(resources),
48-
resources.getDimensionPixelOffset(R.dimen.toolbar_padding),
49-
resources.getDimensionPixelOffset(R.dimen.toolbar_padding))
48+
resources.getDimensionPixelOffset(R.dimen.toolbar_padding) + StatusBarHeight.getStatusBarHeight(resources),
49+
resources.getDimensionPixelOffset(R.dimen.toolbar_padding),
50+
resources.getDimensionPixelOffset(R.dimen.toolbar_padding))
5051

5152
location = view.findViewById(R.id.gps_location_indicator)
5253
menu = view.findViewById(R.id.gps_menu)
5354
customLocationButton = view.findViewById(R.id.gps_custom_location)
5455

56+
with(view.findViewById<TextView>(R.id.map_toolbar_heading)) {
57+
isSelected = true
58+
}
59+
5560
if (isCustomCoordinate()) {
5661
customLocationButton.setImageResource(R.drawable.ic_place_custom)
5762
} else {
@@ -86,7 +91,7 @@ class MapToolbar : DynamicCornerLinearLayout, OnSharedPreferenceChangeListener {
8691
super.onDetachedFromWindow()
8792
println("Called")
8893
getSharedPreferences()
89-
.unregisterOnSharedPreferenceChangeListener(this)
94+
.unregisterOnSharedPreferenceChangeListener(this)
9095
}
9196

9297
fun locationIndicatorUpdate(isFixed: Boolean) {
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package app.simple.positional.decorations.views;
2+
3+
import android.content.Context;
4+
import android.graphics.Canvas;
5+
import android.text.TextPaint;
6+
import android.util.AttributeSet;
7+
import android.view.Gravity;
8+
9+
import androidx.appcompat.widget.AppCompatTextView;
10+
11+
public class VerticalTextView extends AppCompatTextView {
12+
13+
final boolean topDown;
14+
15+
public VerticalTextView(Context context, AttributeSet attrs) {
16+
super(context, attrs);
17+
final int gravity = getGravity();
18+
if (Gravity.isVertical(gravity)
19+
&& (gravity & Gravity.VERTICAL_GRAVITY_MASK)
20+
== Gravity.BOTTOM) {
21+
setGravity(
22+
(gravity & Gravity.HORIZONTAL_GRAVITY_MASK)
23+
| Gravity.TOP);
24+
topDown = false;
25+
} else {
26+
topDown = true;
27+
}
28+
}
29+
30+
@SuppressWarnings("SuspiciousNameCombination")
31+
@Override
32+
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
33+
super.onMeasure(heightMeasureSpec, widthMeasureSpec);
34+
setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
35+
}
36+
37+
@Override
38+
protected void onDraw(Canvas canvas) {
39+
TextPaint textPaint = getPaint();
40+
textPaint.setColor(getCurrentTextColor());
41+
textPaint.drawableState = getDrawableState();
42+
43+
canvas.save();
44+
45+
if (topDown) {
46+
canvas.translate(getWidth(), 0);
47+
canvas.rotate(90);
48+
} else {
49+
canvas.translate(0, getHeight());
50+
canvas.rotate(-90);
51+
}
52+
53+
canvas.translate(getCompoundPaddingLeft(),
54+
getExtendedPaddingTop());
55+
56+
getLayout().draw(canvas);
57+
canvas.restore();
58+
}
59+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package app.simple.positional.math
2+
3+
data class Euler(val roll: Float, val pitch: Float, val yaw: Float) {
4+
fun toFloatArray(): FloatArray {
5+
return floatArrayOf(roll, pitch, yaw)
6+
}
7+
8+
fun toQuaternion(): Quaternion {
9+
return Quaternion.from(this)
10+
}
11+
12+
companion object {
13+
fun from(arr: FloatArray): Euler {
14+
return Euler(arr[0], arr[1], arr[2])
15+
}
16+
17+
fun from(quaternion: Quaternion): Euler {
18+
return quaternion.toEuler()
19+
}
20+
21+
}
22+
}

0 commit comments

Comments
 (0)