Skip to content

Commit 361f51c

Browse files
author
Yoav Sternberg
committed
Dialog fixes
1 parent 995cb30 commit 361f51c

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

QCircle-Design-Template/res/layout/qcircle_dialog_layout.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
android:layout_marginTop="10dp"
1616
android:layout_centerHorizontal="true"
1717
android:gravity="center"
18+
android:layout_marginLeft="@dimen/msgbox_margin"
19+
android:layout_marginRight="@dimen/msgbox_margin"
1820
android:textSize="16sp"
1921
tools:text="New Quick Circle apps were installed." />
2022

QCircle-Design-Template/src/com/lge/qcircle/template/QCircleDialog.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ public QCircleDialog create() {
9797
* @param activity The activity
9898
* @param activityTemplate The template that the activity uses
9999
*/
100-
public void show(Activity activity, QCircleTemplate activityTemplate) {
100+
public void show(final Activity activity, QCircleTemplate activityTemplate) {
101101
this.activity = activity;
102102
this.activityTemplate = activityTemplate;
103103
RelativeLayout layout = (RelativeLayout) activityTemplate.getLayoutById(TemplateTag.CONTENT).getParent();
104-
QCircleTemplate template = new QCircleTemplate(activity);
104+
final QCircleTemplate template = new QCircleTemplate(activity);
105105
template.setTitle(title == null ? "" : title, Color.WHITE, activity.getResources().getColor(
106106
mode == DialogMode.Error ? R.color.dialog_title_background_color_error : R.color.dialog_title_background_color_regular));
107107
template.setTitleTextSize(17);
@@ -148,7 +148,8 @@ public void onClick(View v) {
148148
@Override
149149
public void onClick(View v) {
150150
if (negativeButtonListener != null) negativeButtonListener.onClick(v);
151-
hide();
151+
template.unregisterReceiver();
152+
activity.finish();
152153
}
153154
});
154155
break;

0 commit comments

Comments
 (0)