Preference实现自定义视图

来源:互联网 发布:网络运行 编辑:程序博客网 时间:2024/05/21 17:12

public class CustomePreference extends Preference {

   private LinearLayout mAccountContainer = null;

   private Context mContext = null;

   private Activity mActivity ;

   

   public CustomePreference (Context context, AttributeSet attrs, int defStyle) {

      super(context, attrs, defStyle);

      this.mContext = context;

   }

   public CustomePreference (Context context, AttributeSet attrs) {

      super(context, attrs);

      this.mContext = context;

   }

   @Override

   protected View onCreateView(ViewGroup parent) {

      View layout = 

         LayoutInflater.from(getContext()).inflate(R.layout.account_setting, parent,false);

      return layout;

   }

   @Override

   protected voidonBindView(View view) {

      super.onBindView(view);

   }

   public void startFilterActivity (Context context) { 

   }

}

0 0