mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 10:05:49 +01:00
Re-do logo logic for AboutScreen to keep aspect ratio
This commit is contained in:
parent
1c2218079b
commit
db47992199
@ -17,42 +17,23 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.activities;
|
package nodomain.freeyourgadget.gadgetbridge.activities;
|
||||||
|
|
||||||
import android.graphics.LightingColorFilter;
|
|
||||||
import android.graphics.drawable.InsetDrawable;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.ScrollView;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
|
|
||||||
|
|
||||||
public class AboutActivity extends AbstractGBActivity {
|
public class AboutActivity extends AbstractGBActivity {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AboutActivity.class);
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_about);
|
setContentView(R.layout.activity_about);
|
||||||
ScrollView aboutBackground = findViewById(R.id.about_background);
|
|
||||||
|
|
||||||
if (!GBApplication.isDarkThemeEnabled()) {
|
|
||||||
aboutBackground.getBackground().setColorFilter(new LightingColorFilter(0x0, 0x00EEEEEE));
|
|
||||||
} else {
|
|
||||||
aboutBackground.getBackground().setColorFilter(new LightingColorFilter(0x0, 0x00404040));
|
|
||||||
}
|
|
||||||
|
|
||||||
TextView link1 = findViewById(R.id.links1);
|
TextView link1 = findViewById(R.id.links1);
|
||||||
link1.setMovementMethod(LinkMovementMethod.getInstance());
|
link1.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
TextView link2 = findViewById(R.id.links2);
|
TextView link2 = findViewById(R.id.links2);
|
||||||
link2.setMovementMethod(LinkMovementMethod.getInstance());
|
link2.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
TextView link3 = findViewById(R.id.links3);
|
TextView link3 = findViewById(R.id.links3);
|
||||||
link3.setMovementMethod(LinkMovementMethod.getInstance());
|
link3.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,27 @@
|
|||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout 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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/about_background"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:background="@drawable/gadgetbridge_img"
|
|
||||||
android:paddingLeft="@dimen/about_margin"
|
<ImageView
|
||||||
android:paddingRight="@dimen/about_margin"
|
android:id="@+id/no_items_bg"
|
||||||
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.AboutActivity">
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:alpha="0.1"
|
||||||
|
android:contentDescription="@string/icon_placeholder"
|
||||||
|
android:tint="?attr/textColorPrimary"
|
||||||
|
app:srcCompat="@drawable/gadgetbridge_img" />
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:id="@+id/about_background"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingLeft="@dimen/about_margin"
|
||||||
|
android:paddingRight="@dimen/about_margin"
|
||||||
|
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.AboutActivity">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -144,7 +159,6 @@
|
|||||||
android:textColor="@color/accent" />
|
android:textColor="@color/accent" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
</ScrollView>
|
</RelativeLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user