CopyPastor

Detecting plagiarism made easy.

Score: 0.7551615238189697; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2018-09-12
by Vijay Singh Chouhan

Original Post

Original - Posted on 2017-07-10
by Faxriddin Abdullayev



            
Present in both answers; Present only in the new answer; Present only in the old answer;

User custom dialog for spinner and make dialog.setCancelable(true) for outside click .
final Dialog dialog = new Dialog(activity); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setCancelable(true); dialog.setContentView(R.layout.dialog);
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="80dp" android:background="#3E80B4" android:orientation="vertical" > <TextView android:id="@+id/txt_dia" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_margin="10dp" android:text="This is spinner" android:textColor="@android:color/white" android:textSize="15dp" android:textStyle="bold"/> <Spinner android:id="@+id/size_spinner" android:layout_width="wrap_content" android:layout_height="wrap_content" android:entries="@array/size_entries" /> </LinearLayout>


Create alert Dialog layout something like this
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="@+id/btn" android:layout_width="match_parent" android:text="Custom Alert Dialog" android:layout_height="40dp"> </Button> </LinearLayout>
and Add below code on your Activity class
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
LayoutInflater inflate = LayoutInflater.from(this); alertView = inflate.inflate(R.layout.your_alert_layout, null); Button btn= (Button) alertView.findViewById(R.id.btn); showDialog(); }
public void showDialog(){ Dialog alertDialog = new Dialog(RecognizeConceptsActivity.this); alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); alertDialog.setContentView(alertView); alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); alertDialog.show(); }


        
Present in both answers; Present only in the new answer; Present only in the old answer;