Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
zfdang committed Jun 18, 2024
1 parent 6dc3ee8 commit 1f1958a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ android {

dependencies {
implementation 'androidx.gridlayout:gridlayout:1.0.0'
final OKHTTP_VERSION = '3.14.9'
final RETROFIT_VERSION = '2.9.0'
final OKHTTP_VERSION = '4.12.0'
final RETROFIT_VERSION = '2.11.0'

// https://developer.android.com/studio/build/multidex
implementation 'androidx.multidex:multidex:2.0.1'
Expand Down Expand Up @@ -131,7 +131,7 @@ dependencies {
// other dependencies
implementation 'pub.devrel:easypermissions:3.0.0'
implementation 'com.github.maksim88:PasswordEditText:0.9'
implementation 'org.jsoup:jsoup:1.16.1'
implementation 'org.jsoup:jsoup:1.17.2'
implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
implementation 'com.jude:swipebackhelper:3.1.2'
implementation 'me.relex:circleindicator:2.1.6'
Expand All @@ -141,9 +141,9 @@ dependencies {
} // do not upgrade, otherwise it will cause issue
implementation 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
implementation 'com.wx.wheelview:wheelview:1.3.4'
implementation 'io.github.scwang90:refresh-layout-kernel:2.0.6' //核心必须依赖
implementation 'io.github.scwang90:refresh-header-classics:2.0.6' //经典刷新头
implementation 'io.github.scwang90:refresh-footer-classics:2.0.6' //经典加载
implementation 'io.github.scwang90:refresh-layout-kernel:2.1.0' //核心必须依赖
implementation 'io.github.scwang90:refresh-header-classics:2.1.0' //经典刷新头
implementation 'io.github.scwang90:refresh-footer-classics:2.1.0' //经典加载

implementation 'com.klinkerapps:link_builder:1.6.1'
implementation 'com.esotericsoftware:kryo:4.0.2'
Expand Down
29 changes: 15 additions & 14 deletions app/src/main/java/com/zfdang/zsmth_android/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.res.ResourcesCompat;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
Expand Down Expand Up @@ -113,32 +114,32 @@ public class MainActivity extends SMTHBaseActivity
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

// how to adjust the height of toolbar
// http://stackoverflow.com/questions/17439683/how-to-change-action-bar-size
// zsmth_actionbar_size @ dimen ==> ThemeOverlay.ActionBar @ styles ==> theme @ app_bar_main.xml

// init floating action button & circular action menu
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
FloatingActionButton fab = findViewById(R.id.fab);
initCircularActionMenu(fab);

mDrawer = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawer = findViewById(R.id.drawer_layout);
mToggle = new ActionBarDrawerToggle(this, mDrawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
mDrawer.addDrawerListener(mToggle);
mToggle.syncState();

mNavigationView = (NavigationView) findViewById(R.id.nav_view);
mNavigationView = findViewById(R.id.nav_view);
mNavigationView.setNavigationItemSelectedListener(this);
mNavigationView.setCheckedItem(R.id.nav_guidance);

// http://stackoverflow.com/questions/33161345/android-support-v23-1-0-update-breaks-navigationview-get-find-header
View headerView = mNavigationView.getHeaderView(0);
mAvatar = (WrapContentDraweeView) headerView.findViewById(R.id.nav_user_avatar);
mAvatar = headerView.findViewById(R.id.nav_user_avatar);
mAvatar.setOnClickListener(this);

mUsername = (TextView) headerView.findViewById(R.id.nav_user_name);
mUsername = headerView.findViewById(R.id.nav_user_name);
mUsername.setOnClickListener(this);

// http://stackoverflow.com/questions/27097126/marquee-title-in-toolbar-actionbar-in-android-with-lollipop-sdk
Expand Down Expand Up @@ -222,9 +223,9 @@ private void initCircularActionMenu(FloatingActionButton fab) {
SubActionButton.Builder itemBuilder = new SubActionButton.Builder(this);

ImageView itemIcon1 = new ImageView(this);
itemIcon1.setImageDrawable(getResources().getDrawable(R.drawable.ic_whatshot_white_48dp));
itemIcon1.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_whatshot_white_48dp, null));
SubActionButton button1 = itemBuilder.setContentView(itemIcon1)
.setBackgroundDrawable(getResources().getDrawable(R.drawable.navigation_button_background))
.setBackgroundDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.navigation_button_background, null))
.build();
button1.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Expand All @@ -235,9 +236,9 @@ private void initCircularActionMenu(FloatingActionButton fab) {
});

ImageView itemIcon2 = new ImageView(this);
itemIcon2.setImageDrawable(getResources().getDrawable(R.drawable.ic_star_white_48dp));
itemIcon2.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_star_white_48dp, null));
SubActionButton button2 = itemBuilder.setContentView(itemIcon2)
.setBackgroundDrawable(getResources().getDrawable(R.drawable.navigation_button_background))
.setBackgroundDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.navigation_button_background, null))
.build();
button2.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Expand All @@ -248,9 +249,9 @@ private void initCircularActionMenu(FloatingActionButton fab) {
});

ImageView itemIcon3 = new ImageView(this);
itemIcon3.setImageDrawable(getResources().getDrawable(R.drawable.ic_format_list_bulleted_white_48dp));
itemIcon3.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_format_list_bulleted_white_48dp, null));
SubActionButton button3 = itemBuilder.setContentView(itemIcon3)
.setBackgroundDrawable(getResources().getDrawable(R.drawable.navigation_button_background))
.setBackgroundDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.navigation_button_background, null))
.build();
button3.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Expand All @@ -261,9 +262,9 @@ private void initCircularActionMenu(FloatingActionButton fab) {
});

ImageView itemIcon4 = new ImageView(this);
itemIcon4.setImageDrawable(getResources().getDrawable(R.drawable.ic_email_white_48dp));
itemIcon4.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_email_white_48dp, null));
SubActionButton button4 = itemBuilder.setContentView(itemIcon4)
.setBackgroundDrawable(getResources().getDrawable(R.drawable.navigation_button_background))
.setBackgroundDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.navigation_button_background, null))
.build();
button4.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Expand Down

0 comments on commit 1f1958a

Please sign in to comment.