171
|
174
|
FragmentTransaction ft = fm.beginTransaction();
|
172
|
|
- if(qrFragment==null){
|
|
175
|
+ if (qrFragment == null) {
|
173
|
176
|
qrFragment = new GroupQRFragment();
|
174
|
177
|
Bundle bundle = new Bundle();
|
175
|
|
- bundle.putString("name",groupName);
|
176
|
|
- bundle.putInt("avatar",defaultAvatarId);
|
|
178
|
+ bundle.putString("name", groupName);
|
|
179
|
+ bundle.putInt("avatar", defaultAvatarId);
|
177
|
180
|
qrFragment.setArguments(bundle);
|
178
|
|
- ft.add(R.id.content_fragment,qrFragment);
|
179
|
|
- }else{
|
|
181
|
+ ft.add(R.id.content_fragment, qrFragment);
|
|
182
|
+ } else {
|
180
|
183
|
ft.show(qrFragment);
|
181
|
184
|
}
|
182
|
185
|
ft.commitAllowingStateLoss();
|
183
|
186
|
}
|
184
|
187
|
|
185
|
|
- private void showPhotoFragment(){
|
|
188
|
+ private void showPhotoFragment() {
|
186
|
189
|
FragmentManager fm = getSupportFragmentManager();
|
187
|
190
|
FragmentTransaction ft = fm.beginTransaction();
|
188
|
|
- if(photoFragment==null){
|
|
191
|
+ if (photoFragment == null) {
|
189
|
192
|
photoFragment = new GroupPhotoFragment();
|
190
|
193
|
Bundle bundle = new Bundle();
|
191
|
|
- bundle.putString("groupId",groupId);
|
|
194
|
+ bundle.putString("groupId", groupId);
|
192
|
195
|
photoFragment.setArguments(bundle);
|
193
|
|
- ft.add(R.id.content_fragment,photoFragment);
|
194
|
|
- }else{
|
|
196
|
+ ft.add(R.id.content_fragment, photoFragment);
|
|
197
|
+ } else {
|
195
|
198
|
ft.show(photoFragment);
|
196
|
199
|
}
|
197
|
200
|
ft.commitAllowingStateLoss();
|
198
|
201
|
}
|
|
202
|
+
|
|
203
|
+ private void showMask() {
|
|
204
|
+ cameraBtn.postDelayed(new Runnable() {
|
|
205
|
+ @Override
|
|
206
|
+ public void run() {
|
|
207
|
+ runOnUiThread(new Runnable() {
|
|
208
|
+ @Override
|
|
209
|
+ public void run() {
|
|
210
|
+ int mHeight = getSupportActionBar().getHeight();
|
|
211
|
+ int left = cameraBtn.getLeft();
|
|
212
|
+ int right = cameraBtn.getRight();
|
|
213
|
+ int top = cameraBtn.getTop() + mHeight;
|
|
214
|
+ int bottom = cameraBtn.getBottom() + mHeight;
|
|
215
|
+ int loc[] = {left, top, right, bottom};
|
|
216
|
+ Intent intent = new Intent(GroupActivity.this, TipsActivity.class);
|
|
217
|
+ intent.putExtra("loc", loc);
|
|
218
|
+ startActivity(intent);
|
|
219
|
+ }
|
|
220
|
+ });
|
|
221
|
+ }
|
|
222
|
+ }, 500);
|
|
223
|
+ }
|
199
|
224
|
}
|