Increasing usability and design of files diff. (#413)
Applying sizes. Additional changes. First changes. Merge branch 'master' into diff-cleaner Fixing formatting. Merge branch 'master' into diff-cleaner Final changes for working with custom themes. Merge remote-tracking branch 'remotes/main/master' into diff-cleaner First changes for working with custom themes. Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Adding custom COLOR_FONT. Even smaller cleanups. Merge remote-tracking branch 'remotes/main/master' into diff-cleaner Small cleanups. Fixing bug and adding maximum line limit. Adding option to set cursor to end and small cleanup. First aid. Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Merge branch 'master' into diff-cleaner Few improvements. Performance improvements and cleanups. Minor improvements (code in order) and many bug fixes Bug fix. Combining cited code. Adding code commenting option. Renaming list_files_diffs_new to list_files_diffs Moving ProcessBar into center Increasing performance. Applying size to all icons globally. Removing another unused file. Merge remote-tracking branch 'remotes/main/master' into diff-cleaner Removing unused files. Changing size of 'close'-button. Major changes concerning design and bug fixes. Temporary save point. 2 1 Co-authored-by: opyale <example@example.com> Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/413 Reviewed-by: 6543 <6543@noreply.gitea.io> Reviewed-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
64
app/src/main/java/org/mian/gitnex/helpers/DiffTextView.java
Normal file
64
app/src/main/java/org/mian/gitnex/helpers/DiffTextView.java
Normal file
@@ -0,0 +1,64 @@
|
||||
package org.mian.gitnex.helpers;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
/**
|
||||
* Author opyale
|
||||
*/
|
||||
|
||||
public class DiffTextView extends androidx.appcompat.widget.AppCompatTextView {
|
||||
|
||||
private int initialBackgroundColor;
|
||||
private int currentBackgroundColor;
|
||||
private long position;
|
||||
|
||||
public DiffTextView(Context context) {
|
||||
|
||||
super(context);
|
||||
}
|
||||
|
||||
public DiffTextView(Context context, AttributeSet attrs) {
|
||||
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public DiffTextView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBackgroundColor(int color) {
|
||||
|
||||
currentBackgroundColor = color;
|
||||
super.setBackgroundColor(color);
|
||||
}
|
||||
|
||||
public void setInitialBackgroundColor(int initialBackgroundColor) {
|
||||
|
||||
setBackgroundColor(initialBackgroundColor);
|
||||
this.initialBackgroundColor = initialBackgroundColor;
|
||||
}
|
||||
|
||||
public int getInitialBackgroundColor() {
|
||||
|
||||
return initialBackgroundColor;
|
||||
}
|
||||
|
||||
public int getCurrentBackgroundColor() {
|
||||
|
||||
return currentBackgroundColor;
|
||||
}
|
||||
|
||||
public long getPosition() {
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
public void setPosition(int position) {
|
||||
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user