splash screen design changed

This commit is contained in:
cimenmus
2018-08-24 21:47:49 +03:00
parent ce86b7f951
commit 9ef14e23a8
4 changed files with 14 additions and 90 deletions

View File

@@ -51,8 +51,6 @@ import retrofit2.Response;
public class SplashActivity extends BaseActivity {
@BindView(R.id.campaign1ImageView) ImageView campaign1ImageView;
@BindView(R.id.campaign2ImageView) ImageView campaign2ImageView;
@BindView(R.id.pizzappSplashLogoImageView) ImageView pizzappSplashLogoImageView;
@BindView(R.id.postCodeTextView) TextView postCodeTextView;
@@ -66,7 +64,6 @@ public class SplashActivity extends BaseActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
ButterKnife.bind(this);
initViews();
//DisplayHelper.changeStatusColor();
if(NetworkHelper.isNetworkAvailable()){
getStoreList();
@@ -93,29 +90,6 @@ public class SplashActivity extends BaseActivity {
}
}
private void initViews(){
int imageViewWidth = DisplayHelper.getScreenWidthInPixel() - DisplayHelper.dpToPx(32);
int campaign1ImageViewHeight = imageViewWidth * 150 / 400;
int campaign2ImageViewHeight = imageViewWidth * 150 / 400;
int pizzapassLogoImageViewHeight = imageViewWidth * 409 / 910;
LinearLayout.LayoutParams campaign1ImageViewLayoutParams = (LinearLayout.LayoutParams) campaign1ImageView.getLayoutParams();
campaign1ImageViewLayoutParams.width = imageViewWidth;
campaign1ImageViewLayoutParams.height = campaign1ImageViewHeight;
campaign1ImageView.setLayoutParams(campaign1ImageViewLayoutParams);
LinearLayout.LayoutParams campaign2ImageViewLayoutParams = (LinearLayout.LayoutParams) campaign2ImageView.getLayoutParams();
campaign2ImageViewLayoutParams.width = imageViewWidth;
campaign2ImageViewLayoutParams.height = campaign2ImageViewHeight;
campaign2ImageView.setLayoutParams(campaign2ImageViewLayoutParams);
LinearLayout.LayoutParams pizzappSplashLogoImageViewLayoutParams = (LinearLayout.LayoutParams) pizzappSplashLogoImageView.getLayoutParams();
pizzappSplashLogoImageViewLayoutParams.width = imageViewWidth;
pizzappSplashLogoImageViewLayoutParams.height = pizzapassLogoImageViewHeight;
pizzappSplashLogoImageView.setLayoutParams(pizzappSplashLogoImageViewLayoutParams);
}
private void getStoreList(){
DialogHelper.showLoadingDialog();
Call<ResponseArray<StoreModel>> call = ApiService.apiInterface.getStoreList();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

View File

@@ -15,40 +15,22 @@
android:scaleType="centerCrop"
android:src="@drawable/background_wood"/>
<ImageView
android:id="@+id/pizzappSplashLogoImageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/pizzapp_splash_logo"
android:adjustViewBounds="true"
android:layout_margin="16dp"
android:scaleType="fitXY" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="8dp">
<ImageView
android:id="@+id/campaign1ImageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/angebot1"
android:adjustViewBounds="true"
android:layout_gravity="center_horizontal"
android:scaleType="fitXY" />
<ImageView
android:id="@+id/campaign2ImageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:src="@drawable/angebot2"/>
<ImageView
android:id="@+id/pizzappSplashLogoImageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/pizzapp_splash_logo"
android:adjustViewBounds="true"
android:layout_marginTop="8dp"
android:scaleType="fitXY" />
android:layout_margin="8dp"
android:layout_centerInParent="true">
<RelativeLayout
android:id="@+id/choosePostCodeLayout"
@@ -100,36 +82,4 @@
</LinearLayout>
</RelativeLayout>
<!--
<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="ch.pizzapp.android.activity.SplashActivity"
android:background="@color/white">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/background_wood"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:layout_centerInParent="true"
android:text="Hello World!"
android:layout_margin="64dp"
android:src="@drawable/splash_logo"/>
</RelativeLayout>
-->
</RelativeLayout>