CopyPastor

Detecting plagiarism made easy.

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

Possible Plagiarism

Plagiarized on 2017-10-06
by Abdul Ahad

Original Post

Original - Posted on 2015-04-30
by shlee1



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

Use this simply.
Spinner spinner = (Spinner) findViewById(R.id.spinner); try { Field popup = Spinner.class.getDeclaredField("mPopup"); popup.setAccessible(true);
// Get private mPopup member variable and try cast to ListPopupWindow android.widget.ListPopupWindow popupWindow = (android.widget.ListPopupWindow) popup.get(spinner);
// Set popupWindow height to 500px popupWindow.setHeight(500); } catch (NoClassDefFoundError | ClassCastException | NoSuchFieldException | IllegalAccessException e) { // silently fail... }
You can use Reflection.
Spinner spinner = (Spinner) findViewById(R.id.spinner); try { Field popup = Spinner.class.getDeclaredField("mPopup"); popup.setAccessible(true); // Get private mPopup member variable and try cast to ListPopupWindow android.widget.ListPopupWindow popupWindow = (android.widget.ListPopupWindow) popup.get(spinner); // Set popupWindow height to 500px popupWindow.setHeight(500); } catch (NoClassDefFoundError | ClassCastException | NoSuchFieldException | IllegalAccessException e) { // silently fail... }

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