Added custom attr to more files
This commit is contained in:
parent acdb9ce682
commit 1008b8611d
15 changed files with 40 additions and 34 deletions
| @ -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()); | ||||
| |
| @ -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()); | ||||
| ||||
| |
| @ -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"); | ||||
| |
| @ -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"); | ||||
| |
| @ -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 { | ||||
| |
| @ -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 { | ||||
| |
| @ -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) { | ||||
| |
| @ -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" /> | ||||
| ||||
| |
| @ -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,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,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" /> | ||||
| ||||
| |
| @ -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> |
| @ -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> |
| @ -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' | ||||
| ||||
} | ||||
} | ||||
| |
4 gradle/wrapper/gradle-wrapper.properties vendored
4
gradle/wrapper/gradle-wrapper.properties vendored | @ -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…
Add table
Add a link
Reference in a new issue