The type RoadActivity must implement the inherited abstract method求救

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The type RoadActivity must implement the inherited abstract method求救相关的知识,希望对你有一定的参考价值。

package com.ipcamer.demo;

import android.app.Activity;
import android.content.Intent;
import android.drm.DrmStore.Action;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

public class RoadActivity extends Activity implements OnClickListener,OnTouchListener

private Button button_backplay = null;
private Button button1 = null;
//第一次创建该activity是回调这个方法
@Override
public void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);//父类方法
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.road);//设置布局文件


private void findView()
button_backplay = (Button)findViewById(R.id.backplay);
button_backplay.setOnClickListener(this);
button1 = (Button)findViewById(R.id.button1);
button1.setOnTouchListener(this);

@Override
public void onClick(View v)
switch (v.getId())
case R.id.backplay:
Intent intent = new Intent(RoadActivity.this,
PlayActivity.class);
startActivity(intent);
break;


button1.setOnTouchListener(new OnTouchListener()
@Override
public boolean onTouch(View e, MotionEvent event)
// TODO Auto-generated method stub
if(event.getAction() == MotionEvent.ACTION_DOWN)
//更改为按下时的背景图片
e.setBackgroundResource(R.drawable.released);

return false;

);

有没有实现的方法(抽象类、接口里的方法必须都实现),如果你是用的eclipse,把鼠标移到红线的下面,点一下,会自动出现implement...的选项,电一下就自动填写了追问

点了之后填写了,还是这样

追答

你点的是实现还是继续抽象?另外,提示的错误信息有没有变化

追问

我选的第一个

追答

你这点的是其中一个接口吧,继承自的那仨都要点一次

追问

啥意思,我点的就是前面出错有红色叉的那个啊,你说的还要点啥?

参考技术A

若是手机,可以直接去手机设置,选择墙纸,选取新的墙纸背景图片更换即可。

若是手机聊天软件,直接去该软件聊天背景功能设置,更换图片即可。

若是电脑,可以事先保存好想要换的桌面壁纸在桌面上,然后点击图片,点击右键选择设置成为电脑壁纸即可更换成功。

背景图片:泛指在视觉图像中与人所看到的视觉前景相对应的起到衬托前景、协调色调等作用的独立图像,一般用在视觉深远效果的平面或实物前景之后。

The method getContextPath() from the type HttpServletRequest refers to the missing type

    由于经常在工作室和住处之间用的是不同电脑,今天将一个项目从工作室电脑拷到宿舍之后,将整个项目部署好之后,在每个JSP页面中的"request.getContextPath()"下方出现了红色的波浪线,提示的错误信息是“The method getContextPath() from the type HttpServletRequest refers to the missing type String”,

    此时,解决方式是:

    1 右击该项目 - Build Path - Configure Build Path , 在 Libraries 选项下,会发现有个出错的jre Libraries,将其Remove掉。

    2 然后右击该项目 - Build Path - Add Library, 选择JRE System Library,选择Workspace defaulr JRE(默认的工作JDK), 然后 Finish 。

    这样,JSP页面中的错误提示就消失了。


本文出自 “11828641” 博客,请务必保留此出处http://11838641.blog.51cto.com/11828641/1900389

以上是关于The type RoadActivity must implement the inherited abstract method求救的主要内容,如果未能解决你的问题,请参考以下文章

19. --mus-- 音乐,娱乐(词20)

如何解决 raise ValueError("columns must have matching element counts") ValueError: columns mus

The method getContextPath() from the type HttpServletRequest refers to the missing type

The method queryForMap(String, Object...) from the type JdbcTemplate refers to the missing type Data

Error in eval(family$initialize) : y值必需满足0 <= y <= 1Error in eval(family$initialize) : y values mus

[WPF]The type name ‘App’ does not exist in the type '...'的问题