1. Are you ready for the Galaxy S20? Here is everything we know so far!

After renaming a button it no longer works

Discussion in 'Android Development' started by favalcatraz, Mar 9, 2021.

  1. favalcatraz

    favalcatraz Lurker
    Thread Starter

    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?
     



    1. Download the Forums for Android™ app!


      Download

       
Loading...
Similar Threads - renaming button longer
  1. Robert Spinden
    Replies:
    10
    Views:
    328
  2. brentc
    Replies:
    2
    Views:
    255
  3. parthag
    Replies:
    0
    Views:
    239
  4. App Update
    Replies:
    0
    Views:
    268
  5. Leon Euler
    Replies:
    1
    Views:
    242
  6. startac4
    Replies:
    3
    Views:
    366
  7. 2manycells
    Replies:
    1
    Views:
    300
  8. mikewax
    Replies:
    0
    Views:
    465
  9. Fredtt686
    Replies:
    8
    Views:
    986
  10. dawids9
    Replies:
    4
    Views:
    5,268

Share This Page

Loading...