• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

After renaming a button it no longer works

Hi forum.
I've a strange problem...
I was debugging my simple app and all it worked, after I renamed a button all button didn't work... So I tried to make a new app with only a button and this has the same problem

public class MainActivity extends WearableActivity {

Button test;

@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
test = (Button) findViewById(R.id.buttons);
test.setText("•");
test.setOnClickListener(new View.OnClickListener() {
@override
public void onClick(View view) {

test.setText("_");
}
});
// Enables Always-on
//setAmbientEnabled();
}
public void sendMessage(View view) {
test.setText("––––_");
}
}

In the logCat I see this info

2021-03-07 11:10:34.844 19294-19294/com.example.tennisgame W/ViewRootImpl[MainActivity]: Cancelling event due to no window focus: MotionEvent { action=ACTION_CANCEL, actionButton=0, id[0]=0, x[0]=62.996155, y[0]=75.99426, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=15866864, downTime=15866744, deviceId=0, source=0x1002 }
2021-03-07 11:10:40.400 2468-19241/com.google.android.wearable.app E/HOME: [ClockworkHome]Rescheduling failed periodic task StorePhoneSettingsCallable

Can somebody help me?
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones