Preference實現自定義視圖

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) { 

   }

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章