This repository has been archived by the owner on Apr 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Arjun-sna/dev
UI updates
- Loading branch information
Showing
25 changed files
with
492 additions
and
126 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
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
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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/in/arjsna/audiorecorder/di/components/ServiceComponent.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
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
89 changes: 89 additions & 0 deletions
89
app/src/main/java/in/arjsna/audiorecorder/libs/FillSeekBar.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,89 @@ | ||
package in.arjsna.audiorecorder.libs; | ||
|
||
import android.content.Context; | ||
import android.content.res.TypedArray; | ||
import android.graphics.Canvas; | ||
import android.graphics.Color; | ||
import android.graphics.Paint; | ||
import android.util.AttributeSet; | ||
import android.util.Log; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.FrameLayout; | ||
import android.widget.LinearLayout; | ||
import in.arjsna.audiorecorder.R; | ||
import in.arjsna.audiorecorder.theme.ThemedActivity; | ||
|
||
public class FillSeekBar extends FrameLayout { | ||
private final int mFillColor; | ||
private long mProgress = 0; | ||
private Solid mSolid; | ||
|
||
private final int DEFAULT_FILL_COLOR = Color.WHITE; | ||
private double mMaxValue = 1.0; | ||
|
||
public FillSeekBar(Context context, AttributeSet attrs) { | ||
super(context, attrs); | ||
//load styled attributes. | ||
final TypedArray attributes = context.getTheme() | ||
.obtainStyledAttributes(attrs, R.styleable.FillSeekBar, R.attr.fillseekbarViewStyle, 0); | ||
mFillColor = | ||
((ThemedActivity) context).getPrimaryColor(); | ||
mProgress = attributes.getInt(R.styleable.FillSeekBar_progress, 0); | ||
attributes.recycle(); | ||
mSolid = new Solid(context, null); | ||
mSolid.initPaint(mFillColor); | ||
addView(mSolid, 0, LayoutParams.MATCH_PARENT); | ||
} | ||
|
||
public void setMaxVal(double maxVal) { | ||
this.mMaxValue = maxVal; | ||
} | ||
|
||
public void setProgress(long progress) { | ||
mProgress = progress > mMaxValue ? (long) mMaxValue : progress; | ||
computeProgressRight(); | ||
} | ||
|
||
private void computeProgressRight() { | ||
int mSolidRight = (int) (getWidth() * (1f - mProgress / mMaxValue)); | ||
//Log.i("Stats ", mSolidRight + " " + mProgress); | ||
ViewGroup.LayoutParams params = mSolid.getLayoutParams(); | ||
if (params != null) { | ||
((LayoutParams) params).width = getWidth() - mSolidRight; | ||
} | ||
mSolid.setLayoutParams(params); | ||
} | ||
|
||
private static class Solid extends View { | ||
|
||
private Paint progressPaint; | ||
|
||
public Solid(Context context, AttributeSet attrs) { | ||
this(context, attrs, 0); | ||
} | ||
|
||
public Solid(Context context, AttributeSet attrs, int defStyleAttr) { | ||
super(context, attrs, defStyleAttr); | ||
LinearLayout.LayoutParams params = | ||
new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, | ||
LinearLayout.LayoutParams.WRAP_CONTENT); | ||
params.weight = 1; | ||
setLayoutParams(params); | ||
} | ||
|
||
public void initPaint(int mFillColor) { | ||
progressPaint = new Paint(); | ||
progressPaint.setColor(mFillColor); | ||
progressPaint.setAlpha(125); | ||
progressPaint.setStyle(Paint.Style.FILL); | ||
progressPaint.setAntiAlias(true); | ||
} | ||
|
||
@Override protected void onDraw(Canvas canvas) { | ||
super.onDraw(canvas); | ||
//Log.i("Statsinneer ", getRight() + " "); | ||
canvas.drawRect(getLeft(), 0, getWidth(), getBottom(), progressPaint); | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
|
||
public interface IMVPPresenter<V extends IMVPView> { | ||
void onAttach(V view); | ||
|
||
void onDetach(); | ||
} |
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
9 changes: 0 additions & 9 deletions
9
app/src/main/java/in/arjsna/audiorecorder/playlist/ListItemEventsListener.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.