Skip to content

Commit

Permalink
some design changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Celestial04 committed Aug 1, 2024
1 parent 4936f78 commit b740346
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 172 deletions.
9 changes: 5 additions & 4 deletions app/src/main/java/com/bouillie/web/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@

public class MainActivity extends AppCompatActivity {


private HorizontalScrollView scroll;
private AlertDialog alert2;
private int selectedTheme;
Expand All @@ -69,6 +70,7 @@ private String formatDuration(long seconds) {




@SuppressLint("SetJavaScriptEnabled")
@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -89,10 +91,7 @@ protected void onCreate(Bundle savedInstanceState) {
DynamicColors.applyToActivitiesIfAvailable(this.getApplication());
DynamicColors.applyToActivitiesIfAvailable(getApplication());
setContentView(R.layout.activity_main);
Button topButton = findViewById(R.id.topButton);
Button bottomButton = findViewById(R.id.bottomButton);
Button leftButton = findViewById(R.id.leftButton);
Button rightButton = findViewById(R.id.rightButton);

LinearLayout linearLayout2 = findViewById(R.id.scrollvv);
WebView webView = findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
Expand Down Expand Up @@ -605,6 +604,8 @@ public void onBackPressed() {
}
}



public void setAlert2(AlertDialog alert2) {
this.alert2 = alert2;
}
Expand Down
320 changes: 152 additions & 168 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,189 +7,173 @@
android:fitsSystemWindows="false"
tools:context=".MainActivity">

<LinearLayout
android:id="@+id/scrollvv"
<FrameLayout
style="@style/Theme.Material3.DynamicColors.DayNight"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp">
android:layout_height="match_parent">

<LinearLayout
android:id="@+id/scrollvv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#4D000000"
android:backgroundTint="#34000000"
android:orientation="horizontal"
tools:visibility="visible">

<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
android:contentDescription="@string/forward_button"
app:icon="@drawable/baseline_arrow_circle_right_24"
app:iconGravity="textEnd"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:id="@+id/button8"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
android:contentDescription="@string/refresh_button"
app:icon="@drawable/baseline_refresh_24"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<ImageView
android:id="@+id/SecureImage"
android:layout_width="35dp"
android:layout_height="35dp"
app:srcCompat="@android:drawable/ic_menu_info_details" />

<EditText
android:id="@+id/UrlContent"
android:layout_width="match_parent"
android:layout_height="35dp"
android:fontFamily="sans-serif-black"
android:hapticFeedbackEnabled="true"
android:hint="https://..."
android:imeOptions="actionGo"
android:inputType="textUri"
android:minHeight="48dp"
android:singleLine="true"
android:textSize="14sp" />
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp">

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:visibility="visible">

<ImageView
android:id="@+id/SecureImage"
android:layout_width="35dp"
android:layout_height="35dp"
app:srcCompat="@android:drawable/ic_menu_info_details" />

<EditText
android:id="@+id/UrlContent"
android:layout_width="match_parent"
android:layout_height="35dp"
android:fontFamily="sans-serif-black"
android:hapticFeedbackEnabled="true"
android:hint="https://..."
android:imeOptions="actionGo"
android:inputType="textUri"
android:minHeight="48dp"
android:singleLine="true"
android:textSize="14sp" />

<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="95" >
</LinearLayout>

</WebView>
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="95">

<ScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="7">
</WebView>

<LinearLayout
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical">
android:layout_weight="7">

<HorizontalScrollView
android:id="@+id/scroll"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="0dp"
android:layout_weight="4"
android:background="#00000000"
android:fadeScrollbars="true"
android:fitsSystemWindows="true">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="bottom|end"
android:orientation="horizontal">

<Button
android:id="@+id/button6"
android:orientation="vertical">

<HorizontalScrollView
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="0dp"
android:layout_weight="4"
android:background="#00000000"
android:fadeScrollbars="true"
android:fitsSystemWindows="true">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
app:icon="@drawable/baseline_bookmarks_24"
app:iconGravity="textEnd"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
android:contentDescription="@string/favorite_button_add"
app:icon="@drawable/baseline_bookmark_add_24"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:id="@+id/button7"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
android:contentDescription="@string/delete_fav_button"
app:icon="@drawable/baseline_bookmark_remove_24"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:id="@+id/soundButton"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
android:contentDescription="@string/changer_la_couleur"
app:icon="@drawable/baseline_palette_24"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:contentDescription="@string/delete_data_button"
android:onClick='onDeleteDataClick'
app:icon="@drawable/baseline_delete_forever_24"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
</ScrollView>

<Button
android:id="@+id/topButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Top"
android:visibility="gone" />

<Button
android:id="@+id/bottomButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bottom"
android:visibility="gone" />

<Button
android:id="@+id/leftButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Left"
android:visibility="gone" />

<Button
android:id="@+id/rightButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Right"
android:visibility="gone" />

<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progressTint="@android:color/holo_red_dark" />
android:layout_height="match_parent"
android:layout_gravity="bottom|end"
android:orientation="horizontal">

<Button
android:id="@+id/changeUrlButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Button" />

<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
android:contentDescription="@string/forward_button"
app:icon="@drawable/baseline_arrow_circle_right_24"
app:iconGravity="textEnd"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:id="@+id/button8"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
android:contentDescription="@string/refresh_button"
app:icon="@drawable/baseline_refresh_24"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
app:icon="@drawable/baseline_bookmarks_24"
app:iconGravity="textEnd"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
android:contentDescription="@string/favorite_button_add"
app:icon="@drawable/baseline_bookmark_add_24"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:id="@+id/button7"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
android:contentDescription="@string/delete_fav_button"
app:icon="@drawable/baseline_bookmark_remove_24"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:id="@+id/soundButton"
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:layout_marginEnd="10dp"
android:contentDescription="@string/changer_la_couleur"
app:icon="@drawable/baseline_palette_24"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

<Button
android:layout_width="wrap_content"
android:layout_height="@dimen/SizeMenu"
android:contentDescription="@string/delete_data_button"
android:onClick='onDeleteDataClick'
app:icon="@drawable/baseline_delete_forever_24"
app:iconPadding="0dp"
app:iconSize="@dimen/SizeMenubtn" />

</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
</ScrollView>

<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progressTint="@android:color/holo_red_dark" />

</LinearLayout>

</LinearLayout>
</FrameLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
1 change: 1 addition & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

<style name="Theme.WebApper.dark" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/md_theme_dark_primary</item>

<item name="colorOnPrimary">@color/md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_dark_onPrimaryContainer</item>
Expand Down

0 comments on commit b740346

Please sign in to comment.