-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change library to be a regular object rather than Service
- Loading branch information
1 parent
6024705
commit 4bfd622
Showing
6 changed files
with
294 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
demo/src/main/java/com/danialgoodwin/globaloverlay/demo/SimpleOverlayServiceOld.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Created by Danial on 3/16/2015. | ||
*/ | ||
package com.danialgoodwin.globaloverlay.demo; | ||
|
||
import android.view.View; | ||
import android.widget.ImageView; | ||
import android.widget.Toast; | ||
|
||
import com.danialgoodwin.globaloverlay.GlobalOverlayService; | ||
|
||
/** Simple demo for creating an interactable global floating view. */ | ||
public class SimpleOverlayServiceOld extends GlobalOverlayService { | ||
|
||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
|
||
ImageView view = new ImageView(this); | ||
view.setImageResource(R.mipmap.ic_launcher); | ||
addOverlayView(view, new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
toast("onClick"); | ||
} | ||
}, new View.OnLongClickListener() { | ||
@Override | ||
public boolean onLongClick(View v) { | ||
toast("onLongClick not implemented yet"); | ||
return false; | ||
} | ||
}, new OnRemoveOverlayListener() { | ||
@Override | ||
public void onRemoveOverlay(View view, boolean b) { | ||
toast("onRemoveOverlay"); | ||
} | ||
}); | ||
} | ||
|
||
private void toast(String message) { | ||
Toast.makeText(this, message, Toast.LENGTH_SHORT).show(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.