-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,495 additions
and
181 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
app/src/main/java/com/zpj/shouji/market/ui/fragment/base/ImmersionOwner.java
This file was deleted.
Oops, something went wrong.
127 changes: 0 additions & 127 deletions
127
app/src/main/java/com/zpj/shouji/market/ui/fragment/base/ImmersionProxy.java
This file was deleted.
Oops, something went wrong.
115 changes: 115 additions & 0 deletions
115
app/src/main/java/com/zpj/shouji/market/ui/fragment/profile/MeFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
package com.zpj.shouji.market.ui.fragment.profile; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
import android.widget.ImageButton; | ||
import android.widget.TextView; | ||
|
||
import com.felix.atoast.library.AToast; | ||
import com.lzy.widget.PullZoomView; | ||
import com.zpj.popupmenuview.popup.EverywherePopup; | ||
import com.zpj.shouji.market.R; | ||
import com.zpj.shouji.market.ui.fragment.base.BaseFragment; | ||
import com.zpj.shouji.market.ui.widget.CircleImageView; | ||
import com.zpj.shouji.market.utils.UserManager; | ||
import com.zpj.utils.ClickHelper; | ||
|
||
public class MeFragment extends BaseFragment { | ||
|
||
private TextView tvName, tvSignature; | ||
private CircleImageView ivAvatar; | ||
|
||
@Override | ||
protected int getLayoutId() { | ||
return R.layout.fragment_me; | ||
} | ||
|
||
@Override | ||
protected void initView(View view, @Nullable Bundle savedInstanceState) { | ||
PullZoomView pullZoomView = view.findViewById(R.id.view_pull_zoom); | ||
pullZoomView.setIsZoomEnable(true); | ||
pullZoomView.setIsParallax(false); | ||
pullZoomView.setSensitive(3f); | ||
pullZoomView.setZoomTime(500); | ||
|
||
tvName = view.findViewById(R.id.tv_name); | ||
tvSignature = view.findViewById(R.id.tv_signature); | ||
ivAvatar = view.findViewById(R.id.iv_avatar); | ||
|
||
ClickHelper.with(ivAvatar) | ||
.setOnLongClickListener((v, x, y) -> { | ||
EverywherePopup.create(context) | ||
.addItem("更换我的头像") | ||
.addItem("下载头像") | ||
.setOnItemClickListener((title, position) -> { | ||
switch (position) { | ||
case 0: | ||
break; | ||
case 1: | ||
break; | ||
} | ||
AToast.normal(title); | ||
}) | ||
.apply() | ||
.showEverywhere(v, x, y); | ||
return true; | ||
}); | ||
|
||
ClickHelper.with(view.findViewById(R.id.iv_wallpaper)) | ||
.setOnLongClickListener((v, x, y) -> { | ||
EverywherePopup.create(context) | ||
.addItem("更换主页背景") | ||
.addItem("下载背景") | ||
.setOnItemClickListener((title, position) -> { | ||
switch (position) { | ||
case 0: | ||
break; | ||
case 1: | ||
break; | ||
} | ||
AToast.normal(title); | ||
}) | ||
.apply() | ||
.showEverywhere(v, x, y); | ||
return true; | ||
// if (UserManager.isLogin()) { | ||
// | ||
// return true; | ||
// } | ||
// return false; | ||
}); | ||
|
||
// if (UserManager.isLogin()) { | ||
// | ||
// } else { | ||
// | ||
// } | ||
} | ||
|
||
@Override | ||
public void onLazyInitView(@Nullable Bundle savedInstanceState) { | ||
super.onLazyInitView(savedInstanceState); | ||
} | ||
|
||
@Override | ||
public void toolbarRightImageButton(@NonNull ImageButton imageButton) { | ||
imageButton.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
EverywherePopup.create(context) | ||
.addItem("分享主页") | ||
.addItem("复制主页链接") | ||
.setOnItemClickListener(new EverywherePopup.OnItemClickListener() { | ||
@Override | ||
public void onItemClicked(String title, int position) { | ||
AToast.normal(title); | ||
} | ||
}) | ||
.apply() | ||
.show(v); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle" | ||
> | ||
|
||
<solid android:color="#80cccccc"/> | ||
<corners android:radius="4dp"/> | ||
|
||
<padding | ||
android:left="16dp" | ||
android:right="16dp" | ||
android:bottom="8dp" | ||
android:top="8dp" | ||
/> | ||
|
||
</shape> |
Oops, something went wrong.