-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
163 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package jaygoo.wavelineview; | ||
|
||
import android.app.Application; | ||
|
||
import com.squareup.leakcanary.LeakCanary; | ||
|
||
|
||
/** | ||
* ================================================ | ||
* 作 者:JayGoo | ||
* 版 本: | ||
* 创建日期:2017/7/28 | ||
* 描 述: | ||
* ================================================ | ||
*/ | ||
public class App extends Application { | ||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
if (LeakCanary.isInAnalyzerProcess(this)) { | ||
return; | ||
} | ||
LeakCanary.install(this); | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
app/src/main/java/jaygoo/wavelineview/LeakTestActivity.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,69 @@ | ||
package jaygoo.wavelineview; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
|
||
import jaygoo.widget.wlv.WaveLineView; | ||
|
||
/** | ||
* ================================================ | ||
* 作 者:JayGoo | ||
* 版 本: | ||
* 创建日期:2017/7/31 | ||
* 描 述: | ||
* ================================================ | ||
*/ | ||
public class LeakTestActivity extends Activity{ | ||
private WaveLineView waveLineView; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
waveLineView = (WaveLineView) findViewById(R.id.waveLineView); | ||
|
||
findViewById(R.id.startBtn).setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
waveLineView.startAnim(); | ||
} | ||
}); | ||
|
||
findViewById(R.id.stopBtn).setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
waveLineView.stopAnim(); | ||
|
||
} | ||
}); | ||
|
||
findViewById(R.id.leakTestBtn).setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
finish(); | ||
startActivity(new Intent(LeakTestActivity.this,MainActivity.class)); | ||
} | ||
}); | ||
} | ||
|
||
|
||
@Override | ||
protected void onResume() { | ||
super.onResume(); | ||
waveLineView.onResume(true); | ||
} | ||
|
||
@Override | ||
protected void onPause() { | ||
super.onPause(); | ||
waveLineView.onPause(); | ||
} | ||
|
||
@Override | ||
protected void onDestroy() { | ||
super.onDestroy(); | ||
waveLineView.release(); | ||
} | ||
} |
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