Git Product home page Git Product logo

Comments (3)

yilylong avatar yilylong commented on July 20, 2024

因为在自定义的布局layout_custom_dialog_layout.xml中我去掉了取消按钮 只有确认按钮`

    <Button
        android:id="@+id/dialog_posi_btn"
        style="@style/dialog_button_style"
        android:background="@drawable/custom_btn_bg"
        android:text="确定" />
</LinearLayout>`

你想要有取消按钮在你自定义的布局中加入取消按钮即可,view的id参考cb_dialog.xml 中的即可(id要一样不然找不到这个按钮)。
`

        <Button
            android:id="@+id/dialog_neg_btn"
            style="@style/dialog_button_style"
            android:background="@drawable/cb_button_background_left"
            android:text="取消"
            android:textColor="@color/cb_btn_bg_blue"
            android:visibility="gone" />

        <View
            android:id="@+id/btn_line_verticle"
            android:layout_width="0.5dp"
            android:layout_height="match_parent"
            android:background="@color/btn_bg_line"
            android:visibility="gone" />

        <Button
            android:id="@+id/dialog_posi_btn"
            style="@style/dialog_button_style"
            android:background="@drawable/cb_button_background_right"
            android:text="确定"
            android:textColor="@color/cb_btn_bg_blue" />

    </LinearLayout>`

from cbdialog.

mayi8986 avatar mayi8986 commented on July 20, 2024

我在自定义布局中加入了取消按钮 ,id也是一样的,确定按钮的监听事件都获取不到

from cbdialog.

yilylong avatar yilylong commented on July 20, 2024

测试了下确实有问题,已经修改,可以更新到最新v1.0.7

from cbdialog.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.