Skip to content

Commit 146efbe

Browse files
committed
Build149
- Massive Sweeping - Native Android 12 Support
1 parent 83ca102 commit 146efbe

File tree

77 files changed

+54
-606
lines changed

Some content is hidden

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

77 files changed

+54
-606
lines changed

.idea/misc.xml

Lines changed: 4 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: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def thisAppLicensingKey = noKeyFound
1414
* in project's root directory containing your API keys and this code will
1515
* handle the changes.
1616
*
17-
* The file should look like this in sensitive_data.txt without any quotes
17+
* The format should look like this in sensitive_data.txt without any quotes
1818
*
1919
* googleMapsAPIKey YourKey
2020
*/
@@ -48,16 +48,16 @@ if (googleMapsAPIKey == noKeyFound) {
4848

4949
android {
5050

51-
compileSdkVersion 30
51+
compileSdkVersion 31
5252

53-
def appVersionCode = 148
53+
def appVersionCode = 149
5454
def appVersionName = "positional_build_${appVersionCode}_FINAL"
5555

5656
defaultConfig {
5757
applicationId "app.simple.positional"
5858
minSdkVersion 24
5959
//noinspection OldTargetApi
60-
targetSdkVersion 30
60+
targetSdkVersion 31
6161
versionCode appVersionCode
6262
versionName appVersionName
6363
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -129,7 +129,7 @@ dependencies {
129129

130130
// AndroidX
131131
implementation 'androidx.appcompat:appcompat:1.3.1'
132-
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
132+
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
133133
implementation 'androidx.core:core-ktx:1.6.0'
134134
implementation 'androidx.fragment:fragment-ktx:1.3.6'
135135
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
@@ -138,13 +138,13 @@ dependencies {
138138
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
139139

140140
// Kotlin
141-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30"
142-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
141+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31"
142+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
143143

144144
// Google Services and Default android libs
145145
implementation 'com.google.android.gms:play-services-location:18.0.0'
146146
implementation 'com.google.android.play:core-ktx:1.8.1'
147-
implementation 'com.google.android.gms:play-services-maps:17.0.1'
147+
implementation 'com.google.android.gms:play-services-maps:18.0.0'
148148
implementation 'com.google.android.material:material:1.4.0'
149149
implementation 'com.google.maps.android:android-maps-utils:2.2.4'
150150

@@ -154,9 +154,9 @@ dependencies {
154154
implementation 'com.github.vipulasri:timelineview:1.1.5'
155155

156156
// Room components
157-
implementation "androidx.room:room-ktx:2.4.0-alpha04"
158-
kapt "androidx.room:room-compiler:2.4.0-alpha04"
159-
androidTestImplementation "androidx.room:room-testing:2.4.0-alpha04"
157+
implementation "androidx.room:room-ktx:2.4.0-beta01"
158+
kapt "androidx.room:room-compiler:2.4.0-beta01"
159+
androidTestImplementation "androidx.room:room-testing:2.4.0-beta01"
160160

161161
// Leak Canary -- debugImplementation because LeakCanary should only run in debug builds.
162162
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.5'
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources>
3-
<color name="ic_launcher_02_background">#FFFFFF</color>
4-
</resources>
2+
<resources></resources>
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources>
3-
<color name="ic_launcher_03_background">#FFFFFF</color>
4-
</resources>
2+
<resources></resources>
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources>
3-
<color name="ic_launcher_04_background">#FFFFFF</color>
4-
</resources>
2+
<resources></resources>
-76.2 KB
Binary file not shown.

app/src/full/res/drawable/ic_unfold.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

app/src/lite/res/layout/dialog_gps_menu.xml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -115,39 +115,6 @@
115115

116116
</app.simple.positional.decorations.ripple.DynamicRippleLinearLayout>
117117

118-
<app.simple.positional.decorations.ripple.DynamicRippleLinearLayout
119-
android:id="@+id/gps_menu_bearing_rotation"
120-
android:layout_width="match_parent"
121-
android:layout_height="wrap_content"
122-
android:background="@drawable/ripple_btn"
123-
android:clickable="true"
124-
android:clipChildren="false"
125-
android:clipToPadding="false"
126-
android:focusable="true"
127-
android:orientation="horizontal"
128-
android:padding="@dimen/options_item_padding">
129-
130-
<TextView
131-
android:layout_width="0dp"
132-
android:layout_height="wrap_content"
133-
android:layout_gravity="center_vertical"
134-
android:layout_weight="1"
135-
android:drawablePadding="@dimen/options_text_margin_start"
136-
android:fontFamily="@font/regular"
137-
android:gravity="center_vertical"
138-
android:text="@string/bearing_rotation"
139-
android:textColor="@color/textPrimary"
140-
android:textSize="@dimen/options_item_text_size"
141-
app:drawableLeftCompat="@drawable/ic_bearing_rotation"
142-
app:drawableTint="@color/iconRegular" />
143-
144-
<app.simple.positional.decorations.switchview.SwitchView
145-
android:id="@+id/toggle_bearing_rotation"
146-
android:layout_width="@dimen/switch_width"
147-
android:layout_height="wrap_content" />
148-
149-
</app.simple.positional.decorations.ripple.DynamicRippleLinearLayout>
150-
151118
<View
152119
android:layout_width="match_parent"
153120
android:layout_height="1px"

app/src/lite/res/layout/info_panel_gps.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
android:layout_gravity="center_vertical"
4747
android:background="@drawable/ripple_btn"
4848
android:clickable="false"
49-
android:contentDescription="@string/button_copy"
49+
android:contentDescription="@string/save"
5050
android:src="@drawable/ic_save"
5151
android:visibility="gone"
5252
app:tint="@color/iconColor" />
@@ -57,7 +57,7 @@
5757
android:layout_height="@dimen/copy_button_dimensions"
5858
android:layout_gravity="center_vertical"
5959
android:background="@drawable/ripple_btn"
60-
android:contentDescription="@string/button_copy"
60+
android:contentDescription="@string/copy"
6161
android:src="@drawable/ic_content_copy"
6262
app:tint="@color/iconColor" />
6363

app/src/main/java/app/simple/positional/activities/main/MainActivity.kt

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class MainActivity : BaseActivity(),
4545

4646
override fun onCreate(savedInstanceState: Bundle?) {
4747
super.onCreate(savedInstanceState)
48+
4849
setContentView(R.layout.activity_main)
4950

5051
bottomBarAdapter = BottomBarAdapter(BottomBarItems.getBottomBarItems(baseContext))
@@ -102,7 +103,8 @@ class MainActivity : BaseActivity(),
102103

103104
private fun checkRunTimePermission() {
104105
if (ActivityCompat.checkSelfPermission(applicationContext, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
105-
ActivityCompat.checkSelfPermission(applicationContext, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
106+
ActivityCompat.checkSelfPermission(applicationContext, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED
107+
) {
106108
if (MainPreferences.getShowPermissionDialog()) {
107109
val permissionDialog = Permission.newInstance()
108110
permissionDialog.show(supportFragmentManager, "permission_info")
@@ -122,7 +124,8 @@ class MainActivity : BaseActivity(),
122124
runService()
123125
} else {
124126
Toast.makeText(this, R.string.location_permission_denied, Toast.LENGTH_LONG).show()
125-
Toast.makeText(this, R.string.no_location_permission_alert, Toast.LENGTH_LONG).show()
127+
Toast.makeText(this, R.string.no_location_permission_alert, Toast.LENGTH_LONG)
128+
.show()
126129
}
127130
}
128131
}
@@ -164,41 +167,41 @@ class MainActivity : BaseActivity(),
164167
bottomBar.smoothScrollToPosition(position)
165168
getFragment(tag).let {
166169
supportFragmentManager.beginTransaction()
167-
.setCustomAnimations(R.anim.dialog_in, R.anim.dialog_out)
168-
.replace(R.id.containers, it, tag)
169-
.commit()
170+
.setCustomAnimations(R.anim.dialog_in, R.anim.dialog_out)
171+
.replace(R.id.containers, it, tag)
172+
.commit()
170173
}
171174
}
172175

173176
private fun getFragment(name: String): Fragment {
174177
when (name) {
175178
"clock" -> {
176179
return supportFragmentManager.findFragmentByTag("clock") as Clock?
177-
?: Clock.newInstance()
180+
?: Clock.newInstance()
178181
}
179182
"compass" -> {
180183
return supportFragmentManager.findFragmentByTag("compass") as Compass?
181-
?: Compass.newInstance()
184+
?: Compass.newInstance()
182185
}
183186
"location" -> {
184187
return supportFragmentManager.findFragmentByTag("location") as GPS?
185-
?: GPS.newInstance()
188+
?: GPS.newInstance()
186189
}
187190
"trail" -> {
188191
return supportFragmentManager.findFragmentByTag("trail") as Trail?
189-
?: Trail.newInstance()
192+
?: Trail.newInstance()
190193
}
191194
"level" -> {
192195
return supportFragmentManager.findFragmentByTag("level") as Level?
193-
?: Level.newInstance()
196+
?: Level.newInstance()
194197
}
195198
"settings" -> {
196199
return supportFragmentManager.findFragmentByTag("settings") as AppSettings?
197-
?: AppSettings.newInstance()
200+
?: AppSettings.newInstance()
198201
}
199202
else -> {
200203
return supportFragmentManager.findFragmentByTag("location") as GPS?
201-
?: GPS.newInstance()
204+
?: GPS.newInstance()
202205
}
203206
}
204207
}
@@ -209,9 +212,11 @@ class MainActivity : BaseActivity(),
209212

210213
override fun onMapClicked(fullScreen: Boolean) {
211214
if (fullScreen) {
212-
bottomBar.animate().translationY(0F).setInterpolator(DecelerateInterpolator(1.5F)).start()
215+
bottomBar.animate().translationY(0F).setInterpolator(DecelerateInterpolator(1.5F))
216+
.start()
213217
} else {
214-
bottomBar.animate().translationY(bottomBar.height.toFloat()).setInterpolator(DecelerateInterpolator(1.5F)).start()
218+
bottomBar.animate().translationY(bottomBar.height.toFloat())
219+
.setInterpolator(DecelerateInterpolator(1.5F)).start()
215220
}
216221
}
217222

0 commit comments

Comments
 (0)