Пример #1
0
 public override void addView(android.view.View child)
 {
     if (child.getLayoutParams() == null)
     {
         android.widget.LinearLayout.LayoutParams lp = new android.widget.LinearLayout.LayoutParams
                                                           (0, android.view.ViewGroup.LayoutParams.MATCH_PARENT, 1.0f);
         lp.setMargins(0, 0, 0, 0);
         child.setLayoutParams(lp);
     }
     // Ensure you can navigate to the tab with the keyboard, and you can touch it
     child.setFocusable(true);
     child.setClickable(true);
     base.addView(child);
     // TODO: detect this via geometry with a tabwidget listener rather
     // than potentially interfere with the view's listener
     child.setOnClickListener(new android.widget.TabWidget.TabClickListener(this, getTabCount
                                                                                () - 1));
     child.setOnFocusChangeListener(this);
 }