-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36a6fcf
commit bcb1a1e
Showing
9 changed files
with
132 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
app/src/main/java/me/harshithgoka/youtubedl/Activities/SettingsActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package me.harshithgoka.youtubedl.Activities; | ||
|
||
import androidx.appcompat.app.ActionBar; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.appcompat.widget.Toolbar; | ||
import me.harshithgoka.youtubedl.Fragments.SettingsFragment; | ||
import me.harshithgoka.youtubedl.R; | ||
|
||
import android.os.Bundle; | ||
|
||
public class SettingsActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_settings); | ||
getSupportFragmentManager().beginTransaction() | ||
.replace(R.id.settings_content, new SettingsFragment()) | ||
.commit(); | ||
|
||
Toolbar toolbar = findViewById(R.id.settings_toolbar); | ||
setSupportActionBar(toolbar); | ||
|
||
ActionBar actionBar = getSupportActionBar(); | ||
if (actionBar != null) { | ||
actionBar.setDisplayShowTitleEnabled(false); | ||
actionBar.setDisplayHomeAsUpEnabled(true); | ||
} | ||
} | ||
} |
5 changes: 1 addition & 4 deletions
5
...outubedl/UI/RecyclerViewEmptySupport.java → ...dl/CustomUI/RecyclerViewEmptySupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
app/src/main/java/me/harshithgoka/youtubedl/Fragments/SettingsFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package me.harshithgoka.youtubedl.Fragments; | ||
|
||
|
||
import android.os.Bundle; | ||
import android.app.Fragment; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.TextView; | ||
|
||
import androidx.preference.PreferenceFragmentCompat; | ||
import me.harshithgoka.youtubedl.R; | ||
|
||
/** | ||
* A simple {@link Fragment} subclass. | ||
*/ | ||
public class SettingsFragment extends PreferenceFragmentCompat { | ||
|
||
|
||
public SettingsFragment() { | ||
// Required empty public constructor | ||
} | ||
|
||
@Override | ||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { | ||
setPreferencesFromResource(R.xml.preferences, rootKey); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".Activities.SettingsActivity"> | ||
|
||
<com.google.android.material.appbar.AppBarLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/settings_toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="@color/backgroundColor" | ||
android:padding="@dimen/text_margin"> | ||
<TextView | ||
android:id="@+id/settings_logo" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textStyle="bold" | ||
android:fontFamily="@font/renner" | ||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5" | ||
android:text="@string/settings_name"/> | ||
</androidx.appcompat.widget.Toolbar> | ||
</com.google.android.material.appbar.AppBarLayout> | ||
<androidx.core.widget.NestedScrollView | ||
android:focusable="true" | ||
android:focusableInTouchMode="true" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
app:layout_behavior="@string/appbar_scrolling_view_behavior"> | ||
<LinearLayout | ||
android:id="@+id/settings_content" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" /> | ||
</androidx.core.widget.NestedScrollView> | ||
|
||
</androidx.coordinatorlayout.widget.CoordinatorLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters