Improved landscape layouts & fixed website link in about page.

This commit is contained in:
Electric
2020-05-11 20:43:27 +03:00
parent 18311dafe1
commit c2d602eff4
5 changed files with 147 additions and 4 deletions
@@ -11,15 +11,16 @@ import androidx.appcompat.app.AppCompatActivity;
public class AboutActivity extends AppCompatActivity {
final String githubURL = "https://github.com/adolfintel/OpenPods";
final String websiteURL = "https://fdossena.com/?p=openPods/i.frag";
final String websiteURL = "https://fdossena.com/?p=openPods/index.frag";
final String donateURL = "https://paypal.me/sineisochronic";
@SuppressWarnings("DanglingJavadoc")
@Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
/*
/**
* LEGAL DANGER ZONE!
*
* The following actions are a violation of the GNU GPLv3 License:
@@ -61,7 +61,8 @@ public class PodsService extends Service {
* - Decode the beacon to get the status
* <p>
* On a normal OS, we would use the bluetooth address of the device to filter out beacons from other devices.
* UNFORTUNATELY, someone at google was so concerned about privacy (yea, as if they give a shit) that he decided it was a good idea to not allow access to the bluetooth address of incoming BLE beacons. As a result, we have no reliable way to make sure that the beacon comes from YOUR airpods and not the guy sitting next to you on the bus.
* UNFORTUNATELY, someone at google was so concerned about privacy (yea, as if they give a shit) that he decided it was a good idea to not allow access to the bluetooth address of incoming BLE beacons.
* As a result, we have no reliable way to make sure that the beacon comes from YOUR airpods and not the guy sitting next to you on the bus.
* What we did to workaround this issue is this:
* - When a beacon arrives that looks like a pair of AirPods, look at the other beacons received in the last 10 seconds and get the strongest one
* - If the strongest beacon's fake address is the same as this, use this beacon; otherwise use the strongest beacon
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:paddingLeft="12dp"
android:paddingTop="12dp"
android:paddingRight="12dp"
tools:context=".AboutActivity"
tools:ignore="ContentDescription,ButtonStyle">
<ImageView
android:id="@+id/logo"
android:layout_width="240dp"
android:layout_height="80dp"
android:layout_alignParentEnd="true"
android:layout_marginEnd="36dp"
android:src="@drawable/logo" />
<!-- LEGAL DANGER ZONE
The following actions are a violation of the GNU GPLv3 License:
- Removing, hiding or altering the license or the code that displays it
- Removing or changing the link to the original source code or the code that displays it
- Removing or changing the donation link of the original project or the code that displays it
If you're forking the application, it MUST be made clear that your version is a fork, who the original author is, and all references to the original project and license must not be removed.
You are free to add links to your project, donations, whatever to this activity.
I am constantly monitoring all major Android app stores for violations. You have been warned.
-->
<TextView
android:id="@+id/about1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_toStartOf="@id/logo"
android:gravity="center"
android:text="@string/about1"
android:textColor="#404040" />
<LinearLayout
android:id="@+id/buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/logo"
android:layout_centerHorizontal="true"
android:layout_toStartOf="@id/logo"
android:gravity="center">
<Button
android:id="@+id/website"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/website" />
<Button
android:id="@+id/github"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:text="@string/github" />
<Button
android:id="@+id/donate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#EABF80"
android:text="@string/donate" />
</LinearLayout>
<WebView
android:id="@+id/license"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/buttons"
android:layout_marginTop="16dp" />
<!-- END OF LEGAL DANGER ZONE -->
</RelativeLayout>
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
tools:ignore="ContentDescription">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="end"
android:layout_marginEnd="24dp"
android:scaleType="fitCenter"
android:scaleX="1.1"
android:scaleY="1.1"
android:src="@drawable/ic_check_dgrey_48dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="160dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="36dp"
android:text="@string/main_description"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="@string/supportedDevicesTitle"
android:textSize="17sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/supportedDevicesItems" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:text="@string/hide_message"
android:textStyle="italic" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -4,7 +4,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:padding="12dp"
android:paddingLeft="12dp"
android:paddingTop="12dp"
android:paddingRight="12dp"
tools:context=".AboutActivity"
tools:ignore="ContentDescription,ButtonStyle">