Skip to content

Commit 29e6bd7

Browse files
committed
Widget added
New widget added
1 parent 3c1dc53 commit 29e6bd7

19 files changed

+512
-81
lines changed

app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ android {
1818
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1919
}
2020
}
21+
compileOptions {
22+
sourceCompatibility 1.8
23+
targetCompatibility 1.8
24+
}
2125
}
2226

2327
dependencies {

app/src/main/java/com/bvtech/widgettest/ActivityEnhanced.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
import android.widget.EditText;
1717
import android.widget.TextView;
1818

19-
import com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout;
20-
import com.bvtech.toolslibrary.Layouts.ExtendFrameLayout;
21-
import com.bvtech.toolslibrary.Locale.LocaleManager;
22-
import com.bvtech.toolslibrary.Utility.Utilities;
19+
import com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout;
20+
import com.bvtech.toolslibrary.locale.LocaleManager;
21+
import com.bvtech.toolslibrary.utility.Utilities;
2322

2423
import java.lang.reflect.Field;
2524

app/src/main/java/com/bvtech/widgettest/ActivityExtendedLayouts.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package com.bvtech.widgettest;
22

3-
import android.content.Intent;
43
import android.os.Bundle;
54
import android.view.View;
65
import android.widget.CompoundButton;
76
import android.widget.TextView;
8-
import android.widget.Toast;
97

10-
import com.bvtech.toolslibrary.FloatViews.FloatLinearLayout;
11-
import com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout;
8+
import com.bvtech.toolslibrary.views.FloatLinearLayout;
9+
import com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout;
1210
import com.google.android.material.snackbar.Snackbar;
1311

1412
import androidx.appcompat.widget.SwitchCompat;

app/src/main/java/com/bvtech/widgettest/ActivityExtendedSpinner.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
package com.bvtech.widgettest;
22

33
import android.content.Intent;
4-
import android.graphics.Typeface;
54
import android.os.Bundle;
65
import android.view.Gravity;
76
import android.view.View;
87
import android.widget.AdapterView;
9-
import android.widget.Toast;
108

11-
import com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout;
12-
import com.bvtech.toolslibrary.Locale.LocaleManager;
13-
import com.bvtech.toolslibrary.Widget.ExtendSpinner;
14-
import com.bvtech.toolslibrary.Widget.ExtendToast;
9+
import com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout;
10+
import com.bvtech.toolslibrary.locale.LocaleManager;
11+
import com.bvtech.toolslibrary.widget.ExtendSpinner;
12+
import com.bvtech.toolslibrary.widget.ExtendToast;
1513
import com.google.android.material.snackbar.Snackbar;
1614

1715
public class ActivityExtendedSpinner extends ActivityEnhanced{

app/src/main/java/com/bvtech/widgettest/ActivityFloatLayouts.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.bvtech.widgettest;
22

3-
import android.content.Intent;
43
import android.os.Bundle;
54

6-
import com.bvtech.toolslibrary.FloatViews.FloatLinearLayout;
5+
import com.bvtech.toolslibrary.views.FloatLinearLayout;
76

87
import androidx.recyclerview.widget.DefaultItemAnimator;
98
import androidx.recyclerview.widget.DividerItemDecoration;

app/src/main/java/com/bvtech/widgettest/ActivityMain.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
import android.graphics.drawable.Animatable;
55
import android.graphics.drawable.Drawable;
66
import android.os.Bundle;
7+
import android.os.Handler;
78
import android.view.Menu;
89
import android.view.MenuItem;
910
import android.view.View;
1011
import android.view.inputmethod.InputMethodManager;
1112

12-
import com.bvtech.toolslibrary.Utility.Utilities;
13-
import com.bvtech.toolslibrary.Widget.ExtendEditText;
13+
import com.bvtech.toolslibrary.utility.Utilities;
14+
import com.bvtech.toolslibrary.widget.CircularProgressBar;
15+
import com.bvtech.toolslibrary.widget.ExtendEditText;
1416

1517
import androidx.appcompat.widget.AppCompatImageView;
1618

@@ -64,6 +66,17 @@ public void onTextChanged(View view, String str) {
6466
int z = 2;
6567
}
6668
});
69+
70+
CircularProgressBar circularProgressBar = findViewById(R.id.circularProgressBar);
71+
// Set Progress
72+
//circularProgressBar.setProgress(65f);
73+
// or with animation
74+
new Handler().postDelayed(new Runnable() {
75+
@Override
76+
public void run() {
77+
circularProgressBar.setProgressWithAnimation(65f, (long) 1000); // =1s
78+
}
79+
}, 2000);
6780
}
6881

