Browse Source

AboutActivity minro changes

pull/24/head
Ezerous 7 years ago
parent
commit
74a272e313
  1. 11
      app/src/main/java/gr/thmmy/mthmmy/activities/AboutActivity.java
  2. 17
      app/src/main/res/layout/activity_about.xml
  3. 9
      app/src/main/res/layout/fragment_unread_mark_read_row.xml

11
app/src/main/java/gr/thmmy/mthmmy/activities/AboutActivity.java

@ -33,7 +33,6 @@ public class AboutActivity extends BaseActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about); setContentView(R.layout.activity_about);
String versionName = BuildConfig.VERSION_NAME; String versionName = BuildConfig.VERSION_NAME;
String buildType = BuildConfig.BUILD_TYPE;
//Initialize appbar //Initialize appbar
appBar = findViewById(R.id.appbar); appBar = findViewById(R.id.appbar);
@ -54,13 +53,12 @@ public class AboutActivity extends BaseActivity {
trollGif = findViewById(R.id.trollPicFrame); trollGif = findViewById(R.id.trollPicFrame);
TextView tv = findViewById(R.id.version); TextView tv = findViewById(R.id.version);
if (tv != null) if (tv != null) {
{ if (BuildConfig.DEBUG)
if(buildType.equals("debug"))
tv.setText(getString(R.string.version, versionName + "-debug")); tv.setText(getString(R.string.version, versionName + "-debug"));
else else
tv.setText(getString(R.string.version, versionName)); tv.setText(getString(R.string.version, versionName));
}
tv.setOnClickListener(new View.OnClickListener() { tv.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -81,6 +79,7 @@ public class AboutActivity extends BaseActivity {
} }
} }
}); });
}
} }
@ -101,6 +100,7 @@ public class AboutActivity extends BaseActivity {
.setView(webView) .setView(webView)
.setPositiveButton(android.R.string.ok, null) .setPositiveButton(android.R.string.ok, null)
.show(); .show();
if(alertDialog.getWindow()!=null)
alertDialog.getWindow().setLayout(width, height); alertDialog.getWindow().setLayout(width, height);
} }
@ -115,6 +115,7 @@ public class AboutActivity extends BaseActivity {
.setView(webView) .setView(webView)
.setPositiveButton(android.R.string.ok, null) .setPositiveButton(android.R.string.ok, null)
.show(); .show();
if(alertDialog.getWindow()!=null)
alertDialog.getWindow().setLayout(width, height); alertDialog.getWindow().setLayout(width, height);
} }

17
app/src/main/res/layout/activity_about.xml

@ -20,7 +20,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"
app:popupTheme="@style/ToolbarTheme"></android.support.v7.widget.Toolbar> app:popupTheme="@style/ToolbarTheme" />
</android.support.design.widget.AppBarLayout> </android.support.design.widget.AppBarLayout>
@ -28,7 +28,7 @@
android:id="@+id/scrollview" android:id="@+id/scrollview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/background" android:background="@color/primary_light"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
@ -41,18 +41,15 @@
android:paddingTop="@dimen/activity_vertical_margin" android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.eternalpixels.toinfinity.Info"> tools:context="com.eternalpixels.toinfinity.Info">
<ImageView
<pl.droidsonroids.gif.GifImageView
android:id="@+id/logoView" android:id="@+id/logoView"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_margin="15dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp" android:layout_alignParentTop="true"
android:layout_marginTop="20dp" android:src="@mipmap/ic_launcher"
android:contentDescription="@string/logo" android:contentDescription="@string/logo" />
android:src="@drawable/logo_animated" />
<TextView <TextView
android:id="@+id/version" android:id="@+id/version"

9
app/src/main/res/layout/fragment_unread_mark_read_row.xml

@ -2,15 +2,16 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical">
android:paddingEnd="10dp"
android:paddingStart="10dp"
android:paddingTop="7dp">
<TextView <TextView
android:id="@+id/mark_read" android:id="@+id/mark_read"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingEnd="10dp"
android:paddingStart="10dp"
android:paddingTop="7dp"
android:paddingBottom="7dp"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/accent" /> android:textColor="@color/accent" />
</LinearLayout> </LinearLayout>
Loading…
Cancel
Save