Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
fc7fc1f
Added layout item and area in qustom dialog for list
danoz73 Dec 15, 2013
f9bdc58
Testing with setitems
danoz73 Dec 15, 2013
5aae2bf
Add items below custom frame
danoz73 Dec 15, 2013
8249b48
dentex's changes:
dentex Dec 22, 2013
cbae552
hide also message TextView if empty
dentex Dec 22, 2013
35209f5
added divider into items_list; fix for TestDialogActivity FC
dentex Dec 22, 2013
856328a
Merge branch 'master' of github.com:dentex/QustomDialog
dentex Dec 22, 2013
9b9b954
- dismiss on click
dentex Dec 23, 2013
ee8f7e5
refined and fixed layouts
dentex Dec 24, 2013
3be08f1
ip edittext fix
dentex Dec 24, 2013
c59749e
listItem background changes on touch
dentex Dec 25, 2013
e3c5d33
upgraded gradle
Feb 12, 2014
f13995c
added singleChoiceItems with adapter
Feb 12, 2014
0625b6b
example of singleChoiceItems
Feb 12, 2014
9623243
Added list view to dialog layout; improved example
Feb 12, 2014
6f43b67
fix: check item
Feb 13, 2014
9502d3e
Added positive and negative buttons for 4th example, changed title
Feb 15, 2014
36fe180
added implementation for the rest of the setSingleChoiceItems functio…
Feb 15, 2014
4ad8888
Merge pull request #1 from eduardb/master
dentex Feb 16, 2014
ff78321
Go from minSDKVersion 14 to 7
alaneurich May 14, 2014
b3081df
Merge pull request #2 from budsmile/master
dentex May 14, 2014
9b90c16
Fixed the Layout files. Yikes...
alaneurich May 14, 2014
d938a7c
Fixed the Layout files. Yikes... #2
alaneurich May 14, 2014
b3c9921
Removed imports that aren't needed.
alaneurich May 14, 2014
af03d6a
Merge pull request #3 from budsmile/master
dentex May 14, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
6 changes: 3 additions & 3 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
android:minSdkVersion="7"
android:targetSdkVersion="19" />

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Holo"
android:theme="@style/Theme.AppCompat"
android:allowBackup="false">
<activity
android:name="com.qustom.dialog.TestDialogActivity"
Expand Down
27 changes: 0 additions & 27 deletions bin/AndroidManifest.xml

This file was deleted.

Binary file removed bin/TestDialogActivity.apk
Binary file not shown.
Binary file removed bin/classes.dex
Binary file not shown.
Binary file removed bin/classes/com/qustom/dialog/BuildConfig.class
Binary file not shown.
Binary file not shown.
Binary file removed bin/classes/com/qustom/dialog/R$attr.class
Binary file not shown.
Binary file removed bin/classes/com/qustom/dialog/R$dimen.class
Binary file not shown.
Binary file removed bin/classes/com/qustom/dialog/R$drawable.class
Binary file not shown.
Binary file removed bin/classes/com/qustom/dialog/R$id.class
Binary file not shown.
Binary file removed bin/classes/com/qustom/dialog/R$layout.class
Binary file not shown.
Binary file removed bin/classes/com/qustom/dialog/R$string.class
Binary file not shown.
Binary file removed bin/classes/com/qustom/dialog/R$style.class
Binary file not shown.
Binary file removed bin/classes/com/qustom/dialog/R.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions bin/jarlist.cache

This file was deleted.

Binary file removed bin/res/drawable-hdpi/ic_action_search.png
Binary file not shown.
Binary file removed bin/res/drawable-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed bin/res/drawable-ldpi/ic_launcher.png
Binary file not shown.
Binary file removed bin/res/drawable-mdpi/ic_action_search.png
Binary file not shown.
Binary file removed bin/res/drawable-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed bin/res/drawable-xhdpi/ic_action_search.png
Binary file not shown.
Binary file removed bin/res/drawable-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed bin/resources.ap_
Binary file not shown.
12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6+'
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
apply plugin: 'android'

dependencies {
compile 'com.android.support:support-v4:19.1.+'
compile 'com.android.support:appcompat-v7:19.1.+'
}

