小编Jas*_*onW的帖子

RadioGroup,setEnabled(false)无效!

我使用setEnabled(false)来设置它无法,但它不起作用.在此方法之后,RadioGroup.IsEnabled()的值为false.价值改变了.

该代码来自Android编程指南.Ps:Spinner组件使用setEnabled(false)很好.

代码如下:

package com.example.testviews;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RadioGroup;

public class TestRadioGroup extends Activity {


@Override
public void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.radiogroup);

    final RadioGroup testRadioGroup = (RadioGroup) findViewById(R.id.testRadioGroup);

    final Button changeEnabledButton = (Button) findViewById(R.id.changeEnabledButton);
    changeEnabledButton.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            // TODO Auto-generated method stub
            changeEnabled(testRadioGroup);
        }
    });

    final Button changeBgColorButton = (Button) findViewById(R.id.changeBackgroundColorButton);
    changeBgColorButton.setOnClickListener(new OnClickListener() {

        public void onClick(View v) { …
Run Code Online (Sandbox Code Playgroud)

android android-widget

31
推荐指数
1
解决办法
2万
查看次数

UIWebView WebCore TimerBase仅在11.3(15E216)上崩溃:SIGTRAP WebCore _ZN7WebCore9TimerBaseD2Ev

我最近收到了Crash Report Tools的崩溃报告.这次崩溃是指UIWebView WebCore崩溃,我的应用程序仅使用UIWebView,而我最近无法切换到WKWebview.下面是崩溃报告,我无法重现它.它发生在设备iPhone 6,7,8,X上,但只使用iOS 11.3版本(15E216).

这次崩溃有3个不同的崩溃堆栈.任何意见将是有益的.

类型1:

0 WebCore WebCore::TimerBase::~TimerBase() + 120  
1 WebCore WebCore::TimerBase::~TimerBase() + 40  
2 WebCore WebCore::ImageLoader::~ImageLoader() + 2076  
3 WebCore WebCore::HTMLImageElement::~HTMLImageElement() + 224  
4 WebCore WebCore::HTMLImageElement::~HTMLImageElement() + 12  
5 JavaScriptCore void JSC::MarkedBlock::Handle::specializedSweep<true, (JSC::MarkedBlock::Handle::EmptyMode)1, (JSC::MarkedBlock::Handle::SweepMode)1, (JSC::MarkedBlock::Handle::SweepDestructionMode)1, (JSC::MarkedBlock::Handle::ScribbleMode)0, (JSC::MarkedBlock::Handle::NewlyAllocatedMode)1, (JSC::MarkedBlock::Handle::MarksMode)1, JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::MarkedBlock::Handle::EmptyMode, JSC::MarkedBlock::Handle::SweepMode, JSC::MarkedBlock::Handle::SweepDestructionMode, JSC::MarkedBlock::Handle::ScribbleMode, JSC::MarkedBlock::Handle::NewlyAllocatedMode, JSC::MarkedBlock::Handle::MarksMode, JSC::JSDestructibleObjectDestroyFunc const&) + 212  
Run Code Online (Sandbox Code Playgroud)

类型2:

0 WebCore WebCore::TimerBase::~TimerBase() + 120  
1 WebCore WebCore::TimerBase::~TimerBase() + 40  
2 WebCore WebCore::XMLHttpRequest::~XMLHttpRequest() + 116  
3 WebCore WebCore::XMLHttpRequest::~XMLHttpRequest() + 12  
4 JavaScriptCore void JSC::MarkedBlock::Handle::specializedSweep<true, (JSC::MarkedBlock::Handle::EmptyMode)1, …
Run Code Online (Sandbox Code Playgroud)

crash webkit uiwebview ios

11
推荐指数
2
解决办法
1235
查看次数

在使invalidlateout容器无效后,未调用子视图的ondraw()

我正在编写一个日历视图.当我按下一个月的按钮时,我调用了mCalendarContainerLL.invalidate();但我的自定义视图没有被重绘.我的自定义视图中的onDraw方法没有被调用.

Ps:如果我直接使所有日历单元格视图无效.它有效.为什么会这样?

这是代码:

private CalendarWidgetDayCell updateCalendarView() {

        CalendarWidgetDayCell dayCellSelected = null;
        boolean isSelected = false;

        final boolean isHasSelection = (mCalendarSelected.getTimeInMillis() != 0);

        final int selectedYear = mCalendarSelected.get(Calendar.YEAR);
        final int selectedMonth = mCalendarSelected.get(Calendar.MONTH);
        final int selectedDay = mCalendarSelected.get(Calendar.DAY_OF_MONTH);

        Calendar dateXOfCalendar = Calendar.getInstance();
        dateXOfCalendar.setTimeInMillis(mStartDateCurrentMonth.getTimeInMillis());

        Log.d(tag, "updateCalendarView cpt_func_ " + "mDayCellList.size(): " + mDayCellList.size());
        for (int i = 0; i < mDayCellList.size(); i++) {
            final int yearOfCellItem = dateXOfCalendar.get(Calendar.YEAR);
            final int monthOfCellItem = dateXOfCalendar.get(Calendar.MONTH);
            final int dayOfCellItem = dateXOfCalendar.get(Calendar.DAY_OF_MONTH);
            final int dayOfWeekOfCellItem = …
Run Code Online (Sandbox Code Playgroud)

android calendar view invalidation android-custom-view

4
推荐指数
1
解决办法
3219
查看次数