6982
@Override

app/src/main/java/com/bvtech/widgettest/G.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import android.content.res.Configuration;
55
import android.util.Log;
66

7-
import com.bvtech.toolslibrary.Locale.LocaleManager;
7+
import com.bvtech.toolslibrary.locale.LocaleManager;
88

99
public class G extends Application {
1010

app/src/main/java/com/bvtech/widgettest/RecyclerViewAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import android.widget.ImageView;
88
import android.widget.TextView;
99

10-
import com.bvtech.toolslibrary.Utility.Utilities;
10+
import com.bvtech.toolslibrary.utility.Utilities;
1111

1212
import androidx.recyclerview.widget.RecyclerView;
1313

app/src/main/res/layout/activity_extended_layouts.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout
2+
<com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:app="http://schemas.android.com/apk/res-auto"
55
xmlns:tools="http://schemas.android.com/tools"
@@ -9,7 +9,7 @@
99
android:layoutDirection="ltr"
1010
tools:ignore="RtlHardcoded">
1111

12-
<com.bvtech.toolslibrary.FloatViews.FloatLinearLayout
12+
<com.bvtech.toolslibrary.views.FloatLinearLayout
1313
android:id="@+id/laySwitch"
1414
android:layout_width="match_parent"
1515
android:layout_height="wrap_content"
@@ -23,9 +23,9 @@
2323
android:text="Off"
2424
/>
2525

26-
</com.bvtech.toolslibrary.FloatViews.FloatLinearLayout>
26+
</com.bvtech.toolslibrary.views.FloatLinearLayout>
2727

28-
<com.bvtech.toolslibrary.Layouts.ExtendFrameLayout
28+
<com.bvtech.toolslibrary.layouts.ExtendFrameLayout
2929
android:layout_width="match_parent"
3030
android:layout_height="wrap_content"
3131
android:layout_gravity="bottom"
@@ -40,23 +40,23 @@
4040
android:clickable="true"
4141
app:srcCompat="@drawable/ic_launcher_foreground"/>
4242

43-
<com.bvtech.toolslibrary.Widget.ExtendTextView
43+
<com.bvtech.toolslibrary.widget.ExtendTextView
4444
android:id="@+id/txtTouch"
4545
android:layout_width="wrap_content"
4646
android:layout_height="wrap_content"
4747
android:layout_gravity="center"
4848
app:tl_ltrTypeFace="font_en"
4949
app:tl_rtlTypeFace="traffic"/>
5050

51-
</com.bvtech.toolslibrary.Layouts.ExtendFrameLayout>
51+
</com.bvtech.toolslibrary.layouts.ExtendFrameLayout>
5252

53-
<com.bvtech.toolslibrary.Layouts.ExtendLinearLayout
53+
<com.bvtech.toolslibrary.layouts.ExtendLinearLayout
5454
android:layout_width="wrap_content"
5555
android:layout_height="wrap_content"
5656
android:layout_gravity="bottom"
5757
android:orientation="vertical">
5858

59-
<com.bvtech.toolslibrary.Widget.ExtendTextView
59+
<com.bvtech.toolslibrary.widget.ExtendTextView
6060
android:layout_width="wrap_content"
6161
android:layout_height="wrap_content"
6262
android:layout_marginBottom="12dp"
@@ -90,6 +90,6 @@
9090
app:srcCompat="@drawable/ic_launcher_foreground"/>
9191

9292

93-
</com.bvtech.toolslibrary.Layouts.ExtendLinearLayout>
93+
</com.bvtech.toolslibrary.layouts.ExtendLinearLayout>
9494

95-
</com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout>
95+
</com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout>

app/src/main/res/layout/activity_extended_spinner.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout
2+
<com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:app="http://schemas.android.com/apk/res-auto"
55
xmlns:tools="http://schemas.android.com/tools"
@@ -16,7 +16,7 @@
1616
android:layout_height="match_parent"
1717
android:orientation="vertical">
1818

19-
<com.bvtech.toolslibrary.Widget.ExtendSpinner
19+
<com.bvtech.toolslibrary.widget.ExtendSpinner
2020
android:layout_width="wrap_content"
2121
android:layout_height="wrap_content"
2222
android:layout_gravity="center_horizontal"
@@ -25,7 +25,7 @@
2525
app:tl_entries="@array/test_str"
2626
app:tl_textColor="@color/colorAccent" />
2727

28-
<com.bvtech.toolslibrary.Widget.ExtendSpinner
28+
<com.bvtech.toolslibrary.widget.ExtendSpinner
2929
android:layout_width="wrap_content"
3030
android:layout_height="wrap_content"
3131
android:layout_gravity="center"
@@ -34,7 +34,7 @@
3434
app:tl_shapeType="rectangle"
3535
app:tl_textColor="@color/colorAccent" />
3636

37-
<com.bvtech.toolslibrary.Widget.ExtendSpinner
37+
<com.bvtech.toolslibrary.widget.ExtendSpinner
3838
android:layout_width="wrap_content"
3939
android:layout_height="wrap_content"
4040
android:layout_gravity="center"
@@ -46,7 +46,7 @@
4646
app:tl_strokeSize="2dp"
4747
app:tl_textColor="@color/colorAccent" />
4848

49-
<com.bvtech.toolslibrary.Widget.ExtendSpinner
49+
<com.bvtech.toolslibrary.widget.ExtendSpinner
5050
android:id="@+id/extendSpinner3"
5151
android:layout_width="wrap_content"
5252
android:layout_height="wrap_content"
@@ -61,7 +61,7 @@
6161
app:tl_strokeSize="2dp"
6262
app:tl_textColor="@color/colorAccent" />
6363

64-
<com.bvtech.toolslibrary.Widget.ExtendSpinner
64+
<com.bvtech.toolslibrary.widget.ExtendSpinner
6565
android:layout_width="wrap_content"
6666
android:layout_height="wrap_content"
6767
android:layout_gravity="center"
@@ -77,7 +77,7 @@
7777
app:tl_strokeSize="2dp"
7878
app:tl_textColor="@color/colorAccent" />
7979

80-
<com.bvtech.toolslibrary.Widget.ExtendSpinner
80+
<com.bvtech.toolslibrary.widget.ExtendSpinner
8181
android:id="@+id/extendSpinner2"
8282
android:layout_width="164dp"
8383
android:layout_height="wrap_content"
@@ -95,7 +95,7 @@
9595
app:tl_strokeSize="2dp"
9696
app:tl_textColor="@color/colorAccent" />
9797

98-
<com.bvtech.toolslibrary.Widget.ExtendSpinner
98+
<com.bvtech.toolslibrary.widget.ExtendSpinner
9999
android:id="@+id/extendSpinner"
100100
android:layout_width="wrap_content"
101101
android:layout_height="wrap_content"
@@ -115,4 +115,4 @@
115115

116116
</LinearLayout>
117117

118-
</com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout>
118+
</com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout>

app/src/main/res/layout/activity_extended_text.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout
2+
<com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:app="http://schemas.android.com/apk/res-auto"
55
xmlns:tools="http://schemas.android.com/tools"
@@ -11,20 +11,20 @@
1111
android:orientation="vertical"
1212
tools:context=".ActivityMain">
1313

14-
<com.bvtech.toolslibrary.Layouts.ExtendLinearLayout
14+
<com.bvtech.toolslibrary.layouts.ExtendLinearLayout
1515
android:layout_width="match_parent"
1616
android:layout_height="match_parent"
1717
android:gravity="center"
1818
android:orientation="vertical">
1919

20-
<com.bvtech.toolslibrary.Widget.ExtendTextView
20+
<com.bvtech.toolslibrary.widget.ExtendTextView
2121
android:layout_width="wrap_content"
2222
android:layout_height="wrap_content"
2323
android:layout_marginBottom="12dp"
2424
android:text="@string/app_hello"
2525
android:textSize="22sp"/>
2626

27-
<com.bvtech.toolslibrary.Widget.ExtendTextView
27+
<com.bvtech.toolslibrary.widget.ExtendTextView
2828
android:layout_width="wrap_content"
2929
android:layout_height="wrap_content"
3030
android:layout_marginBottom="12dp"
@@ -38,7 +38,7 @@
3838
app:tl_shapeType="rectangle"
3939
app:tl_strokeSize="2dp"/>
4040

41-
<com.bvtech.toolslibrary.Widget.ExtendTextView
41+
<com.bvtech.toolslibrary.widget.ExtendTextView
4242
android:layout_width="wrap_content"
4343
android:layout_height="wrap_content"
4444
android:layout_marginBottom="12dp"
@@ -47,14 +47,14 @@
4747
app:tl_ltrTypeFace="fonts/aFont/times.ttf"
4848
app:tl_rtlTypeFace="fonts/aFont/zar.ttf"/>
4949

50-
<com.bvtech.toolslibrary.Widget.ExtendTextView
50+
<com.bvtech.toolslibrary.widget.ExtendTextView
5151
android:layout_width="wrap_content"
5252
android:layout_height="wrap_content"
5353
android:text="@string/app_hello"
5454
android:textSize="22sp"
5555
app:tl_fontType="@font/font"/>
5656

57-
<com.bvtech.toolslibrary.Widget.ExtendEditText
57+
<com.bvtech.toolslibrary.widget.ExtendEditText
5858
android:layout_width="match_parent"
5959
android:layout_height="wrap_content"
6060
android:layout_marginBottom="12dp"
@@ -68,6 +68,6 @@
6868
app:tl_shapeType="rectangle"
6969
app:tl_strokeSize="2dp"/>
7070

71-
</com.bvtech.toolslibrary.Layouts.ExtendLinearLayout>
71+
</com.bvtech.toolslibrary.layouts.ExtendLinearLayout>
7272

73-
</com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout>
73+
</com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout>

app/src/main/res/layout/activity_float_layouts.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout
2+
<com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
@@ -14,7 +14,7 @@
1414
android:clipToPadding="false"
1515
android:paddingTop="48dp"/>
1616

17-
<com.bvtech.toolslibrary.FloatViews.FloatLinearLayout
17+
<com.bvtech.toolslibrary.views.FloatLinearLayout
1818
android:id="@+id/laySwitch"
1919
android:layout_width="match_parent"
2020
android:layout_height="48dp"
@@ -28,9 +28,9 @@
2828
android:text="Off"
2929
/>
3030

31-
</com.bvtech.toolslibrary.FloatViews.FloatLinearLayout>
31+
</com.bvtech.toolslibrary.views.FloatLinearLayout>
3232

33-
<com.bvtech.toolslibrary.FloatViews.FloatLinearLayout
33+
<com.bvtech.toolslibrary.views.FloatLinearLayout
3434
android:id="@+id/laySwitch2"
3535
android:layout_width="match_parent"
3636
android:layout_height="48dp"
@@ -45,6 +45,6 @@
4545
android:text="Off"
4646
/>
4747

48-
</com.bvtech.toolslibrary.FloatViews.FloatLinearLayout>
48+
</com.bvtech.toolslibrary.views.FloatLinearLayout>
4949

50-
</com.bvtech.toolslibrary.Layouts.ExtendCoordinatorLayout>
50+
</com.bvtech.toolslibrary.layouts.ExtendCoordinatorLayout>

0 commit comments

Comments
 (0)