@ -1 +1 @@
|
||||
/build
|
||||
/build
|
||||
|
@ -1,48 +1,30 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
}
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdk 32
|
||||
|
||||
compileSdkVersion 28
|
||||
defaultConfig {
|
||||
applicationId "com.example.externgnss"
|
||||
minSdk 28
|
||||
targetSdk 32
|
||||
applicationId "fmaps.grabow.com.location001"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
}
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
implementation 'pub.devrel:easypermissions:2.0.1'
|
||||
implementation 'com.android.support:design:28.0.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
package com.example.externgnss
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("com.example.externgnss", appContext.packageName)
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package fmaps.grabow.com.location001;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("fmaps.grabow.com.location001", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package com.example.externgnss
|
||||
|
||||
import android.os.Bundle
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import com.example.externgnss.ui.main.SectionsPagerAdapter
|
||||
import com.example.externgnss.databinding.ActivityMainBinding
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var binding: ActivityMainBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
val sectionsPagerAdapter = SectionsPagerAdapter(this, supportFragmentManager)
|
||||
val viewPager: ViewPager = binding.viewPager
|
||||
viewPager.adapter = sectionsPagerAdapter
|
||||
val tabs: TabLayout = binding.tabs
|
||||
tabs.setupWithViewPager(viewPager)
|
||||
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package com.example.externgnss.ui.main
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
|
||||
class PageViewModel : ViewModel() {
|
||||
|
||||
private val _index = MutableLiveData<Int>()
|
||||
val text: LiveData<String> = Transformations.map(_index) {
|
||||
"Hello world from section: $it"
|
||||
}
|
||||
|
||||
fun setIndex(index: Int) {
|
||||
_index.value = index
|
||||
}
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
package com.example.externgnss.ui.main
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.example.externgnss.R
|
||||
import com.example.externgnss.databinding.FragmentMainBinding
|
||||
|
||||
/**
|
||||
* A placeholder fragment containing a simple view.
|
||||
*/
|
||||
class PlaceholderFragment : Fragment() {
|
||||
|
||||
private lateinit var pageViewModel: PageViewModel
|
||||
private var _binding: FragmentMainBinding? = null
|
||||
|
||||
// This property is only valid between onCreateView and
|
||||
// onDestroyView.
|
||||
private val binding get() = _binding!!
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
pageViewModel = ViewModelProvider(this).get(PageViewModel::class.java).apply {
|
||||
setIndex(arguments?.getInt(ARG_SECTION_NUMBER) ?: 1)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
_binding = FragmentMainBinding.inflate(inflater, container, false)
|
||||
val root = binding.root
|
||||
|
||||
val textView: TextView = binding.sectionLabel
|
||||
pageViewModel.text.observe(viewLifecycleOwner, Observer {
|
||||
textView.text = it
|
||||
})
|
||||
return root
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* The fragment argument representing the section number for this
|
||||
* fragment.
|
||||
*/
|
||||
private const val ARG_SECTION_NUMBER = "section_number"
|
||||
|
||||
/**
|
||||
* Returns a new instance of this fragment for the given section
|
||||
* number.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun newInstance(sectionNumber: Int): PlaceholderFragment {
|
||||
return PlaceholderFragment().apply {
|
||||
arguments = Bundle().apply {
|
||||
putInt(ARG_SECTION_NUMBER, sectionNumber)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
_binding = null
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
package com.example.externgnss.ui.main
|
||||
|
||||
import android.content.Context
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentPagerAdapter
|
||||
import com.example.externgnss.R
|
||||
|
||||
private val TAB_TITLES = arrayOf(
|
||||
R.string.tab_text_1,
|
||||
R.string.tab_text_2
|
||||
)
|
||||
|
||||
/**
|
||||
* A [FragmentPagerAdapter] that returns a fragment corresponding to
|
||||
* one of the sections/tabs/pages.
|
||||
*/
|
||||
class SectionsPagerAdapter(private val context: Context, fm: FragmentManager)
|
||||
: FragmentPagerAdapter(fm) {
|
||||
|
||||
override fun getItem(position: Int): Fragment {
|
||||
// getItem is called to instantiate the fragment for the given page.
|
||||
// Return a PlaceholderFragment (defined as a static inner class below).
|
||||
return PlaceholderFragment.newInstance(position + 1)
|
||||
}
|
||||
|
||||
override fun getPageTitle(position: Int): CharSequence? {
|
||||
return context.resources.getString(TAB_TITLES[position])
|
||||
}
|
||||
|
||||
override fun getCount(): Int {
|
||||
// Show 2 total pages.
|
||||
return 2
|
||||
}
|
||||
}
|
@ -0,0 +1,232 @@
|
||||
package fmaps.grabow.com.location001;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.location.LocationListener;
|
||||
import android.location.LocationManager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import pub.devrel.easypermissions.AfterPermissionGranted;
|
||||
import pub.devrel.easypermissions.EasyPermissions;
|
||||
|
||||
import static java.lang.Thread.sleep;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
private TextView output;
|
||||
private LocationManager locationManager;
|
||||
private boolean doRun = true;
|
||||
private final Context cntxToastInternGNSSUpdate = this;
|
||||
final String[] perms = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.INTERNET};
|
||||
private boolean bChange = true;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
startLocationInit();
|
||||
}
|
||||
|
||||
// From https://github.com/googlesamples/easypermissions
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
// Forward results to EasyPermissions
|
||||
EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
|
||||
}
|
||||
|
||||
@AfterPermissionGranted(123)
|
||||
private void startLocationInit() {
|
||||
if (EasyPermissions.hasPermissions(this, perms)) {
|
||||
// Already have permission, do the thing
|
||||
Toast.makeText(cntxToastInternGNSSUpdate, "Permission granted!", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// Get the output UI
|
||||
output = (TextView) findViewById(R.id.interngnss);
|
||||
|
||||
// Test print
|
||||
///printlnOnView(output, "Running!");
|
||||
|
||||
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
||||
//List<String> providers = locationManager.getAllProviders();
|
||||
|
||||
//for (String temp : providers) {
|
||||
// System.out.println(temp);
|
||||
//printProvider(temp);
|
||||
//}
|
||||
|
||||
} else {
|
||||
// Do not have permissions, request them now
|
||||
EasyPermissions.requestPermissions(this, "We require location access!!!",
|
||||
123, perms);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
private void printProvider(String provider) {
|
||||
LocationProvider info = locationManager.getProvider(provider);
|
||||
output.append("Name: " + info.getName() + "\n");
|
||||
output.append("Accuracy: " + info.getAccuracy() + "\n");
|
||||
output.append("PowerReq.: " + info.getPowerRequirement() + "\n");
|
||||
output.append("CellIDReq.: " + info.requiresCell() + "\n");
|
||||
output.append("NetworkReq.: " + info.requiresNetwork() + "\n");
|
||||
output.append("SatReq.: " + info.requiresSatellite() + "\n\n");
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// Die Nachfolgenden Methoden können Sie aus einem Worker-Thread aufrufen
|
||||
private void printlnOnView(final TextView v, final String str) {
|
||||
Runnable myRun = new Runnable() {
|
||||
public void run() {
|
||||
v.setText(str + "\n");
|
||||
}
|
||||
};
|
||||
runOnUiThread(myRun);
|
||||
}
|
||||
/*
|
||||
private void printOnView(final TextView v, final String str) {
|
||||
Runnable myRun = new Runnable() {
|
||||
public void run() {
|
||||
v.append(str);
|
||||
}
|
||||
};
|
||||
runOnUiThread(myRun);
|
||||
}
|
||||
|
||||
public void addToString(Location loc) {
|
||||
//Verwendet die Variablen centerLat & centerLng
|
||||
String time = loc.getTime() +"";
|
||||
String latStr = Double.toString(loc.getLatitude());
|
||||
String lngStr = Double.toString(loc.getLongitude());
|
||||
String acc = loc.getAccuracy() + "";
|
||||
String numOfSat = loc.getExtras().getInt("satellites") +"";
|
||||
String satStr = "";
|
||||
String distStr = "";
|
||||
// Bestimme die Distanz (Fix <-> Center)
|
||||
Location locationA = new Location("Center");
|
||||
locationA.setLatitude(Double.valueOf(centerLat));
|
||||
locationA.setLongitude(Double.valueOf(centerLng));
|
||||
Location locationB = new Location("Fix");
|
||||
locationB.setLatitude(Double.valueOf(latStr));
|
||||
locationB.setLongitude(Double.valueOf(lngStr));
|
||||
distStr = locationA.distanceTo(locationB) + "";
|
||||
logString = logString + time + ";"; logString = logString + numOfSat + ";"; logString = logString + distStr +
|
||||
";"; logString = logString + acc + ";"; logString = logString + latStr + ";"; logString = logString + lngStr
|
||||
+ ";"; logString = logString + centerLat + ";"; logString = logString + centerLng + ";"; logString =
|
||||
logString + satStr + ";"; logString = logString + "\n";
|
||||
}
|
||||
*/
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (!EasyPermissions.hasPermissions(this, perms)) {
|
||||
// Dummy thread ...
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
while (doRun) {
|
||||
Log.i("HAG", "Just do nothing ...");
|
||||
try {
|
||||
sleep(2000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);
|
||||
|
||||
// Worker-Thread
|
||||
new Thread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
|
||||
while (doRun) {
|
||||
// Log.i("HAG", "ok");
|
||||
|
||||
//
|
||||
// Aufgabe 3
|
||||
//
|
||||
// Geben Sie via printOnView die getLastKnownLocation() von
|
||||
// Network-Provider und GPS-Provider aus
|
||||
//
|
||||
|
||||
printlnOnView(output, "Lat: " + locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude()
|
||||
+ " Long: " + locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude()
|
||||
+ " Accuracy: " + locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getAccuracy()
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// Aufgabe 4
|
||||
//
|
||||
// Erzeugen Sie eine WebView und zeigen Sie mittels der WebView
|
||||
// alternierend die Location von Network und GPS auf der Karte an
|
||||
//
|
||||
//
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//Update
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
sleep(10000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the updates when Activity is paused
|
||||
*/
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
doRun = false;
|
||||
}
|
||||
|
||||
LocationListener locationListener = new LocationListener() {
|
||||
@Override
|
||||
public void onLocationChanged(android.location.Location location) {
|
||||
//double latitude = location.getLatitude();
|
||||
//double longitude = location.getLongitude();
|
||||
//String msg = "New Latitude: " + latitude + " New Longitude: " + longitude;
|
||||
Toast.makeText(cntxToastInternGNSSUpdate, "Internal GNSS updated", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
// This callback will never be invoked on Android Q and above.
|
||||
public void onStatusChanged(String provider, int status, Bundle extras) {
|
||||
// Toast.makeText(mContext, "Status Changed", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderEnabled(String provider) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderDisabled(String provider) {
|
||||
}
|
||||
};
|
||||
}
|
@ -1,38 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Theme.ExternGnss.AppBarOverlay">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:minHeight="?actionBarSize"
|
||||
android:padding="@dimen/appbar_padding"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
<TextView
|
||||
android:id="@+id/interngnss"
|
||||
android:layout_width="390dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginLeft="21dp"
|
||||
android:layout_marginTop="176dp"
|
||||
android:text="TextView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".PermissionRequester">
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.main.PlaceholderFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/section_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/constraintLayout"
|
||||
tools:layout_constraintLeft_creator="1"
|
||||
tools:layout_constraintTop_creator="1" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 982 B |
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 7.6 KiB |
@ -1,3 +0,0 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">48dp</dimen>
|
||||
</resources>
|
@ -1,16 +0,0 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.ExternGnss" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
@ -1,3 +0,0 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">200dp</dimen>
|
||||
</resources>
|
@ -1,3 +0,0 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">48dp</dimen>
|
||||
</resources>
|
@ -1,6 +0,0 @@
|
||||
<resources>
|
||||
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
</resources>
|
@ -1,10 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
</resources>
|
||||
<color name="colorPrimary">#008577</color>
|
||||
<color name="colorPrimaryDark">#00574B</color>
|
||||
<color name="colorAccent">#D81B60</color>
|
||||
</resources>
|
||||
|
@ -1,8 +0,0 @@
|
||||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="appbar_padding">16dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="appbar_padding_top">8dp</dimen>
|
||||
</resources>
|
@ -1,5 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">ExternGnss</string>
|
||||
<string name="tab_text_1">Tab 1</string>
|
||||
<string name="tab_text_2">Tab 2</string>
|
||||
</resources>
|
||||
<string name="app_name">Location001</string>
|
||||
</resources>
|
||||
|
@ -0,0 +1,11 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -1,25 +0,0 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.ExternGnss" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.ExternGnss.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.ExternGnss.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="Theme.ExternGnss.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
</resources>
|
@ -1,17 +0,0 @@
|
||||
package com.example.externgnss
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package fmaps.grabow.com.location001;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
@ -1,10 +1,25 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '7.1.2' apply false
|
||||
id 'com.android.library' version '7.1.2' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#Sun Mar 27 20:33:38 CEST 2022
|
||||
#Tue May 07 08:39:57 CEST 2019
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
||||
|
@ -1,16 +1 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
rootProject.name = "ExternGnss"
|
||||
include ':app'
|
||||
|