Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- benefits.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- AlertDialog ad = new AlertDialog.Builder(Panchgavya.this).create();
- ad.setCancelable(false); // This blocks the 'BACK' button
- ad.setMessage(getString(R.string.benefits));
- ad.setTitle("Benefits");
- ad.setButton("OK", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- dialog.dismiss();
- }
- });
- ad.show();
- TextView textView = (TextView) ad.findViewById(android.R.id.message);
- textView.setScroller(new Scroller(Panchgavya.this));
- textView.setVerticalScrollBarEnabled(true);
- textView.setMovementMethod(new ScrollingMovementMethod());
- }
- });
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout 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=".Design.Panchgavya"
- android:orientation="vertical">
- <android.support.v7.widget.Toolbar
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:background="@color/Green"
- android:minHeight="?attr/actionBarSize"
- android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:text="Panchgavya"
- android:textColor="@color/white"/>
- </android.support.v7.widget.Toolbar>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="6"
- android:orientation="vertical">
- <TextView
- android:layout_marginTop="10dp"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:ellipsize="end"
- android:text="@string/panchgavya"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="3"
- android:orientation="vertical">
- <TextView
- android:id="@+id/panchgavya_tv_cow_dung"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Cow Dung"
- android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
- android:textStyle="bold"
- android:textColor="@color/black"/>
- <TextView
- android:id="@+id/panchgavya_tv_cow_urine"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- android:text="Cow Urine"
- android:textStyle="bold"
- android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
- android:textColor="@color/black"/>
- <TextView
- android:id="@+id/panchgavya_tv_cow_milk"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- android:text="Cow Milk"
- android:textStyle="bold"
- android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
- android:textColor="@color/black"/>
- <TextView
- android:id="@+id/panchgavya_tv_ghee"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
- android:text="Ghee"
- android:textStyle="bold"
- android:textColor="@color/black"/>
- <TextView
- android:id="@+id/panchgavya_tv_dahi"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
- android:text="Dahi"
- android:textStyle="bold"
- android:textColor="@color/black"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:orientation="vertical"
- android:scrollbars="vertical"
- android:scrollbarAlwaysDrawVerticalTrack="true">
- <Button
- android:id="@+id/panchgavya_btn_benefits"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:text="Benefits"
- android:background="@color/Green"
- android:textColor="@color/white"
- />
- </LinearLayout>
- </LinearLayout>
Add Comment
Please, Sign In to add comment