android {
compileSdkVersion 17
buildToolsVersion "17"
compileSdkVersion 19
buildToolsVersion "19.0.1"

defaultConfig {
minSdkVersion 14
targetSdkVersion 17
minSdkVersion 7
targetSdkVersion 19
}
sourceSets {
main {
Expand Down
6 changes: 0 additions & 6 deletions gen/com/qustom/dialog/BuildConfig.java

This file was deleted.

49 changes: 0 additions & 49 deletions gen/com/qustom/dialog/R.java

This file was deleted.

4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Dec 15 05:23:25 PST 2013
#Thu Feb 13 00:16:26 EET 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
2 changes: 1 addition & 1 deletion project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-17
target=android-19
15 changes: 15 additions & 0 deletions res/layout-v11/qustom_dialog_items_divider.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<View
android:id="@+id/items_divider"
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="?android:attr/listDividerAlertDialog"
/>

</LinearLayout>
40 changes: 35 additions & 5 deletions res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,42 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="@string/main_button_text" />
android:layout_centerHorizontal="true"
android:onClick="button1clicked"
android:text="@string/_1st_button_text"/>

<Button
android:id="@+id/button2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:onClick="button2clicked"
android:text="@string/_2nd_button_text"
android:layout_below="@id/button1"/>

<Button
android:id="@+id/button3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:onClick="button3clicked"
android:text="@string/_3rd_button_text"
android:layout_below="@id/button2"/>

<Button
android:id="@+id/button4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:onClick="button4clicked"
android:text="@string/_4th_button_text"
android:layout_below="@id/button3"/>

</RelativeLayout>
5 changes: 4 additions & 1 deletion res/layout/example_ip_address_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="16dip"
android:text="IP Address" />
android:text="@string/ip_address_text" />

<EditText
android:id="@+id/ip_edit_text"
style="@android:style/Widget.EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:digits="0123456789."
android:hint="@string/ip_address_hint"
android:layout_centerVertical="true"
android:layout_marginLeft="16dip"
android:layout_marginRight="16dip"
Expand Down
18 changes: 18 additions & 0 deletions res/layout/qustom_dialog_item_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" -->
<!-- android:orientation="vertical" -->
<!-- android:layout_width="match_parent" -->
<!-- android:layout_height="match_parent"> -->

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/item_text"
style="?android:attr/textAppearanceMedium"
android:paddingStart="16dp"
android:paddingTop="11dp"
android:paddingBottom="11dp"
android:layout_height="wrap_content"
android:layout_width="wrap_content" >
</TextView>

<!-- </LinearLayout> -->
15 changes: 15 additions & 0 deletions res/layout/qustom_dialog_items_divider.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<View
android:id="@+id/items_divider"
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="@android:drawable/divider_horizontal_bright"
/>

</LinearLayout>
63 changes: 36 additions & 27 deletions res/layout/qustom_dialog_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
** limitations under the License.
*/

I have copied and edited this code from here:
ref:
https://github.com/android/platform_frameworks_base/blob/master/core/res/res/layout/alert_dialog_holo.xml

I should have probably just rewritten similar code, but i was feeling lazy. Maybe I will later.

-->

<LinearLayout
Expand All @@ -45,48 +42,60 @@ I should have probably just rewritten similar code, but i was feeling lazy. Mayb
android:layout_marginStart="16dip"
android:layout_marginEnd="16dip">
<ImageView android:id="@+id/icon"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="8dip"
android:layout_marginLeft="8dip"
android:src="@null"
android:contentDescription="@string/alert_image_content_description"/>
<com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
style="@android:style/TextAppearance.Holo.DialogWindowTitle"
android:singleLine="true"
<TextView android:id="@+id/alertTitle"
style="?android:attr/textAppearanceLarge"
android:textColor="#33b5e5"
android:maxLines="2"
android:ellipsize="end"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dip" />
android:textAlignment="viewStart" />
</LinearLayout>
<View android:id="@+id/titleDivider"
android:layout_width="match_parent"
android:layout_height="2dip"
android:visibility="visible"
android:background="@android:color/holo_blue_light" />
android:background="#33b5e5" />
</LinearLayout>

<LinearLayout android:id="@+id/contentPanel"
<ScrollView android:id="@+id/contentPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView android:id="@+id/message"
style="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dip"
android:paddingEnd="16dip"
android:paddingTop="8dip"
android:layout_marginLeft="16dip"
android:paddingBottom="8dip"
android:textIsSelectable="true"/>
</LinearLayout>
android:layout_height="wrap_content">
<TextView android:id="@+id/message"
style="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dip"
android:paddingEnd="16dip"
android:paddingTop="8dip"
android:paddingBottom="8dip"
/>
</ScrollView>

<FrameLayout android:id="@+id/customPanel"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
android:minHeight="64dp">
</FrameLayout>

</LinearLayout>
<ScrollView
android:layout_height="wrap_content" android:layout_width="match_parent">
<LinearLayout
android:id="@+id/items_list"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical">
</LinearLayout>
</ScrollView>
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/listView"/>
</LinearLayout>
7 changes: 6 additions & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<resources>

<string name="app_name">Custom Dialog Example</string>
<string name="main_button_text">See a hot new custom dialog!</string>
<string name="_1st_button_text">Custom dialog with message, custom View and Items</string>
<string name="_2nd_button_text">Custom dialog with message and items</string>
<string name="_3rd_button_text">Custom dialog with disabled items</string>
<string name="alert_image_content_description">Alert Image</string>
<string name="ip_address_text">IP address</string>
<string name="ip_address_hint">0.0.0.0</string>
<string name="_4th_button_text">Custom dialog with single choice items and adapter</string>

</resources>
Loading