mirror of https://codeberg.org/gitnex/GitNex.git
Merge branch 'master' into new-font-testing
This commit is contained in:
commit
4867524b4f
|
@ -10,7 +10,9 @@ import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
@ -80,13 +82,19 @@ public class RepoDetailActivity extends AppCompatActivity implements RepoBottomS
|
||||||
|
|
||||||
if(tinyDb.getBoolean("enableCounterIssueBadge")) {
|
if(tinyDb.getBoolean("enableCounterIssueBadge")) {
|
||||||
|
|
||||||
View tabHeader = LayoutInflater.from(this).inflate(R.layout.badge, null);
|
@SuppressLint("InflateParams") View tabHeader = LayoutInflater.from(this).inflate(R.layout.badge, null);
|
||||||
textViewBadge = tabHeader.findViewById(R.id.counterBadge);
|
textViewBadge = tabHeader.findViewById(R.id.counterBadge);
|
||||||
if(!tinyDb.getString("issuesCounter").isEmpty()) {
|
if(!tinyDb.getString("issuesCounter").isEmpty()) {
|
||||||
getRepoInfo(instanceUrl, Authorization.returnAuthentication(getApplicationContext(), loginUid, instanceToken), repoOwner, repoName1);
|
getRepoInfo(instanceUrl, Authorization.returnAuthentication(getApplicationContext(), loginUid, instanceToken), repoOwner, repoName1);
|
||||||
}
|
}
|
||||||
Objects.requireNonNull(tabLayout.getTabAt(1)).setCustomView(tabHeader);
|
Objects.requireNonNull(tabLayout.getTabAt(1)).setCustomView(tabHeader);
|
||||||
|
|
||||||
|
TabLayout.Tab tabOpenIssues = tabLayout.getTabAt(1);
|
||||||
|
ColorStateList textColor = tabLayout.getTabTextColors();
|
||||||
|
assert tabOpenIssues != null;
|
||||||
|
TextView openIssueTabView = Objects.requireNonNull(tabOpenIssues.getCustomView()).findViewById(R.id.counterBadgeText);
|
||||||
|
openIssueTabView.setTextColor(textColor);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:textAllCaps="true"
|
app:textAllCaps="true"
|
||||||
android:text="@string/tab_text_issues"
|
android:text="@string/tab_text_issues"
|
||||||
android:textColor="@color/white" />
|
android:textColor="@color/lightGray" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/counterBadge"
|
android:id="@+id/counterBadge"
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="0dp"
|
android:paddingEnd="0dp"
|
||||||
android:textColor="@color/white"/>
|
android:textColor="@color/lightGray"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/repoMetaDataExpandCollapse"
|
android:id="@+id/repoMetaDataExpandCollapse"
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
android:paddingEnd="0dp"
|
android:paddingEnd="0dp"
|
||||||
android:autoLink="web"
|
android:autoLink="web"
|
||||||
android:textColorLink="@color/lightBlue"
|
android:textColorLink="@color/lightBlue"
|
||||||
android:textColor="@color/white"/>
|
android:textColor="@color/lightGray"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/repoFilenameExpandCollapse"
|
android:id="@+id/repoFilenameExpandCollapse"
|
||||||
|
|
|
@ -23,5 +23,6 @@
|
||||||
<color name="colorDarkGreen">#009486</color>
|
<color name="colorDarkGreen">#009486</color>
|
||||||
<color name="darkRed">#e74c3c</color>
|
<color name="darkRed">#e74c3c</color>
|
||||||
<color name="lightBlue">#3faef7</color>
|
<color name="lightBlue">#3faef7</color>
|
||||||
|
<color name="lightGray">#b6bbbf</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue