如何使用用户提供的图像高度更改图像高度(提示)

时间:2017-01-08 17:02:59

标签: javascript

代码的第二部分(以var newHeight开头)不起作用 - 出了什么问题?

public class MyScheduler extends Activity {


protected static final String TAG = "MyScheduler";

@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    setRecurringAlarm(this);
}

private void setRecurringAlarm(Context context) {

    Log.i(TAG, "setReccuringAlarm");
    Calendar updateTime = Calendar.getInstance();
    updateTime.setTimeZone(TimeZone.getTimeZone("GMT+1:00"));
    updateTime.set(Calendar.HOUR_OF_DAY, 15);
    updateTime.set(Calendar.MINUTE, 10);

    Intent intent = new Intent(context, Tasks.class);
    PendingIntent recurringDownload = PendingIntent.getBroadcast(context,
            0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
    AlarmManager alarms = (AlarmManager) this.getSystemService(
            Context.ALARM_SERVICE);
    alarms.setInexactRepeating(AlarmManager.RTC_WAKEUP,
            updateTime.getTimeInMillis(),
            AlarmManager.INTERVAL_DAY, recurringDownload);
    }
}

1 个答案:

答案 0 :(得分:1)

您必须更改此行:

theOne.style.height = newHeight;

而不是

theOne.style.height === newHeight;

第二个是表达,而不是作业。