Created BottomStatusBar custom view and added it to Settings and CreateSeed Activities

This commit is contained in:
Severiano Jaramillo 2018-01-24 22:27:15 -06:00
parent dc4bd347c3
commit 05dc28aa63
4 changed files with 14 additions and 47 deletions

View file

@ -84,11 +84,6 @@ public class SettingsActivity extends AppCompatActivity{
mPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout));
tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(mPager));
// Automatically get build version from app information
String buildVersion = "v";
buildVersion += BuildConfig.VERSION_NAME;
tvBuildVersion.setText(buildVersion);
}
private class SettingsPagerAdapter extends FragmentStatePagerAdapter {

View file

@ -125,47 +125,13 @@
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/clBottomBanner"/>
android:layout_above="@id/bottomStatusBar"/>
<android.support.constraint.ConstraintLayout
android:id="@+id/clBottomBanner"
<cy.agorise.crystalwallet.util.BottomStatusBar
android:id="@+id/bottomStatusBar"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_alignParentBottom="true"
android:background="@color/gray">
<TextView
android:id="@+id/tvBuildVersion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="@string/version_placeholder"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/block_number_placeholder"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="24dp"
android:layout_marginTop="8dp"
android:src="@drawable/icon_connecting"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"/>
</RelativeLayout>

View file

@ -89,7 +89,7 @@
android:text="@string/cancel"
android:textColor="@color/white"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
app:layout_constraintBottom_toTopOf="@+id/bottomStatusBar"
app:layout_constraintStart_toStartOf="@id/tilAccountName"
app:layout_constraintTop_toBottomOf="@+id/tilAccountName" />
@ -106,7 +106,7 @@
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="@id/tilAccountName"
app:layout_constraintTop_toTopOf="@id/btnCancel" />
<!--
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
@ -146,5 +146,10 @@
android:src="@drawable/icon_setting"
android:visibility="invisible" />
</LinearLayout>
-->
<cy.agorise.crystalwallet.util.BottomStatusBar
android:id="@+id/bottomStatusBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"/>
</android.support.constraint.ConstraintLayout>

View file

@ -498,4 +498,5 @@
<string name="pattern">Pattern</string>
<string name="new_user">New user?</string>
<string name="existing_user">Existing user?</string>
<string name="connection_status">Connection status</string>
</resources>