option to show and hide the header fields
This commit is contained in:
parent
0e858292b5
commit
b04d60fb7d
3 changed files with 34 additions and 0 deletions
|
@ -41,6 +41,20 @@ public class PassViewActivity extends PassViewActivityBase {
|
|||
AXT.at(this).startCommonIntent().activityFromClass(FullscreenBarcodeActivity.class);
|
||||
}
|
||||
|
||||
@OnClick(R.id.moreTextView)
|
||||
void onMoreClick() {
|
||||
if (back_tv.getVisibility() == View.VISIBLE) {
|
||||
back_tv.setVisibility(View.GONE);
|
||||
moreTextView.setText(R.string.more);
|
||||
} else {
|
||||
back_tv.setVisibility(View.VISIBLE);
|
||||
moreTextView.setText(R.string.less);
|
||||
}
|
||||
}
|
||||
|
||||
@InjectView(R.id.moreTextView)
|
||||
TextView moreTextView;
|
||||
|
||||
@InjectView(R.id.barcode_img)
|
||||
ImageView barcode_img;
|
||||
|
||||
|
|
|
@ -35,10 +35,28 @@
|
|||
android:paddingBottom="10dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/more"
|
||||
android:layout_gravity="center"
|
||||
android:padding="10dp"
|
||||
android:textSize="21sp"
|
||||
android:id="@+id/moreTextView"
|
||||
android:fontFamily="sans-serif" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/back_fields"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
|
||||
android:padding="20dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo_img"
|
||||
|
|
|
@ -84,5 +84,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS
|
|||
<string name="dialog_delete_confirm_text">Do you really want to delete this passbook?</string>
|
||||
<string name="dialog_delete_title">Sure?</string>
|
||||
<string name="dialog_delete_confirm_delete_source_checkbox">also delete source?</string>
|
||||
<string name="more">MORE</string>
|
||||
<string name="less">LESS</string>
|
||||
|
||||
</resources>
|
Loading…
Reference in a new issue