Example #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);
 }
 public virtual android.view.View getPermissionsView()
 {
     mInflater = (android.view.LayoutInflater)mContext.getSystemService(android.content.Context
                                                                        .LAYOUT_INFLATER_SERVICE);
     mPermsView = (android.widget.LinearLayout)mInflater.inflate([email protected]
                                                                 .app_perms_summary, null);
     mShowMore     = mPermsView.findViewById([email protected]_more);
     mShowMoreIcon = (android.widget.ImageView)mShowMore.findViewById([email protected]
                                                                      .id.show_more_icon);
     mShowMoreText = (android.widget.TextView)mShowMore.findViewById([email protected]
                                                                     .id.show_more_text);
     mDangerousList = (android.widget.LinearLayout)mPermsView.findViewById([email protected]
                                                                           .id.dangerous_perms_list);
     mNonDangerousList = (android.widget.LinearLayout)mPermsView.findViewById([email protected]
                                                                              .id.non_dangerous_perms_list);
     mNoPermsView = mPermsView.findViewById([email protected]_permissions);
     // Set up the LinearLayout that acts like a list item.
     mShowMore.setClickable(true);
     mShowMore.setOnClickListener(this);
     mShowMore.setFocusable(true);
     // Pick up from framework resources instead.
     mDefaultGrpLabel = mContext.getString([email protected][email protected]_permission_group
                                           );
     mPermFormat = mContext.getString([email protected][email protected]_format);
     mNormalIcon = mContext.getResources().getDrawable([email protected]_text_dot
                                                       );
     mDangerousIcon = mContext.getResources().getDrawable([email protected]
                                                          .ic_bullet_key_permission);
     mShowMaxIcon = mContext.getResources().getDrawable([email protected]_close_holo_dark
                                                        );
     mShowMinIcon = mContext.getResources().getDrawable([email protected]_open_holo_dark
                                                        );
     // Set permissions view
     setPermissions(mPermsList);
     return(mPermsView);
 }