Browse Source

Added custom attr to more files

tags/2.4.0
M M Arif 3 weeks ago
parent
commit
1008b8611d
15 changed files with 40 additions and 34 deletions
  1. +1
    -1
      app/src/main/java/org/mian/gitnex/activities/BaseActivity.java
  2. +1
    -1
      app/src/main/java/org/mian/gitnex/activities/MainActivity.java
  3. +7
    -4
      app/src/main/java/org/mian/gitnex/activities/RepoStargazersActivity.java
  4. +7
    -4
      app/src/main/java/org/mian/gitnex/activities/RepoWatchersActivity.java
  5. +2
    -2
      app/src/main/java/org/mian/gitnex/adapters/RepoStargazersAdapter.java
  6. +2
    -2
      app/src/main/java/org/mian/gitnex/adapters/RepoWatchersAdapter.java
  7. +1
    -1
      app/src/main/java/org/mian/gitnex/fragments/SettingsFragment.java
  8. +4
    -4
      app/src/main/res/layout/activity_repo_stargazers.xml
  9. +4
    -4
      app/src/main/res/layout/activity_repo_watchers.xml
  10. +2
    -2
      app/src/main/res/layout/collaborators_list.xml
  11. +2
    -2
      app/src/main/res/layout/fragment_collaborators.xml
  12. +2
    -2
      app/src/main/res/layout/repo_stargazers_list.xml
  13. +2
    -2
      app/src/main/res/layout/repo_watchers_list.xml
  14. +1
    -1
      build.gradle
  15. +2
    -2
      gradle/wrapper/gradle-wrapper.properties

+ 1
- 1
app/src/main/java/org/mian/gitnex/activities/BaseActivity.java View File

