Move activity to own package
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
f9ba3e1d44
commit
953e4acd15
9 changed files with 18 additions and 17 deletions
|
@ -13,32 +13,32 @@
|
|||
android:theme="@style/Theme.MagSend"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".BaseActivity"
|
||||
android:name=".activity.BaseActivity"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".CalibrationActivity"
|
||||
android:name=".activity.CalibrationActivity"
|
||||
android:exported="false"
|
||||
android:label="@string/calibration_activity_label"
|
||||
android:parentActivityName=".MainActivity">
|
||||
android:parentActivityName=".activity.MainActivity">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ReceiveActivity"
|
||||
android:name=".activity.ReceiveActivity"
|
||||
android:exported="false"
|
||||
android:label="@string/receive_activity_label"
|
||||
android:parentActivityName=".MainActivity">
|
||||
android:parentActivityName=".activity.MainActivity">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:name=".activity.MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package dev.kaderli.magsend
|
||||
package dev.kaderli.magsend.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import dev.kaderli.magsend.R
|
||||
|
||||
|
||||
abstract class BaseActivity : AppCompatActivity() {
|
|
@ -1,11 +1,10 @@
|
|||
package dev.kaderli.magsend
|
||||
package dev.kaderli.magsend.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.hardware.Sensor
|
||||
import android.hardware.SensorEvent
|
||||
import android.hardware.SensorEventListener
|
||||
import android.hardware.SensorManager
|
||||
import android.os.Bundle
|
||||
import kotlin.math.pow
|
||||
import kotlin.math.sqrt
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package dev.kaderli.magsend
|
||||
package dev.kaderli.magsend.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import android.widget.TextView
|
||||
|
@ -6,6 +6,7 @@ import com.github.mikephil.charting.charts.LineChart
|
|||
import com.github.mikephil.charting.data.Entry
|
||||
import com.github.mikephil.charting.data.LineData
|
||||
import com.github.mikephil.charting.data.LineDataSet
|
||||
import dev.kaderli.magsend.R
|
||||
|
||||
class CalibrationActivity : BaseSensorActivity() {
|
||||
private lateinit var calibrationValue: TextView
|
|
@ -1,7 +1,8 @@
|
|||
package dev.kaderli.magsend
|
||||
package dev.kaderli.magsend.activity
|
||||
|
||||
import android.content.Intent
|
||||
import android.view.View
|
||||
import dev.kaderli.magsend.R
|
||||
|
||||
class MainActivity : BaseActivity() {
|
||||
|
|
@ -1,16 +1,15 @@
|
|||
package dev.kaderli.magsend
|
||||
package dev.kaderli.magsend.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.core.content.ContextCompat
|
||||
import dev.kaderli.magsend.R
|
||||
import dev.kaderli.magsend.model.Sample
|
||||
import dev.kaderli.magsend.model.Signal
|
||||
import java.lang.Integer.min
|
||||
|
||||
const val NEEDED_SAMPLES_PER_SECOND = 190
|
||||
|
||||
class ReceiveActivity : BaseSensorActivity() {
|
||||
private lateinit var preambleStatus: TextView
|
||||
private lateinit var headerStatus: TextView
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".CalibrationActivity">
|
||||
tools:context=".activity.CalibrationActivity">
|
||||
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
tools:context=".activity.MainActivity">
|
||||
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ReceiveActivity">
|
||||
tools:context=".activity.ReceiveActivity">
|
||||
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
|
|
Reference in a new issue