Skip to content

Commit

Permalink
fixbug:选择照片底部弹窗
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwfqin committed Feb 3, 2018
1 parent 01f18b3 commit 796a3f4
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import android.content.Intent;
import android.os.Build;
import android.support.design.widget.BottomSheetDialogFragment;
import android.support.v4.app.FragmentManager;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
Expand All @@ -10,6 +12,7 @@
import com.sdwfqin.quicklib.module.WebViewActivity;
import com.sdwfqin.quicklib.module.qrbarscan.QrBarScanActivity;
import com.sdwfqin.quicklib.module.seeimage.SeeImageActivity;
import com.sdwfqin.quicklib.view.dialog.BottomDialogPhotoFragment;
import com.sdwfqin.quicklib.view.dialog.HintDialog;
import com.sdwfqin.quickseed.R;
import com.sdwfqin.quickseed.base.Constants;
Expand Down Expand Up @@ -60,7 +63,7 @@ protected void lazyLoad() {

}

@OnClick({R.id.a, R.id.b, R.id.c, R.id.d})
@OnClick({R.id.a, R.id.b, R.id.c, R.id.d, R.id.e})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.a:
Expand Down Expand Up @@ -93,6 +96,29 @@ public void right() {
strings.add("http://img.taopic.com/uploads/allimg/140729/240450-140HZP45790.jpg");
SeeImageActivity.launch(mContext, strings);
break;
case R.id.e:
BottomDialogPhotoFragment.Builder builder = new BottomDialogPhotoFragment.Builder();
BottomSheetDialogFragment bottomSheetDialogFragment = builder.setOnClickListener(new BottomDialogPhotoFragment.OnDialogClickListener() {
@Override
public void xiangce() {

}

@Override
public void paizhao() {

}

@Override
public void exit() {

}
}).builder();
FragmentManager fragmentManager = getFragmentManager();
if (fragmentManager != null) {
bottomSheetDialogFragment.show(fragmentManager, "dialog");
}
break;
}
}

Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,10 @@
android:layout_height="wrap_content"
android:text="图片预览" />

<Button
android:id="@+id/e"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="选择图片弹窗" />

</LinearLayout>
4 changes: 2 additions & 2 deletions quicklib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

version = "1.0.5"
version = "1.0.6"

// gradlew install
// gradlew bintrayUpload
Expand All @@ -13,7 +13,7 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionCode 9
versionCode 10
versionName version

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
15 changes: 0 additions & 15 deletions quicklib/src/main/res/layout/bottom_photo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,11 @@
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="45dp"
android:gravity="center"
android:text="选择图片" />

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray" />

<TextView
android:id="@+id/xiangce"
android:layout_width="match_parent"
android:layout_height="45dp"
android:drawablePadding="15dp"
android:gravity="center"
android:paddingLeft="15dp"
android:text="相册" />

<View
Expand All @@ -45,9 +32,7 @@
android:id="@+id/paizhao"
android:layout_width="match_parent"
android:layout_height="45dp"
android:drawablePadding="15dp"
android:gravity="center"
android:paddingLeft="15dp"
android:text="拍照" />

</LinearLayout>
Expand Down
2 changes: 1 addition & 1 deletion quicklib/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">QLibrary</string>
<string name="app_name">quickLib</string>
</resources>

0 comments on commit 796a3f4

Please sign in to comment.