@@ -15,7 +15,7 @@ public abstract class BaseActivity extends AppCompatActivity {
@Override
public void onCreate(Bundle savedInstanceState) {

setTheme(R.style.AppTheme);
setTheme(R.style.AppThemeLight);

super.onCreate(savedInstanceState);
setContentView(getLayoutResourceId());


+ 1
- 1
app/src/main/java/org/mian/gitnex/activities/MainActivity.java View File

@@ -410,7 +410,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
}

@Override
public void onFailure(@NonNull Call<GiteaVersion> callVersion, Throwable t) {
public void onFailure(@NonNull Call<GiteaVersion> callVersion, @NonNull Throwable t) {

Log.e("onFailure-version", t.toString());



+ 7
- 4
app/src/main/java/org/mian/gitnex/activities/RepoStargazersActivity.java View File

@@ -2,7 +2,6 @@ package org.mian.gitnex.activities;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import android.view.View;
@@ -22,7 +21,7 @@ import java.util.List;
* Author M M Arif
*/

public class RepoStargazersActivity extends AppCompatActivity {
public class RepoStargazersActivity extends BaseActivity {

private TextView noDataStargazers;
private View.OnClickListener onClickListener;
@@ -31,9 +30,13 @@ public class RepoStargazersActivity extends AppCompatActivity {
private ProgressBar mProgressBar;

@Override
protected void onCreate(Bundle savedInstanceState) {
protected int getLayoutResourceId(){
return R.layout.activity_repo_stargazers;
}

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_repo_stargazers);

TinyDB tinyDb = new TinyDB(getApplicationContext());
final String instanceUrl = tinyDb.getString("instanceUrl");


+ 7
- 4
app/src/main/java/org/mian/gitnex/activities/RepoWatchersActivity.java View File

@@ -2,7 +2,6 @@ package org.mian.gitnex.activities;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import android.view.View;
@@ -22,7 +21,7 @@ import java.util.List;
* Author M M Arif
*/

public class RepoWatchersActivity extends AppCompatActivity {
public class RepoWatchersActivity extends BaseActivity {

private TextView noDataWatchers;
private View.OnClickListener onClickListener;
@@ -31,9 +30,13 @@ public class RepoWatchersActivity extends AppCompatActivity {
private ProgressBar mProgressBar;

@Override
protected void onCreate(Bundle savedInstanceState) {
protected int getLayoutResourceId(){
return R.layout.activity_repo_watchers;
}

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_repo_watchers);

TinyDB tinyDb = new TinyDB(getApplicationContext());
final String instanceUrl = tinyDb.getString("instanceUrl");


+ 2
- 2
app/src/main/java/org/mian/gitnex/adapters/RepoStargazersAdapter.java View File

@@ -25,7 +25,7 @@ public class RepoStargazersAdapter extends BaseAdapter {
private List<UserInfo> stargazersList;
private Context mCtx;

private class ViewHolder {
private static class ViewHolder {

private ImageView memberAvatar;
private TextView memberName;
@@ -64,7 +64,7 @@ public class RepoStargazersAdapter extends BaseAdapter {

if (finalView == null) {
finalView = LayoutInflater.from(mCtx).inflate(R.layout.repo_stargazers_list, null);
viewHolder = new RepoStargazersAdapter.ViewHolder(finalView);
viewHolder = new ViewHolder(finalView);
finalView.setTag(viewHolder);
}
else {


+ 2
- 2
app/src/main/java/org/mian/gitnex/adapters/RepoWatchersAdapter.java View File

@@ -25,7 +25,7 @@ public class RepoWatchersAdapter extends BaseAdapter {
private List<UserInfo> watchersList;
private Context mCtx;

private class ViewHolder {
private static class ViewHolder {

private ImageView memberAvatar;
private TextView memberName;
@@ -64,7 +64,7 @@ public class RepoWatchersAdapter extends BaseAdapter {

if (finalView == null) {
finalView = LayoutInflater.from(mCtx).inflate(R.layout.repo_watchers_list, null);
viewHolder = new RepoWatchersAdapter.ViewHolder(finalView);
viewHolder = new ViewHolder(finalView);
finalView.setTag(viewHolder);
}
else {


+ 1
- 1
app/src/main/java/org/mian/gitnex/fragments/SettingsFragment.java View File

@@ -140,7 +140,7 @@ public class SettingsFragment extends Fragment {
@Override
public void onClick(View view) {

AlertDialog.Builder cfBuilder = new AlertDialog.Builder(ctx, R.style.AppThemeLightConfirmDialog);
AlertDialog.Builder cfBuilder = new AlertDialog.Builder(ctx);

cfBuilder.setTitle(R.string.settingsCustomFontSelectorDialogTitle);
if(customFontSelectedChoice != -1) {


+ 4
- 4
app/src/main/res/layout/activity_repo_stargazers.xml View File

@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:background="?attr/primaryBackgroundColor"
android:orientation="vertical">

<com.google.android.material.appbar.AppBarLayout
@@ -14,7 +14,7 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:background="?attr/primaryBackgroundColor"
tools:ignore="UnusedAttribute">

<ImageView
@@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textColor="@color/white"
android:textColor="?attr/primaryTextColor"
android:maxLines="1"
android:textSize="20sp" />

@@ -58,7 +58,7 @@
android:layout_margin="15dp"
android:gravity="center"
android:text="@string/noDataFound"
android:textColor="@color/white"
android:textColor="?attr/primaryTextColor"
android:textSize="20sp"
android:visibility="gone" />



+ 4
- 4
app/src/main/res/layout/activity_repo_watchers.xml View File

@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:background="?attr/primaryBackgroundColor"
android:orientation="vertical">

<com.google.android.material.appbar.AppBarLayout
@@ -14,7 +14,7 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:background="?attr/primaryBackgroundColor"
tools:ignore="UnusedAttribute">

<ImageView
@@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textColor="@color/white"
android:textColor="?attr/primaryTextColor"
android:maxLines="1"
android:textSize="20sp" />

@@ -58,7 +58,7 @@
android:layout_margin="15dp"
android:gravity="center"
android:text="@string/noDataFound"
android:textColor="@color/white"
android:textColor="?attr/primaryTextColor"
android:textSize="20sp"
android:visibility="gone" />



+ 2
- 2
app/src/main/res/layout/collaborators_list.xml View File

@@ -4,7 +4,7 @@
android:id="@+id/gridViewData"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:background="?attr/primaryBackgroundColor"
android:orientation="vertical">

<ImageView
@@ -22,6 +22,6 @@
android:layout_marginTop="1dp"
android:text="@string/tab_text_collaborators"
android:textSize="14sp"
android:textColor="@color/white" />
android:textColor="?attr/primaryTextColor" />

</LinearLayout>

+ 2
- 2
app/src/main/res/layout/fragment_collaborators.xml View File

@@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:background="?attr/primaryBackgroundColor"
android:orientation="vertical">

<GridView
@@ -23,7 +23,7 @@
android:layout_margin="15dp"
android:gravity="center"
android:text="@string/noDataCollaboratorTab"
android:textColor="@color/white"
android:textColor="?attr/primaryTextColor"
android:textSize="20sp"
android:visibility="gone" />



+ 2
- 2
app/src/main/res/layout/repo_stargazers_list.xml View File

@@ -4,7 +4,7 @@
android:id="@+id/gridViewData"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:background="?attr/primaryBackgroundColor"
android:orientation="vertical">

<ImageView
@@ -22,6 +22,6 @@
android:layout_marginTop="1dp"
android:text="@string/starMember"
android:textSize="14sp"
android:textColor="@color/white" />
android:textColor="?attr/primaryTextColor" />

</LinearLayout>

+ 2
- 2
app/src/main/res/layout/repo_watchers_list.xml View File

@@ -4,7 +4,7 @@
android:id="@+id/gridViewData"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:background="?attr/primaryBackgroundColor"
android:orientation="vertical">

<ImageView
@@ -22,6 +22,6 @@
android:layout_marginTop="1dp"
android:text="@string/watcherMember"
android:textSize="14sp"
android:textColor="@color/white" />
android:textColor="?attr/primaryTextColor" />

</LinearLayout>

+ 1
- 1
build.gradle View File

@@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:3.6.1'

}
}


+ 2
- 2
gradle/wrapper/gradle-wrapper.properties View File

@@ -1,6 +1,6 @@
#Thu Sep 12 16:12:36 SGT 2019
#Wed Mar 04 00:16:50 SGT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

Loading…
Cancel
Save