Removed navigation in Library
Having navigation in Library makes it hard to have options for each fragments we have to add manualy to each fragment
This commit is contained in:
parent
7365e44803
commit
e483973e51
103 changed files with 1387 additions and 917 deletions
358
.editorconfig
Normal file
358
.editorconfig
Normal file
|
@ -0,0 +1,358 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
# charset = utf-8
|
||||
# end_of_line = lf
|
||||
# indent_size = 4
|
||||
# indent_style = space
|
||||
# insert_final_newline = false
|
||||
# max_line_length = 100
|
||||
# tab_width = 4
|
||||
# ij_continuation_indent_size = 8
|
||||
# ij_formatter_off_tag = @formatter:off
|
||||
# ij_formatter_on_tag = @formatter:on
|
||||
# ij_formatter_tags_enabled = false
|
||||
# ij_smart_tabs = false
|
||||
# ij_wrap_on_typing = false
|
||||
|
||||
[*.java]
|
||||
# ij_java_align_consecutive_assignments = false
|
||||
# ij_java_align_consecutive_variable_declarations = false
|
||||
# ij_java_align_group_field_declarations = false
|
||||
# ij_java_align_multiline_annotation_parameters = false
|
||||
# ij_java_align_multiline_array_initializer_expression = false
|
||||
# ij_java_align_multiline_assignment = false
|
||||
# ij_java_align_multiline_binary_operation = false
|
||||
# ij_java_align_multiline_chained_methods = false
|
||||
# ij_java_align_multiline_extends_list = false
|
||||
# ij_java_align_multiline_for = true
|
||||
# ij_java_align_multiline_method_parentheses = false
|
||||
# ij_java_align_multiline_parameters = true
|
||||
# ij_java_align_multiline_parameters_in_calls = false
|
||||
# ij_java_align_multiline_parenthesized_expression = false
|
||||
# ij_java_align_multiline_resources = true
|
||||
# ij_java_align_multiline_ternary_operation = false
|
||||
# ij_java_align_multiline_text_blocks = false
|
||||
# ij_java_align_multiline_throws_list = false
|
||||
# ij_java_align_subsequent_simple_methods = false
|
||||
# ij_java_align_throws_keyword = false
|
||||
# ij_java_annotation_parameter_wrap = off
|
||||
# ij_java_array_initializer_new_line_after_left_brace = false
|
||||
# ij_java_array_initializer_right_brace_on_new_line = false
|
||||
# ij_java_array_initializer_wrap = off
|
||||
# ij_java_assert_statement_colon_on_next_line = false
|
||||
# ij_java_assert_statement_wrap = off
|
||||
# ij_java_assignment_wrap = off
|
||||
# ij_java_binary_operation_sign_on_next_line = false
|
||||
# ij_java_binary_operation_wrap = off
|
||||
# ij_java_blank_lines_after_anonymous_class_header = 0
|
||||
# ij_java_blank_lines_after_class_header = 0
|
||||
# ij_java_blank_lines_after_imports = 1
|
||||
# ij_java_blank_lines_after_package = 1
|
||||
# ij_java_blank_lines_around_class = 1
|
||||
# ij_java_blank_lines_around_field = 0
|
||||
# ij_java_blank_lines_around_field_in_interface = 0
|
||||
# ij_java_blank_lines_around_initializer = 1
|
||||
# ij_java_blank_lines_around_method = 1
|
||||
# ij_java_blank_lines_around_method_in_interface = 1
|
||||
# ij_java_blank_lines_before_class_end = 0
|
||||
# ij_java_blank_lines_before_imports = 1
|
||||
# ij_java_blank_lines_before_method_body = 0
|
||||
# ij_java_blank_lines_before_package = 0
|
||||
# ij_java_block_brace_style = end_of_line
|
||||
# ij_java_block_comment_at_first_column = true
|
||||
# ij_java_call_parameters_new_line_after_left_paren = false
|
||||
# ij_java_call_parameters_right_paren_on_new_line = false
|
||||
# ij_java_call_parameters_wrap = off
|
||||
# ij_java_case_statement_on_separate_line = true
|
||||
# ij_java_catch_on_new_line = false
|
||||
# ij_java_class_annotation_wrap = split_into_lines
|
||||
# ij_java_class_brace_style = end_of_line
|
||||
# ij_java_class_count_to_use_import_on_demand = 99
|
||||
# ij_java_class_names_in_javadoc = 1
|
||||
# ij_java_do_not_indent_top_level_class_members = false
|
||||
# ij_java_do_not_wrap_after_single_annotation = false
|
||||
# ij_java_do_while_brace_force = never
|
||||
# ij_java_doc_add_blank_line_after_description = true
|
||||
# ij_java_doc_add_blank_line_after_param_comments = false
|
||||
# ij_java_doc_add_blank_line_after_return = false
|
||||
# ij_java_doc_add_p_tag_on_empty_lines = true
|
||||
# ij_java_doc_align_exception_comments = true
|
||||
# ij_java_doc_align_param_comments = true
|
||||
# ij_java_doc_do_not_wrap_if_one_line = false
|
||||
# ij_java_doc_enable_formatting = true
|
||||
# ij_java_doc_enable_leading_asterisks = true
|
||||
# ij_java_doc_indent_on_continuation = false
|
||||
# ij_java_doc_keep_empty_lines = true
|
||||
# ij_java_doc_keep_empty_parameter_tag = true
|
||||
# ij_java_doc_keep_empty_return_tag = true
|
||||
# ij_java_doc_keep_empty_throws_tag = true
|
||||
# ij_java_doc_keep_invalid_tags = true
|
||||
# ij_java_doc_param_description_on_new_line = false
|
||||
# ij_java_doc_preserve_line_breaks = false
|
||||
# ij_java_doc_use_throws_not_exception_tag = true
|
||||
# ij_java_else_on_new_line = false
|
||||
# ij_java_enum_constants_wrap = off
|
||||
# ij_java_extends_keyword_wrap = off
|
||||
# ij_java_extends_list_wrap = off
|
||||
# ij_java_field_annotation_wrap = split_into_lines
|
||||
# ij_java_finally_on_new_line = false
|
||||
# ij_java_for_brace_force = never
|
||||
# ij_java_for_statement_new_line_after_left_paren = false
|
||||
# ij_java_for_statement_right_paren_on_new_line = false
|
||||
# ij_java_for_statement_wrap = off
|
||||
# ij_java_generate_final_locals = false
|
||||
# ij_java_generate_final_parameters = false
|
||||
# ij_java_if_brace_force = never
|
||||
# ij_java_imports_layout = android.**,|,androidx.**,|,com.**,|,junit.**,|,net.**,|,org.**,|,java.**,|,javax.**,|,*,|,$*,|
|
||||
# ij_java_indent_case_from_switch = true
|
||||
# ij_java_insert_inner_class_imports = false
|
||||
# ij_java_insert_override_annotation = true
|
||||
# ij_java_keep_blank_lines_before_right_brace = 2
|
||||
# ij_java_keep_blank_lines_between_package_declaration_and_header = 2
|
||||
# ij_java_keep_blank_lines_in_code = 2
|
||||
# ij_java_keep_blank_lines_in_declarations = 2
|
||||
# ij_java_keep_control_statement_in_one_line = true
|
||||
# ij_java_keep_first_column_comment = true
|
||||
# ij_java_keep_indents_on_empty_lines = false
|
||||
# ij_java_keep_line_breaks = true
|
||||
# ij_java_keep_multiple_expressions_in_one_line = false
|
||||
# ij_java_keep_simple_blocks_in_one_line = false
|
||||
# ij_java_keep_simple_classes_in_one_line = false
|
||||
# ij_java_keep_simple_lambdas_in_one_line = false
|
||||
# ij_java_keep_simple_methods_in_one_line = false
|
||||
# ij_java_label_indent_absolute = false
|
||||
# ij_java_label_indent_size = 0
|
||||
# ij_java_lambda_brace_style = end_of_line
|
||||
# ij_java_layout_static_imports_separately = true
|
||||
# ij_java_line_comment_add_space = false
|
||||
# ij_java_line_comment_at_first_column = true
|
||||
# ij_java_method_annotation_wrap = split_into_lines
|
||||
# ij_java_method_brace_style = end_of_line
|
||||
# ij_java_method_call_chain_wrap = off
|
||||
# ij_java_method_parameters_new_line_after_left_paren = false
|
||||
# ij_java_method_parameters_right_paren_on_new_line = false
|
||||
# ij_java_method_parameters_wrap = off
|
||||
# ij_java_modifier_list_wrap = false
|
||||
# ij_java_names_count_to_use_import_on_demand = 99
|
||||
# ij_java_parameter_annotation_wrap = off
|
||||
# ij_java_parentheses_expression_new_line_after_left_paren = false
|
||||
# ij_java_parentheses_expression_right_paren_on_new_line = false
|
||||
# ij_java_place_assignment_sign_on_next_line = false
|
||||
# ij_java_prefer_longer_names = true
|
||||
# ij_java_prefer_parameters_wrap = false
|
||||
# ij_java_repeat_synchronized = true
|
||||
# ij_java_replace_instanceof_and_cast = false
|
||||
# ij_java_replace_null_check = true
|
||||
# ij_java_replace_sum_lambda_with_method_ref = true
|
||||
# ij_java_resource_list_new_line_after_left_paren = false
|
||||
# ij_java_resource_list_right_paren_on_new_line = false
|
||||
# ij_java_resource_list_wrap = off
|
||||
# ij_java_space_after_closing_angle_bracket_in_type_argument = false
|
||||
# ij_java_space_after_colon = true
|
||||
# ij_java_space_after_comma = true
|
||||
# ij_java_space_after_comma_in_type_arguments = true
|
||||
# ij_java_space_after_for_semicolon = true
|
||||
# ij_java_space_after_quest = true
|
||||
# ij_java_space_after_type_cast = true
|
||||
# ij_java_space_before_annotation_array_initializer_left_brace = false
|
||||
# ij_java_space_before_annotation_parameter_list = false
|
||||
# ij_java_space_before_array_initializer_left_brace = false
|
||||
# ij_java_space_before_catch_keyword = true
|
||||
# ij_java_space_before_catch_left_brace = true
|
||||
# ij_java_space_before_catch_parentheses = true
|
||||
# ij_java_space_before_class_left_brace = true
|
||||
# ij_java_space_before_colon = true
|
||||
# ij_java_space_before_colon_in_foreach = true
|
||||
# ij_java_space_before_comma = false
|
||||
# ij_java_space_before_do_left_brace = true
|
||||
# ij_java_space_before_else_keyword = true
|
||||
# ij_java_space_before_else_left_brace = true
|
||||
# ij_java_space_before_finally_keyword = true
|
||||
# ij_java_space_before_finally_left_brace = true
|
||||
# ij_java_space_before_for_left_brace = true
|
||||
# ij_java_space_before_for_parentheses = true
|
||||
# ij_java_space_before_for_semicolon = false
|
||||
# ij_java_space_before_if_left_brace = true
|
||||
# ij_java_space_before_if_parentheses = true
|
||||
# ij_java_space_before_method_call_parentheses = false
|
||||
# ij_java_space_before_method_left_brace = true
|
||||
# ij_java_space_before_method_parentheses = false
|
||||
# ij_java_space_before_opening_angle_bracket_in_type_parameter = false
|
||||
# ij_java_space_before_quest = true
|
||||
# ij_java_space_before_switch_left_brace = true
|
||||
# ij_java_space_before_switch_parentheses = true
|
||||
# ij_java_space_before_synchronized_left_brace = true
|
||||
# ij_java_space_before_synchronized_parentheses = true
|
||||
# ij_java_space_before_try_left_brace = true
|
||||
# ij_java_space_before_try_parentheses = true
|
||||
# ij_java_space_before_type_parameter_list = false
|
||||
# ij_java_space_before_while_keyword = true
|
||||
# ij_java_space_before_while_left_brace = true
|
||||
# ij_java_space_before_while_parentheses = true
|
||||
# ij_java_space_inside_one_line_enum_braces = false
|
||||
# ij_java_space_within_empty_array_initializer_braces = false
|
||||
# ij_java_space_within_empty_method_call_parentheses = false
|
||||
# ij_java_space_within_empty_method_parentheses = false
|
||||
# ij_java_spaces_around_additive_operators = true
|
||||
# ij_java_spaces_around_assignment_operators = true
|
||||
# ij_java_spaces_around_bitwise_operators = true
|
||||
# ij_java_spaces_around_equality_operators = true
|
||||
# ij_java_spaces_around_lambda_arrow = true
|
||||
# ij_java_spaces_around_logical_operators = true
|
||||
# ij_java_spaces_around_method_ref_dbl_colon = false
|
||||
# ij_java_spaces_around_multiplicative_operators = true
|
||||
# ij_java_spaces_around_relational_operators = true
|
||||
# ij_java_spaces_around_shift_operators = true
|
||||
# ij_java_spaces_around_type_bounds_in_type_parameters = true
|
||||
# ij_java_spaces_around_unary_operator = false
|
||||
# ij_java_spaces_within_angle_brackets = false
|
||||
# ij_java_spaces_within_annotation_parentheses = false
|
||||
# ij_java_spaces_within_array_initializer_braces = false
|
||||
# ij_java_spaces_within_braces = false
|
||||
# ij_java_spaces_within_brackets = false
|
||||
# ij_java_spaces_within_cast_parentheses = false
|
||||
# ij_java_spaces_within_catch_parentheses = false
|
||||
# ij_java_spaces_within_for_parentheses = false
|
||||
# ij_java_spaces_within_if_parentheses = false
|
||||
# ij_java_spaces_within_method_call_parentheses = false
|
||||
# ij_java_spaces_within_method_parentheses = false
|
||||
# ij_java_spaces_within_parentheses = false
|
||||
# ij_java_spaces_within_switch_parentheses = false
|
||||
# ij_java_spaces_within_synchronized_parentheses = false
|
||||
# ij_java_spaces_within_try_parentheses = false
|
||||
# ij_java_spaces_within_while_parentheses = false
|
||||
# ij_java_special_else_if_treatment = true
|
||||
# ij_java_subclass_name_suffix = Impl
|
||||
# ij_java_ternary_operation_signs_on_next_line = false
|
||||
# ij_java_ternary_operation_wrap = off
|
||||
# ij_java_test_name_suffix = Test
|
||||
# ij_java_throws_keyword_wrap = off
|
||||
# ij_java_throws_list_wrap = off
|
||||
# ij_java_use_external_annotations = false
|
||||
# ij_java_use_fq_class_names = false
|
||||
# ij_java_use_relative_indents = false
|
||||
# ij_java_use_single_class_imports = true
|
||||
# ij_java_variable_annotation_wrap = off
|
||||
# ij_java_visibility = public
|
||||
# ij_java_while_brace_force = never
|
||||
# ij_java_while_on_new_line = false
|
||||
# ij_java_wrap_comments = false
|
||||
# ij_java_wrap_first_method_in_call_chain = false
|
||||
# ij_java_wrap_long_lines = false
|
||||
|
||||
[{*.htm,*.shtm,*.sht,*.shtml,*.html}]
|
||||
# ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3
|
||||
# ij_html_align_attributes = true
|
||||
# ij_html_align_text = false
|
||||
# ij_html_attribute_wrap = normal
|
||||
# ij_html_block_comment_at_first_column = true
|
||||
# ij_html_do_not_align_children_of_min_lines = 0
|
||||
# ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p
|
||||
# ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot
|
||||
# ij_html_enforce_quotes = false
|
||||
# ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var
|
||||
# ij_html_keep_blank_lines = 2
|
||||
# ij_html_keep_indents_on_empty_lines = false
|
||||
# ij_html_keep_line_breaks = true
|
||||
# ij_html_keep_line_breaks_in_text = true
|
||||
# ij_html_keep_whitespaces = false
|
||||
# ij_html_keep_whitespaces_inside = span,pre,textarea
|
||||
# ij_html_line_comment_at_first_column = true
|
||||
# ij_html_new_line_after_last_attribute = never
|
||||
# ij_html_new_line_before_first_attribute = never
|
||||
# ij_html_quote_style = double
|
||||
# ij_html_remove_new_line_before_tags = br
|
||||
# ij_html_space_after_tag_name = false
|
||||
# ij_html_space_around_equality_in_attribute = false
|
||||
# ij_html_space_inside_empty_tag = false
|
||||
# ij_html_text_wrap = normal
|
||||
|
||||
[{*.jhm,*.xslt,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.wsdl,*.jrxml,*.xml,*.jnlp,*.xul}]
|
||||
# ij_continuation_indent_size = 4
|
||||
# ij_xml_block_comment_at_first_column = true
|
||||
# ij_xml_keep_indents_on_empty_lines = false
|
||||
# ij_xml_line_comment_at_first_column = true
|
||||
# ij_xml_use_custom_settings = true
|
||||
# ij_continuation_indent_size = 4
|
||||
# ij_xml_block_comment_at_first_column = true
|
||||
# ij_xml_keep_indents_on_empty_lines = false
|
||||
# ij_xml_line_comment_at_first_column = true
|
||||
# ij_xml_use_custom_settings = true
|
||||
|
||||
[{*.kt,*.kts}]
|
||||
# ij_kotlin_align_in_columns_case_branch = false
|
||||
# ij_kotlin_align_multiline_binary_operation = false
|
||||
# ij_kotlin_align_multiline_extends_list = false
|
||||
# ij_kotlin_align_multiline_method_parentheses = false
|
||||
# ij_kotlin_align_multiline_parameters = true
|
||||
# ij_kotlin_align_multiline_parameters_in_calls = false
|
||||
# ij_kotlin_assignment_wrap = normal
|
||||
# ij_kotlin_blank_lines_after_class_header = 0
|
||||
# ij_kotlin_blank_lines_around_block_when_branches = 0
|
||||
# ij_kotlin_block_comment_at_first_column = true
|
||||
# ij_kotlin_call_parameters_new_line_after_left_paren = true
|
||||
# ij_kotlin_call_parameters_right_paren_on_new_line = true
|
||||
# ij_kotlin_call_parameters_wrap = on_every_item
|
||||
# ij_kotlin_catch_on_new_line = false
|
||||
# ij_kotlin_class_annotation_wrap = split_into_lines
|
||||
# ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
|
||||
# ij_kotlin_continuation_indent_for_chained_calls = false
|
||||
# ij_kotlin_continuation_indent_for_expression_bodies = false
|
||||
# ij_kotlin_continuation_indent_in_argument_lists = false
|
||||
# ij_kotlin_continuation_indent_in_elvis = false
|
||||
# ij_kotlin_continuation_indent_in_if_conditions = false
|
||||
# ij_kotlin_continuation_indent_in_parameter_lists = false
|
||||
# ij_kotlin_continuation_indent_in_supertype_lists = false
|
||||
# ij_kotlin_else_on_new_line = false
|
||||
# ij_kotlin_enum_constants_wrap = off
|
||||
# ij_kotlin_extends_list_wrap = normal
|
||||
# ij_kotlin_field_annotation_wrap = split_into_lines
|
||||
# ij_kotlin_finally_on_new_line = false
|
||||
# ij_kotlin_if_rparen_on_new_line = true
|
||||
# ij_kotlin_import_nested_classes = false
|
||||
# ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
|
||||
# ij_kotlin_keep_blank_lines_before_right_brace = 2
|
||||
# ij_kotlin_keep_blank_lines_in_code = 2
|
||||
# ij_kotlin_keep_blank_lines_in_declarations = 2
|
||||
# ij_kotlin_keep_first_column_comment = true
|
||||
# ij_kotlin_keep_indents_on_empty_lines = false
|
||||
# ij_kotlin_keep_line_breaks = true
|
||||
# ij_kotlin_lbrace_on_next_line = false
|
||||
# ij_kotlin_line_comment_add_space = false
|
||||
# ij_kotlin_line_comment_at_first_column = true
|
||||
# ij_kotlin_method_annotation_wrap = split_into_lines
|
||||
# ij_kotlin_method_call_chain_wrap = normal
|
||||
# ij_kotlin_method_parameters_new_line_after_left_paren = true
|
||||
# ij_kotlin_method_parameters_right_paren_on_new_line = true
|
||||
# ij_kotlin_method_parameters_wrap = on_every_item
|
||||
# ij_kotlin_name_count_to_use_star_import = 5
|
||||
# ij_kotlin_name_count_to_use_star_import_for_members = 3
|
||||
# ij_kotlin_parameter_annotation_wrap = off
|
||||
# ij_kotlin_space_after_comma = true
|
||||
# ij_kotlin_space_after_extend_colon = true
|
||||
# ij_kotlin_space_after_type_colon = true
|
||||
# ij_kotlin_space_before_catch_parentheses = true
|
||||
# ij_kotlin_space_before_comma = false
|
||||
# ij_kotlin_space_before_extend_colon = true
|
||||
# ij_kotlin_space_before_for_parentheses = true
|
||||
# ij_kotlin_space_before_if_parentheses = true
|
||||
# ij_kotlin_space_before_lambda_arrow = true
|
||||
# ij_kotlin_space_before_type_colon = false
|
||||
# ij_kotlin_space_before_when_parentheses = true
|
||||
# ij_kotlin_space_before_while_parentheses = true
|
||||
# ij_kotlin_spaces_around_additive_operators = true
|
||||
# ij_kotlin_spaces_around_assignment_operators = true
|
||||
# ij_kotlin_spaces_around_equality_operators = true
|
||||
# ij_kotlin_spaces_around_function_type_arrow = true
|
||||
# ij_kotlin_spaces_around_logical_operators = true
|
||||
# ij_kotlin_spaces_around_multiplicative_operators = true
|
||||
# ij_kotlin_spaces_around_range = false
|
||||
# ij_kotlin_spaces_around_relational_operators = true
|
||||
# ij_kotlin_spaces_around_unary_operator = false
|
||||
# ij_kotlin_spaces_around_when_arrow = true
|
||||
# ij_kotlin_variable_annotation_wrap = off
|
||||
# ij_kotlin_while_on_new_line = false
|
||||
# ij_kotlin_wrap_elvis_expressions = 1
|
||||
# ij_kotlin_wrap_expression_body_functions = 1
|
||||
# ij_kotlin_wrap_first_method_in_call_chain = false
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
}
|
||||
{style-placeholder}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
|
@ -12,22 +12,23 @@ import android.view.SubMenu
|
|||
import android.view.View
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.navigation.NavOptions
|
||||
import androidx.fragment.app.commit
|
||||
import code.name.monkey.appthemehelper.ThemeStore.Companion.accentColor
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil.resolveColor
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
import code.name.monkey.retromusic.*
|
||||
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
||||
import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog
|
||||
import code.name.monkey.retromusic.extensions.navController
|
||||
import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog.Companion.create
|
||||
import code.name.monkey.retromusic.fragments.LibraryViewModel
|
||||
import code.name.monkey.retromusic.fragments.albums.AlbumsFragment
|
||||
import code.name.monkey.retromusic.fragments.artists.ArtistsFragment
|
||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
|
||||
import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewCustomGridSizeFragment
|
||||
import code.name.monkey.retromusic.fragments.folder.FoldersFragment
|
||||
import code.name.monkey.retromusic.fragments.folder.FoldersFragment.PATH
|
||||
import code.name.monkey.retromusic.fragments.genres.GenresFragment
|
||||
import code.name.monkey.retromusic.fragments.home.BannerHomeFragment
|
||||
import code.name.monkey.retromusic.fragments.playlists.PlaylistsFragment
|
||||
import code.name.monkey.retromusic.fragments.queue.PlayingQueueFragment
|
||||
import code.name.monkey.retromusic.fragments.songs.SongsFragment
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote.isPlaying
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote.openAndShuffleQueue
|
||||
|
@ -37,6 +38,7 @@ import code.name.monkey.retromusic.helper.MusicPlayerRemote.shuffleMode
|
|||
import code.name.monkey.retromusic.helper.SearchQueryHelper.getSongs
|
||||
import code.name.monkey.retromusic.helper.SortOrder.*
|
||||
import code.name.monkey.retromusic.interfaces.CabHolder
|
||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
|
||||
import code.name.monkey.retromusic.loaders.AlbumLoader.getAlbum
|
||||
import code.name.monkey.retromusic.loaders.ArtistLoader.getArtist
|
||||
import code.name.monkey.retromusic.loaders.PlaylistSongsLoader.getPlaylistSongList
|
||||
|
@ -61,6 +63,7 @@ import com.google.android.play.core.install.model.InstallStatus.INSTALLED
|
|||
import com.google.android.play.core.install.model.UpdateAvailability
|
||||
import com.google.android.play.core.tasks.Task
|
||||
import kotlinx.android.synthetic.main.activity_main_content.*
|
||||
import org.koin.android.ext.android.inject
|
||||
import java.util.*
|
||||
|
||||
class MainActivity : AbsSlidingMusicPanelActivity(),
|
||||
|
@ -71,8 +74,10 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
const val APP_UPDATE_REQUEST_CODE = 9002
|
||||
}
|
||||
|
||||
private val libraryViewModel: LibraryViewModel by inject()
|
||||
private var cab: MaterialCab? = null
|
||||
private val intentFilter = IntentFilter(Intent.ACTION_SCREEN_OFF)
|
||||
private lateinit var currentFragment: MainActivityFragmentCallbacks
|
||||
private var appUpdateManager: AppUpdateManager? = null
|
||||
private var blockRequestPermissions = false
|
||||
private val listener = object : InstallStateUpdatedListener {
|
||||
|
@ -118,33 +123,22 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
hideStatusBar()
|
||||
setBottomBarVisibility(View.VISIBLE)
|
||||
|
||||
addMusicServiceEventListener(libraryViewModel)
|
||||
if (savedInstanceState == null) {
|
||||
selectedFragment(PreferenceUtil.lastPage)
|
||||
} else {
|
||||
restoreCurrentFragment()
|
||||
}
|
||||
|
||||
appLaunched(this)
|
||||
setupToolbar()
|
||||
checkUpdate()
|
||||
updateTabs()
|
||||
|
||||
val navController = navController(R.id.fragment_container)
|
||||
val navOptions: NavOptions = NavOptions.Builder()
|
||||
.setLaunchSingleTop(true)
|
||||
.setEnterAnim(R.anim.retro_fragment_open_enter)
|
||||
.setExitAnim(R.anim.retro_fragment_open_exit)
|
||||
.setPopEnterAnim(R.anim.retro_fragment_close_enter)
|
||||
.setPopExitAnim(R.anim.retro_fragment_close_exit)
|
||||
.setPopUpTo(navController.graph.startDestination, false)
|
||||
.build()
|
||||
getBottomNavigationView().selectedItemId = PreferenceUtil.lastPage
|
||||
getBottomNavigationView().setOnNavigationItemSelectedListener {
|
||||
var handled = false
|
||||
when (it.itemId) {
|
||||
R.id.action_folder -> navController.navigate(it.itemId, Bundle().apply {
|
||||
putSerializable(PATH, PreferenceUtil.startDirectory)
|
||||
}, navOptions)
|
||||
else -> if (navController.graph.findNode(it.itemId) != null) {
|
||||
navController.navigate(it.itemId, null, navOptions)
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
return@setOnNavigationItemSelectedListener handled
|
||||
|
||||
PreferenceUtil.lastPage = it.itemId
|
||||
selectedFragment(it.itemId)
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,7 +161,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
}
|
||||
try {
|
||||
if (appUpdateInfo.updateAvailability() == UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS) {
|
||||
appUpdateManager?.startUpdateFlowForResult(
|
||||
appUpdateManager!!.startUpdateFlowForResult(
|
||||
appUpdateInfo,
|
||||
AppUpdateType.IMMEDIATE,
|
||||
this,
|
||||
|
@ -213,7 +207,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
.setShowAsActionFlags(MenuItem.SHOW_AS_ACTION_IF_ROOM)
|
||||
}
|
||||
val fragment: Fragment? = getCurrentFragment()
|
||||
if (fragment != null && fragment is AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>) {
|
||||
if (fragment != null && fragment is AbsRecyclerViewCustomGridSizeFragment<*, *>) {
|
||||
val gridSizeItem: MenuItem = menu.findItem(R.id.action_grid_size)
|
||||
if (RetroUtil.isLandscape()) {
|
||||
gridSizeItem.setTitle(R.string.action_grid_size_land)
|
||||
|
@ -243,15 +237,21 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
val fragment = getCurrentFragment()
|
||||
if (fragment is AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>) {
|
||||
if (handleGridSizeMenuItem(fragment, item)) return true
|
||||
if (handleLayoutResType(fragment, item)) return true
|
||||
if (handleSortOrderMenuItem(fragment, item)) return true
|
||||
if (fragment is AbsRecyclerViewCustomGridSizeFragment<*, *>) {
|
||||
if (handleGridSizeMenuItem(fragment, item)) {
|
||||
return true
|
||||
}
|
||||
if (handleLayoutResType(fragment, item)) {
|
||||
return true
|
||||
}
|
||||
if (handleSortOrderMenuItem(fragment, item)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
when (item.itemId) {
|
||||
R.id.action_search -> NavigationUtil.goToSearch(this)
|
||||
R.id.action_new_playlist -> {
|
||||
CreatePlaylistDialog.create().show(supportFragmentManager, "CREATE_PLAYLIST")
|
||||
create().show(supportFragmentManager, "CREATE_PLAYLIST")
|
||||
return true
|
||||
}
|
||||
R.id.action_mic -> {
|
||||
|
@ -271,31 +271,37 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
}
|
||||
|
||||
private fun handleSortOrderMenuItem(
|
||||
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
item: MenuItem
|
||||
): Boolean {
|
||||
var sortOrder: String? = null
|
||||
when (fragment) {
|
||||
is AlbumsFragment -> when (item.itemId) {
|
||||
R.id.action_album_sort_order_asc -> sortOrder = AlbumSortOrder.ALBUM_A_Z
|
||||
R.id.action_album_sort_order_desc -> sortOrder = AlbumSortOrder.ALBUM_Z_A
|
||||
R.id.action_album_sort_order_artist -> sortOrder = AlbumSortOrder.ALBUM_ARTIST
|
||||
R.id.action_album_sort_order_year -> sortOrder = AlbumSortOrder.ALBUM_YEAR
|
||||
is AlbumsFragment -> {
|
||||
when (item.itemId) {
|
||||
R.id.action_album_sort_order_asc -> sortOrder = AlbumSortOrder.ALBUM_A_Z
|
||||
R.id.action_album_sort_order_desc -> sortOrder = AlbumSortOrder.ALBUM_Z_A
|
||||
R.id.action_album_sort_order_artist -> sortOrder = AlbumSortOrder.ALBUM_ARTIST
|
||||
R.id.action_album_sort_order_year -> sortOrder = AlbumSortOrder.ALBUM_YEAR
|
||||
}
|
||||
}
|
||||
is ArtistsFragment -> when (item.itemId) {
|
||||
R.id.action_artist_sort_order_asc -> sortOrder = ArtistSortOrder.ARTIST_A_Z
|
||||
R.id.action_artist_sort_order_desc -> sortOrder = ArtistSortOrder.ARTIST_Z_A
|
||||
is ArtistsFragment -> {
|
||||
when (item.itemId) {
|
||||
R.id.action_artist_sort_order_asc -> sortOrder = ArtistSortOrder.ARTIST_A_Z
|
||||
R.id.action_artist_sort_order_desc -> sortOrder = ArtistSortOrder.ARTIST_Z_A
|
||||
}
|
||||
}
|
||||
is SongsFragment -> when (item.itemId) {
|
||||
R.id.action_song_sort_order_asc -> sortOrder = SongSortOrder.SONG_A_Z
|
||||
R.id.action_song_sort_order_desc -> sortOrder = SongSortOrder.SONG_Z_A
|
||||
R.id.action_song_sort_order_artist -> sortOrder = SongSortOrder.SONG_ARTIST
|
||||
R.id.action_song_sort_order_album -> sortOrder = SongSortOrder.SONG_ALBUM
|
||||
R.id.action_song_sort_order_year -> sortOrder = SongSortOrder.SONG_YEAR
|
||||
R.id.action_song_sort_order_date -> sortOrder = SongSortOrder.SONG_DATE
|
||||
R.id.action_song_sort_order_composer -> sortOrder = SongSortOrder.COMPOSER
|
||||
R.id.action_song_sort_order_date_modified ->
|
||||
sortOrder = SongSortOrder.SONG_DATE_MODIFIED
|
||||
is SongsFragment -> {
|
||||
when (item.itemId) {
|
||||
R.id.action_song_sort_order_asc -> sortOrder = SongSortOrder.SONG_A_Z
|
||||
R.id.action_song_sort_order_desc -> sortOrder = SongSortOrder.SONG_Z_A
|
||||
R.id.action_song_sort_order_artist -> sortOrder = SongSortOrder.SONG_ARTIST
|
||||
R.id.action_song_sort_order_album -> sortOrder = SongSortOrder.SONG_ALBUM
|
||||
R.id.action_song_sort_order_year -> sortOrder = SongSortOrder.SONG_YEAR
|
||||
R.id.action_song_sort_order_date -> sortOrder = SongSortOrder.SONG_DATE
|
||||
R.id.action_song_sort_order_composer -> sortOrder = SongSortOrder.COMPOSER
|
||||
R.id.action_song_sort_order_date_modified ->
|
||||
sortOrder = SongSortOrder.SONG_DATE_MODIFIED
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -309,7 +315,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
}
|
||||
|
||||
private fun handleLayoutResType(
|
||||
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
item: MenuItem
|
||||
): Boolean {
|
||||
var layoutRes = -1
|
||||
|
@ -330,7 +336,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
}
|
||||
|
||||
private fun handleGridSizeMenuItem(
|
||||
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
item: MenuItem
|
||||
): Boolean {
|
||||
var gridSize = 0
|
||||
|
@ -353,7 +359,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
}
|
||||
|
||||
private fun setUpGridSizeMenu(
|
||||
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
gridSizeMenu: SubMenu
|
||||
) {
|
||||
when (fragment.getGridSize()) {
|
||||
|
@ -388,7 +394,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
}
|
||||
|
||||
private fun setupLayoutMenu(
|
||||
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
subMenu: SubMenu
|
||||
) {
|
||||
when (fragment.itemLayoutRes()) {
|
||||
|
@ -410,7 +416,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
}
|
||||
|
||||
private fun setUpSortOrderMenu(
|
||||
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
|
||||
sortOrderMenu: SubMenu
|
||||
) {
|
||||
val currentSortOrder = fragment.getSortOrder()
|
||||
|
@ -611,6 +617,70 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
snackBar.show()
|
||||
}
|
||||
|
||||
private fun setCurrentFragment(
|
||||
fragment: Fragment,
|
||||
tag: String
|
||||
) {
|
||||
supportFragmentManager.commit {
|
||||
setCustomAnimations(
|
||||
R.anim.retro_fragment_open_enter,
|
||||
R.anim.retro_fragment_open_exit,
|
||||
R.anim.retro_fragment_fade_enter,
|
||||
R.anim.retro_fragment_fade_exit
|
||||
)
|
||||
replace(R.id.fragment_container, fragment, tag)
|
||||
}
|
||||
currentFragment = fragment as MainActivityFragmentCallbacks
|
||||
}
|
||||
|
||||
private fun selectedFragment(itemId: Int) {
|
||||
when (itemId) {
|
||||
R.id.action_album -> setCurrentFragment(
|
||||
AlbumsFragment.newInstance(),
|
||||
AlbumsFragment.TAG
|
||||
)
|
||||
R.id.action_artist -> setCurrentFragment(
|
||||
ArtistsFragment.newInstance(),
|
||||
ArtistsFragment.TAG
|
||||
)
|
||||
R.id.action_playlist -> setCurrentFragment(
|
||||
PlaylistsFragment.newInstance(),
|
||||
PlaylistsFragment.TAG
|
||||
)
|
||||
R.id.action_genre -> setCurrentFragment(
|
||||
GenresFragment.newInstance(),
|
||||
GenresFragment.TAG
|
||||
)
|
||||
R.id.action_playing_queue -> setCurrentFragment(
|
||||
PlayingQueueFragment.newInstance(),
|
||||
PlayingQueueFragment.TAG
|
||||
)
|
||||
R.id.action_song -> setCurrentFragment(
|
||||
SongsFragment.newInstance(),
|
||||
SongsFragment.TAG
|
||||
)
|
||||
R.id.action_folder -> setCurrentFragment(
|
||||
FoldersFragment.newInstance(this),
|
||||
FoldersFragment.TAG
|
||||
)
|
||||
R.id.action_home -> setCurrentFragment(
|
||||
BannerHomeFragment.newInstance(),
|
||||
BannerHomeFragment.TAG
|
||||
)
|
||||
else -> setCurrentFragment(
|
||||
BannerHomeFragment.newInstance(),
|
||||
BannerHomeFragment.TAG
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun restoreCurrentFragment() {
|
||||
val fragment = supportFragmentManager.findFragmentById(R.id.fragment_container)
|
||||
if (fragment != null) {
|
||||
currentFragment = fragment as MainActivityFragmentCallbacks
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
|
||||
if (key == GENERAL_THEME || key == BLACK_THEME || key == ADAPTIVE_COLOR_APP || key == USER_NAME || key == TOGGLE_FULL_SCREEN || key == TOGGLE_VOLUME || key == ROUND_CORNERS || key == CAROUSEL_EFFECT || key == NOW_PLAYING_SCREEN_ID || key == TOGGLE_GENRE || key == BANNER_IMAGE_PATH || key == PROFILE_IMAGE_PATH || key == CIRCULAR_ALBUM_ART || key == KEEP_SCREEN_ON || key == TOGGLE_SEPARATE_LINE || key == TOGGLE_HOME_BANNER || key == TOGGLE_ADD_CONTROLS || key == ALBUM_COVER_STYLE || key == HOME_ARTIST_GRID_STYLE || key == ALBUM_COVER_TRANSFORM || key == DESATURATED_COLOR || key == EXTRA_SONG_INFO || key == TAB_TEXT_MODE || key == LANGUAGE_NAME || key == LIBRARY_CATEGORIES
|
||||
) {
|
||||
|
@ -696,7 +766,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
|
|||
cab?.finish()
|
||||
return true
|
||||
}
|
||||
return super.handleBackPress()
|
||||
return super.handleBackPress() || currentFragment.handleBackPress()
|
||||
}
|
||||
|
||||
override fun openCab(menuRes: Int, callback: MaterialCab.Callback): MaterialCab {
|
||||
|
|
|
@ -35,7 +35,8 @@ class SettingsActivity : AbsBaseActivity(), ColorChooserDialog.ColorCallback {
|
|||
private fun setupToolbar() {
|
||||
setTitle(R.string.action_settings)
|
||||
applyToolbar(toolbar)
|
||||
val navHostFragment = supportFragmentManager.findFragmentById(R.id.contentFrame) as NavHostFragment
|
||||
val navHostFragment =
|
||||
supportFragmentManager.findFragmentById(R.id.contentFrame) as NavHostFragment
|
||||
val navController: NavController = navHostFragment.navController
|
||||
navController.addOnDestinationChangedListener { _, _, _ ->
|
||||
toolbar.title = navController.currentDestination?.label
|
||||
|
|
|
@ -0,0 +1,250 @@
|
|||
package code.name.monkey.retromusic.activities.albums
|
||||
|
||||
import android.app.ActivityOptions
|
||||
import android.os.Bundle
|
||||
import android.transition.TransitionInflater
|
||||
import android.util.Pair
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.recyclerview.widget.DefaultItemAnimator
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import code.name.monkey.appthemehelper.util.MaterialUtil
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.album.HorizontalAlbumAdapter
|
||||
import code.name.monkey.retromusic.adapter.song.SimpleSongAdapter
|
||||
import code.name.monkey.retromusic.extensions.extraNotNull
|
||||
import code.name.monkey.retromusic.extensions.show
|
||||
import code.name.monkey.retromusic.fragments.base.AbsMusicServiceFragment
|
||||
import code.name.monkey.retromusic.glide.AlbumGlideRequest
|
||||
import code.name.monkey.retromusic.glide.ArtistGlideRequest
|
||||
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.model.Album
|
||||
import code.name.monkey.retromusic.model.Artist
|
||||
import code.name.monkey.retromusic.network.model.LastFmAlbum
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.NavigationUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.RetroUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import com.bumptech.glide.Glide
|
||||
import kotlinx.android.synthetic.main.activity_album.*
|
||||
import kotlinx.android.synthetic.main.activity_album_content.*
|
||||
import org.koin.androidx.viewmodel.ext.android.viewModel
|
||||
import org.koin.core.parameter.parametersOf
|
||||
import java.util.*
|
||||
|
||||
class AlbumDetailsFragment : AbsMusicServiceFragment(R.layout.fragment_album_details) {
|
||||
private lateinit var simpleSongAdapter: SimpleSongAdapter
|
||||
private lateinit var album: Album
|
||||
private val savedSortOrder: String
|
||||
get() = PreferenceUtil.albumDetailSongSortOrder
|
||||
private val detailsViewModel by viewModel<AlbumDetailsViewModel> {
|
||||
parametersOf(extraNotNull<Int>(AlbumDetailsActivity.EXTRA_ALBUM_ID).value)
|
||||
}
|
||||
|
||||
private fun setSharedElementTransitionOnEnter() {
|
||||
sharedElementEnterTransition = TransitionInflater.from(context)
|
||||
.inflateTransition(R.transition.change_bounds)
|
||||
}
|
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
setSharedElementTransitionOnEnter()
|
||||
postponeEnterTransition()
|
||||
playerActivity?.addMusicServiceEventListener(detailsViewModel)
|
||||
|
||||
detailsViewModel.getAlbum().observe(viewLifecycleOwner, androidx.lifecycle.Observer {
|
||||
startPostponedEnterTransition()
|
||||
showAlbum(it)
|
||||
})
|
||||
detailsViewModel.getArtist().observe(viewLifecycleOwner, androidx.lifecycle.Observer {
|
||||
loadArtistImage(it)
|
||||
})
|
||||
detailsViewModel.getMoreAlbums().observe(viewLifecycleOwner, androidx.lifecycle.Observer {
|
||||
moreAlbums(it)
|
||||
})
|
||||
detailsViewModel.getAlbumInfo().observe(viewLifecycleOwner, androidx.lifecycle.Observer {
|
||||
aboutAlbum(it)
|
||||
})
|
||||
setupRecyclerView()
|
||||
artistImage.setOnClickListener {
|
||||
val artistPairs = ActivityOptions.makeSceneTransitionAnimation(
|
||||
requireActivity(),
|
||||
Pair.create(
|
||||
artistImage,
|
||||
getString(R.string.transition_artist_image)
|
||||
)
|
||||
)
|
||||
NavigationUtil.goToArtistOptions(requireActivity(), album.artistId, artistPairs)
|
||||
}
|
||||
playAction.setOnClickListener { MusicPlayerRemote.openQueue(album.songs!!, 0, true) }
|
||||
|
||||
shuffleAction.setOnClickListener {
|
||||
MusicPlayerRemote.openAndShuffleQueue(
|
||||
album.songs!!,
|
||||
true
|
||||
)
|
||||
}
|
||||
|
||||
aboutAlbumText.setOnClickListener {
|
||||
if (aboutAlbumText.maxLines == 4) {
|
||||
aboutAlbumText.maxLines = Integer.MAX_VALUE
|
||||
} else {
|
||||
aboutAlbumText.maxLines = 4
|
||||
}
|
||||
}
|
||||
image.apply {
|
||||
transitionName = getString(R.string.transition_album_art)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
val activity = activity as AppCompatActivity
|
||||
activity.supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
playerActivity?.removeMusicServiceEventListener(detailsViewModel)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
android.R.id.home -> findNavController().navigateUp()
|
||||
}
|
||||
return super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
simpleSongAdapter = SimpleSongAdapter(
|
||||
requireActivity() as AppCompatActivity,
|
||||
ArrayList(),
|
||||
R.layout.item_song,
|
||||
null
|
||||
)
|
||||
recyclerView.apply {
|
||||
layoutManager = LinearLayoutManager(requireContext())
|
||||
itemAnimator = DefaultItemAnimator()
|
||||
isNestedScrollingEnabled = false
|
||||
adapter = simpleSongAdapter
|
||||
}
|
||||
}
|
||||
|
||||
private fun showAlbum(album: Album) {
|
||||
if (album.songs!!.isEmpty()) {
|
||||
return
|
||||
}
|
||||
this.album = album
|
||||
|
||||
albumTitle.text = album.title
|
||||
val songText =
|
||||
resources.getQuantityString(
|
||||
R.plurals.albumSongs,
|
||||
album.songCount,
|
||||
album.songCount
|
||||
)
|
||||
songTitle.text = songText
|
||||
|
||||
if (MusicUtil.getYearString(album.year) == "-") {
|
||||
albumText.text = String.format(
|
||||
"%s • %s",
|
||||
album.artistName,
|
||||
MusicUtil.getReadableDurationString(MusicUtil.getTotalDuration(album.songs))
|
||||
)
|
||||
} else {
|
||||
albumText.text = String.format(
|
||||
"%s • %s • %s",
|
||||
album.artistName,
|
||||
MusicUtil.getYearString(album.year),
|
||||
MusicUtil.getReadableDurationString(MusicUtil.getTotalDuration(album.songs))
|
||||
)
|
||||
}
|
||||
loadAlbumCover()
|
||||
simpleSongAdapter.swapDataSet(album.songs)
|
||||
detailsViewModel.loadArtist(album.artistId)
|
||||
detailsViewModel.loadAlbumInfo(album)
|
||||
}
|
||||
|
||||
private fun moreAlbums(albums: List<Album>) {
|
||||
moreTitle.show()
|
||||
moreRecyclerView.show()
|
||||
moreTitle.text = String.format(getString(R.string.label_more_from), album.artistName)
|
||||
|
||||
val albumAdapter =
|
||||
HorizontalAlbumAdapter(requireActivity() as AppCompatActivity, albums, null)
|
||||
moreRecyclerView.layoutManager = GridLayoutManager(
|
||||
requireContext(),
|
||||
1,
|
||||
GridLayoutManager.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
moreRecyclerView.adapter = albumAdapter
|
||||
}
|
||||
|
||||
private fun aboutAlbum(lastFmAlbum: LastFmAlbum) {
|
||||
if (lastFmAlbum.album != null) {
|
||||
if (lastFmAlbum.album.wiki != null) {
|
||||
aboutAlbumText.show()
|
||||
aboutAlbumTitle.show()
|
||||
aboutAlbumTitle.text =
|
||||
String.format(getString(R.string.about_album_label), lastFmAlbum.album.name)
|
||||
aboutAlbumText.text = lastFmAlbum.album.wiki.content
|
||||
}
|
||||
if (lastFmAlbum.album.listeners.isNotEmpty()) {
|
||||
listeners.show()
|
||||
listenersLabel.show()
|
||||
scrobbles.show()
|
||||
scrobblesLabel.show()
|
||||
|
||||
listeners.text = RetroUtil.formatValue(lastFmAlbum.album.listeners.toFloat())
|
||||
scrobbles.text = RetroUtil.formatValue(lastFmAlbum.album.playcount.toFloat())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadArtistImage(artist: Artist) {
|
||||
ArtistGlideRequest.Builder.from(Glide.with(requireContext()), artist)
|
||||
.generatePalette(requireContext())
|
||||
.build()
|
||||
.dontAnimate()
|
||||
.dontTransform()
|
||||
.into(object : RetroMusicColoredTarget(artistImage) {
|
||||
override fun onColorReady(colors: MediaNotificationProcessor) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun loadAlbumCover() {
|
||||
AlbumGlideRequest.Builder.from(Glide.with(requireContext()), album.safeGetFirstSong())
|
||||
.checkIgnoreMediaStore(requireContext())
|
||||
.ignoreMediaStore(PreferenceUtil.isIgnoreMediaStoreArtwork)
|
||||
.generatePalette(requireContext())
|
||||
.build()
|
||||
.dontAnimate()
|
||||
.dontTransform()
|
||||
.into(object : RetroMusicColoredTarget(image) {
|
||||
override fun onColorReady(colors: MediaNotificationProcessor) {
|
||||
setColors(colors)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun setColors(color: MediaNotificationProcessor) {
|
||||
MaterialUtil.tintColor(
|
||||
button = shuffleAction,
|
||||
textColor = color.primaryTextColor,
|
||||
backgroundColor = color.backgroundColor
|
||||
)
|
||||
MaterialUtil.tintColor(
|
||||
button = playAction,
|
||||
textColor = color.primaryTextColor,
|
||||
backgroundColor = color.backgroundColor
|
||||
)
|
||||
}
|
||||
}
|
|
@ -36,9 +36,10 @@ class SearchShortCutType(context: Context) : BaseShortcutType(context) {
|
|||
id
|
||||
).setShortLabel(context.getString(R.string.action_search))
|
||||
.setLongLabel(context.getString(R.string.search_hint)).setIcon(
|
||||
AppShortcutIconGenerator.generateThemedIcon(
|
||||
context,
|
||||
R.drawable.ic_app_shortcut_search
|
||||
)
|
||||
).setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_SEARCH)).build()
|
||||
AppShortcutIconGenerator.generateThemedIcon(
|
||||
context,
|
||||
R.drawable.ic_app_shortcut_search
|
||||
)
|
||||
).setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_SEARCH))
|
||||
.build()
|
||||
}
|
|
@ -88,19 +88,18 @@ public class BlacklistFolderChooserDialog extends DialogFragment implements Mate
|
|||
parentFolder = new File(savedInstanceState.getString("current_path", File.pathSeparator));
|
||||
checkIfCanGoUp();
|
||||
parentContents = listFiles();
|
||||
MaterialDialog.Builder builder =
|
||||
new MaterialDialog.Builder(requireActivity())
|
||||
.title(parentFolder.getAbsolutePath())
|
||||
.items((CharSequence[]) getContentsArray())
|
||||
.itemsCallback(this)
|
||||
.autoDismiss(false)
|
||||
.onPositive((dialog, which) -> {
|
||||
dismiss();
|
||||
callback.onFolderSelection(BlacklistFolderChooserDialog.this, parentFolder);
|
||||
})
|
||||
.onNegative((materialDialog, dialogAction) -> dismiss())
|
||||
.positiveText(R.string.add_action)
|
||||
.negativeText(android.R.string.cancel);
|
||||
MaterialDialog.Builder builder = new MaterialDialog.Builder(requireContext())
|
||||
.title(parentFolder.getAbsolutePath())
|
||||
.items((CharSequence[]) getContentsArray())
|
||||
.itemsCallback(this)
|
||||
.autoDismiss(false)
|
||||
.onPositive((dialog, which) -> {
|
||||
callback.onFolderSelection(BlacklistFolderChooserDialog.this, parentFolder);
|
||||
dismiss();
|
||||
})
|
||||
.onNegative((materialDialog, dialogAction) -> dismiss())
|
||||
.positiveText(R.string.add_action)
|
||||
.negativeText(android.R.string.cancel);
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,9 @@ import android.os.Bundle
|
|||
import android.text.SpannableString
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.view.*
|
||||
import android.view.GestureDetector
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.retromusic.R
|
||||
|
@ -24,8 +26,8 @@ import code.name.monkey.retromusic.util.ViewUtil
|
|||
import kotlinx.android.synthetic.main.fragment_mini_player.*
|
||||
import kotlin.math.abs
|
||||
|
||||
open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpdateHelper.Callback,
|
||||
View.OnClickListener {
|
||||
open class MiniPlayerFragment : AbsMusicServiceFragment(R.layout.fragment_mini_player),
|
||||
MusicProgressViewUpdateHelper.Callback, View.OnClickListener {
|
||||
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
|
||||
|
@ -34,14 +36,6 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_mini_player, container, false)
|
||||
}
|
||||
|
||||
override fun onClick(view: View) {
|
||||
when (view.id) {
|
||||
R.id.actionNext -> MusicPlayerRemote.playNextSong()
|
||||
|
|
|
@ -24,6 +24,7 @@ enum class NowPlayingScreen constructor(
|
|||
Gradient(R.string.gradient, R.drawable.np_gradient, 17),
|
||||
Material(R.string.material, R.drawable.np_material, 11),
|
||||
Normal(R.string.normal, R.drawable.np_normal, 0),
|
||||
|
||||
//Peak(R.string.peak, R.drawable.np_peak, 14),
|
||||
Plain(R.string.plain, R.drawable.np_plain, 3),
|
||||
Simple(R.string.simple, R.drawable.np_simple, 8),
|
||||
|
|
|
@ -6,18 +6,18 @@ import androidx.lifecycle.Observer
|
|||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.album.AlbumAdapter
|
||||
import code.name.monkey.retromusic.fragments.LibraryViewModel
|
||||
import code.name.monkey.retromusic.fragments.ReloadType
|
||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
|
||||
import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewCustomGridSizeFragment
|
||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
||||
class AlbumsFragment :
|
||||
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridLayoutManager>(),
|
||||
AbsRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridLayoutManager>(),
|
||||
MainActivityFragmentCallbacks {
|
||||
|
||||
private val libraryViewModel: LibraryViewModel by sharedViewModel()
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
@ -88,9 +88,6 @@ class AlbumsFragment :
|
|||
PreferenceUtil.albumGridStyle = layoutRes
|
||||
}
|
||||
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
|
|
|
@ -6,18 +6,19 @@ import androidx.lifecycle.Observer
|
|||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.artist.ArtistAdapter
|
||||
import code.name.monkey.retromusic.fragments.LibraryViewModel
|
||||
import code.name.monkey.retromusic.fragments.ReloadType
|
||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
|
||||
import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewCustomGridSizeFragment
|
||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
||||
class ArtistsFragment :
|
||||
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<ArtistAdapter, GridLayoutManager>(),
|
||||
AbsRecyclerViewCustomGridSizeFragment<ArtistAdapter, GridLayoutManager>(),
|
||||
MainActivityFragmentCallbacks {
|
||||
|
||||
private val libraryViewModel: LibraryViewModel by sharedViewModel()
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
@ -31,15 +32,11 @@ class ArtistsFragment :
|
|||
})
|
||||
}
|
||||
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override val emptyMessage: Int
|
||||
get() = R.string.no_artists
|
||||
|
||||
override fun setSortOrder(sortOrder: String) {
|
||||
libraryViewModel.forceReload(ReloadType.Artists)
|
||||
libraryViewModel.forceReload(ReloadType.Artists)
|
||||
}
|
||||
|
||||
override fun createLayoutManager(): GridLayoutManager {
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
package code.name.monkey.retromusic.fragments.base
|
||||
|
||||
import android.os.Bundle
|
||||
import code.name.monkey.retromusic.activities.MainActivity
|
||||
|
||||
open class AbsLibraryPagerFragment : AbsMusicServiceFragment() {
|
||||
|
||||
val mainActivity: MainActivity
|
||||
get() = requireActivity() as MainActivity
|
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
setHasOptionsMenu(true)
|
||||
}
|
||||
}
|
|
@ -2,13 +2,14 @@ package code.name.monkey.retromusic.fragments.base
|
|||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.annotation.LayoutRes
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.VersionUtils
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.activities.MainActivity
|
||||
|
||||
abstract class AbsMainActivityFragment : AbsMusicServiceFragment() {
|
||||
abstract class AbsMainActivityFragment(@LayoutRes layout: Int) : AbsMusicServiceFragment(layout) {
|
||||
|
||||
val mainActivity: MainActivity
|
||||
get() = activity as MainActivity
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.net.Uri
|
|||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.webkit.MimeTypeMap
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.fragment.app.Fragment
|
||||
import code.name.monkey.retromusic.activities.base.AbsMusicServiceActivity
|
||||
import code.name.monkey.retromusic.interfaces.MusicServiceEventListener
|
||||
|
@ -19,7 +20,8 @@ import java.util.*
|
|||
* Created by hemanths on 18/08/17.
|
||||
*/
|
||||
|
||||
open class AbsMusicServiceFragment : Fragment(), MusicServiceEventListener {
|
||||
open class AbsMusicServiceFragment(@LayoutRes layout: Int) : Fragment(layout),
|
||||
MusicServiceEventListener {
|
||||
|
||||
var playerActivity: AbsMusicServiceActivity? = null
|
||||
private set
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.os.Bundle
|
|||
import android.view.View
|
||||
import android.view.animation.AccelerateInterpolator
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import androidx.annotation.LayoutRes
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.fragments.VolumeFragment
|
||||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
||||
|
@ -15,7 +16,7 @@ import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
|||
* Created by hemanths on 24/09/17.
|
||||
*/
|
||||
|
||||
abstract class AbsPlayerControlsFragment : AbsMusicServiceFragment(),
|
||||
abstract class AbsPlayerControlsFragment(@LayoutRes layout: Int) : AbsMusicServiceFragment(layout),
|
||||
MusicProgressViewUpdateHelper.Callback {
|
||||
|
||||
protected abstract fun show()
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.text.TextUtils
|
|||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.activities.tageditor.AbsTagEditorActivity
|
||||
|
@ -29,7 +30,7 @@ import kotlinx.android.synthetic.main.shadow_statusbar_toolbar.*
|
|||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
import java.io.FileNotFoundException
|
||||
|
||||
abstract class AbsPlayerFragment : AbsMusicServiceFragment(),
|
||||
abstract class AbsPlayerFragment(@LayoutRes layout: Int) : AbsMusicServiceFragment(layout),
|
||||
Toolbar.OnMenuItemClickListener,
|
||||
PaletteColorHolder,
|
||||
PlayerAlbumCoverFragment.Callbacks {
|
||||
|
|
|
@ -7,8 +7,8 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.util.RetroUtil
|
||||
|
||||
abstract class AbsLibraryPagerRecyclerViewCustomGridSizeFragment<A : RecyclerView.Adapter<*>, LM : RecyclerView.LayoutManager> :
|
||||
AbsLibraryPagerRecyclerViewFragment<A, LM>() {
|
||||
abstract class AbsRecyclerViewCustomGridSizeFragment<A : RecyclerView.Adapter<*>, LM : RecyclerView.LayoutManager> :
|
||||
AbsRecyclerViewFragment<A, LM>() {
|
||||
|
||||
private var gridSize: Int = 0
|
||||
private var sortOrder: String? = null
|
|
@ -1,14 +1,13 @@
|
|||
package code.name.monkey.retromusic.fragments.base
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.NonNull
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.activities.MainActivity
|
||||
import code.name.monkey.retromusic.fragments.LibraryViewModel
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.util.DensityUtil
|
||||
|
@ -18,19 +17,24 @@ import com.google.android.material.appbar.AppBarLayout
|
|||
import kotlinx.android.synthetic.main.fragment_main_activity_recycler_view.*
|
||||
import me.zhanghai.android.fastscroll.FastScroller
|
||||
import me.zhanghai.android.fastscroll.FastScrollerBuilder
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
||||
abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : RecyclerView.LayoutManager> :
|
||||
AbsLibraryPagerFragment(), AppBarLayout.OnOffsetChangedListener {
|
||||
abstract class AbsRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : RecyclerView.LayoutManager> :
|
||||
AbsMusicServiceFragment(R.layout.fragment_main_activity_recycler_view),
|
||||
AppBarLayout.OnOffsetChangedListener {
|
||||
|
||||
val libraryViewModel: LibraryViewModel by sharedViewModel()
|
||||
val mainActivity: MainActivity
|
||||
get() = requireActivity() as MainActivity
|
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
setHasOptionsMenu(true)
|
||||
}
|
||||
|
||||
protected var adapter: A? = null
|
||||
protected var layoutManager: LM? = null
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_main_activity_recycler_view, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
@ -94,7 +98,6 @@ abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>,
|
|||
}
|
||||
|
||||
|
||||
|
||||
private fun initLayoutManager() {
|
||||
layoutManager = createLayoutManager()
|
||||
}
|
|
@ -106,6 +106,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
|||
private RecyclerView recyclerView;
|
||||
|
||||
public FoldersFragment() {
|
||||
super(R.layout.fragment_folder);
|
||||
}
|
||||
|
||||
public static File getDefaultStartDirectory() {
|
||||
|
|
|
@ -20,15 +20,15 @@ import androidx.lifecycle.Observer
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.GenreAdapter
|
||||
import code.name.monkey.retromusic.fragments.LibraryViewModel
|
||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewFragment
|
||||
import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewFragment
|
||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
||||
class GenresFragment : AbsLibraryPagerRecyclerViewFragment<GenreAdapter, LinearLayoutManager>(),
|
||||
class GenresFragment : AbsRecyclerViewFragment<GenreAdapter, LinearLayoutManager>(),
|
||||
MainActivityFragmentCallbacks {
|
||||
|
||||
private val libraryViewModel: LibraryViewModel by sharedViewModel()
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
@ -42,9 +42,6 @@ class GenresFragment : AbsLibraryPagerRecyclerViewFragment<GenreAdapter, LinearL
|
|||
})
|
||||
}
|
||||
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun createLayoutManager(): LinearLayoutManager {
|
||||
return LinearLayoutManager(activity)
|
||||
|
|
|
@ -17,9 +17,7 @@ package code.name.monkey.retromusic.fragments.home
|
|||
import android.app.ActivityOptions
|
||||
import android.os.Bundle
|
||||
import android.util.DisplayMetrics
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import code.name.monkey.retromusic.R
|
||||
|
@ -42,23 +40,16 @@ import kotlinx.android.synthetic.main.fragment_banner_home.*
|
|||
import kotlinx.android.synthetic.main.home_content.*
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
||||
class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallbacks {
|
||||
class BannerHomeFragment :
|
||||
AbsMainActivityFragment(if (PreferenceUtil.isHomeBanner) R.layout.fragment_banner_home else R.layout.fragment_home),
|
||||
MainActivityFragmentCallbacks {
|
||||
|
||||
private lateinit var homeAdapter: HomeAdapter
|
||||
private val libraryViewModel: LibraryViewModel by sharedViewModel()
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
viewGroup: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(
|
||||
if (PreferenceUtil.isHomeBanner) R.layout.fragment_banner_home else R.layout.fragment_home,
|
||||
viewGroup,
|
||||
false
|
||||
)
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
private val libraryViewModel: LibraryViewModel by sharedViewModel()
|
||||
|
||||
private val displayMetrics: DisplayMetrics
|
||||
get() {
|
||||
val display = mainActivity.windowManager.defaultDisplay
|
||||
|
@ -110,7 +101,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
|||
}
|
||||
titleWelcome?.text = String.format("%s", PreferenceUtil.userName)
|
||||
|
||||
homeAdapter = HomeAdapter(mainActivity, displayMetrics)
|
||||
val homeAdapter = HomeAdapter(mainActivity, displayMetrics)
|
||||
recyclerView.apply {
|
||||
layoutManager = LinearLayoutManager(mainActivity)
|
||||
adapter = homeAdapter
|
||||
|
@ -124,10 +115,6 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
|||
loadProfile()
|
||||
}
|
||||
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
private fun loadProfile() {
|
||||
bannerImage?.let {
|
||||
ProfileBannerGlideRequest.Builder.from(
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
package code.name.monkey.retromusic.fragments.main
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.fragments.base.AbsMusicServiceFragment
|
||||
|
||||
class MainFragment : AbsMusicServiceFragment() {
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_main, container, false)
|
||||
}
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
package code.name.monkey.retromusic.fragments.player
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.navigation.NavController
|
||||
import code.name.monkey.retromusic.R
|
||||
|
@ -16,13 +15,11 @@ class NowPlayingPlayerFragment : Fragment(R.layout.fragment_now_playing_player)
|
|||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
Log.i(TAG, "onActivityCreated: ")
|
||||
val navController = navController(R.id.playerFragmentContainer)
|
||||
updateNowPlaying(navController)
|
||||
}
|
||||
|
||||
private fun updateNowPlaying(navController: NavController) {
|
||||
Log.i(TAG, "updateNowPlaying: ${PreferenceUtil.nowPlayingScreen}")
|
||||
when (PreferenceUtil.nowPlayingScreen) {
|
||||
Adaptive -> navController.navigate(R.id.adaptiveFragment)
|
||||
Blur -> navController.navigate(R.id.blurPlayerFragment)
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package code.name.monkey.retromusic.fragments.player
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.album.AlbumCoverPagerAdapter
|
||||
|
@ -13,13 +11,13 @@ import code.name.monkey.retromusic.fragments.base.AbsMusicServiceFragment
|
|||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.transform.CarousalPagerTransformer
|
||||
import code.name.monkey.retromusic.transform.ParallaxPagerTransformer
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_player_album_cover.*
|
||||
|
||||
|
||||
class PlayerAlbumCoverFragment : AbsMusicServiceFragment(), ViewPager.OnPageChangeListener {
|
||||
class PlayerAlbumCoverFragment : AbsMusicServiceFragment(R.layout.fragment_player_album_cover),
|
||||
ViewPager.OnPageChangeListener {
|
||||
private var callbacks: Callbacks? = null
|
||||
private var currentPosition: Int = 0
|
||||
private val colorReceiver = object : AlbumCoverFragment.ColorReceiver {
|
||||
|
@ -35,13 +33,6 @@ class PlayerAlbumCoverFragment : AbsMusicServiceFragment(), ViewPager.OnPageChan
|
|||
transformer.setSpeed(0.3f)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_player_album_cover, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
viewPager.addOnPageChangeListener(this)
|
||||
|
@ -50,7 +41,7 @@ class PlayerAlbumCoverFragment : AbsMusicServiceFragment(), ViewPager.OnPageChan
|
|||
val metrics = resources.displayMetrics
|
||||
val ratio = metrics.heightPixels.toFloat() / metrics.widthPixels.toFloat()
|
||||
|
||||
if (nps == Full || nps == Classic || nps == Fit || nps == Gradient ) {
|
||||
if (nps == Full || nps == Classic || nps == Fit || nps == Gradient) {
|
||||
viewPager.offscreenPageLimit = 2
|
||||
} else if (PreferenceUtil.isCarouselEffect) {
|
||||
viewPager.clipToPadding = false
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package code.name.monkey.retromusic.fragments.player.adaptive
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -18,7 +16,7 @@ import code.name.monkey.retromusic.model.Song
|
|||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_adaptive_player.*
|
||||
|
||||
class AdaptiveFragment : AbsPlayerFragment() {
|
||||
class AdaptiveFragment : AbsPlayerFragment(R.layout.fragment_adaptive_player) {
|
||||
|
||||
override fun playerToolbar(): Toolbar {
|
||||
return playerToolbar
|
||||
|
@ -27,14 +25,6 @@ class AdaptiveFragment : AbsPlayerFragment() {
|
|||
private var lastColor: Int = 0
|
||||
private lateinit var playbackControlsFragment: AdaptivePlaybackControlsFragment
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_adaptive_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpSubFragments()
|
||||
|
|
|
@ -30,7 +30,8 @@ import code.name.monkey.retromusic.util.PreferenceUtil
|
|||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_adaptive_player_playback_controls.*
|
||||
|
||||
class AdaptivePlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||
class AdaptivePlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_adaptive_player_playback_controls) {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
|
|
@ -4,9 +4,7 @@ import android.animation.ObjectAnimator
|
|||
import android.graphics.Color
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.AccelerateInterpolator
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import android.view.animation.LinearInterpolator
|
||||
|
@ -29,7 +27,8 @@ import code.name.monkey.retromusic.util.PreferenceUtil
|
|||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.*
|
||||
|
||||
class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||
class BlurPlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_blur_player_playback_controls) {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
@ -40,14 +39,6 @@ class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_blur_player_playback_controls, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
|
|
@ -3,9 +3,7 @@ package code.name.monkey.retromusic.fragments.player.blur
|
|||
import android.content.SharedPreferences
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.preference.PreferenceManager
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -22,7 +20,8 @@ import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
|||
import com.bumptech.glide.Glide
|
||||
import kotlinx.android.synthetic.main.fragment_blur.*
|
||||
|
||||
class BlurPlayerFragment : AbsPlayerFragment(), SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
class BlurPlayerFragment : AbsPlayerFragment(R.layout.fragment_blur),
|
||||
SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
|
||||
override fun playerToolbar(): Toolbar {
|
||||
return playerToolbar
|
||||
|
@ -32,12 +31,6 @@ class BlurPlayerFragment : AbsPlayerFragment(), SharedPreferences.OnSharedPrefer
|
|||
|
||||
private var lastColor: Int = 0
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_blur, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
|
|
@ -2,9 +2,7 @@ package code.name.monkey.retromusic.fragments.player.card
|
|||
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
import code.name.monkey.retromusic.R
|
||||
|
@ -16,7 +14,7 @@ import code.name.monkey.retromusic.model.Song
|
|||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_card_player.*
|
||||
|
||||
class CardFragment : AbsPlayerFragment() {
|
||||
class CardFragment : AbsPlayerFragment(R.layout.fragment_card_player) {
|
||||
override fun playerToolbar(): Toolbar {
|
||||
return playerToolbar
|
||||
}
|
||||
|
@ -62,14 +60,6 @@ class CardFragment : AbsPlayerFragment() {
|
|||
toggleFavorite(MusicPlayerRemote.currentSong)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
return inflater.inflate(R.layout.fragment_card_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpSubFragments()
|
||||
|
|
|
@ -3,9 +3,7 @@ package code.name.monkey.retromusic.fragments.player.card
|
|||
import android.animation.ObjectAnimator
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
|
@ -24,13 +22,13 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
|||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_card_player_playback_controls.*
|
||||
import kotlinx.android.synthetic.main.media_button.*
|
||||
|
||||
class CardPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||
class CardPlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_card_player_playback_controls) {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
@ -41,12 +39,6 @@ class CardPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_card_player_playback_controls, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
|
|
@ -3,9 +3,7 @@ package code.name.monkey.retromusic.fragments.player.cardblur
|
|||
import android.content.SharedPreferences
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.preference.PreferenceManager
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -19,12 +17,12 @@ import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
|
|||
import code.name.monkey.retromusic.glide.SongGlideRequest
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import com.bumptech.glide.Glide
|
||||
import kotlinx.android.synthetic.main.fragment_card_blur_player.*
|
||||
|
||||
class CardBlurFragment : AbsPlayerFragment(), SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
class CardBlurFragment : AbsPlayerFragment(R.layout.fragment_card_blur_player),
|
||||
SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
override fun playerToolbar(): Toolbar {
|
||||
return playerToolbar
|
||||
}
|
||||
|
@ -72,13 +70,6 @@ class CardBlurFragment : AbsPlayerFragment(), SharedPreferences.OnSharedPreferen
|
|||
toggleFavorite(MusicPlayerRemote.currentSong)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
return inflater.inflate(R.layout.fragment_card_blur_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
|
|
@ -4,9 +4,7 @@ import android.animation.ObjectAnimator
|
|||
import android.graphics.Color
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
|
@ -24,12 +22,12 @@ import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
|||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_card_blur_player_playback_controls.*
|
||||
import kotlinx.android.synthetic.main.media_button.*
|
||||
|
||||
class CardBlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||
class CardBlurPlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_card_blur_player_playback_controls) {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
@ -40,18 +38,6 @@ class CardBlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
return inflater.inflate(
|
||||
R.layout.fragment_card_blur_player_playback_controls,
|
||||
container,
|
||||
false
|
||||
)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
|
|
@ -58,7 +58,8 @@ import kotlinx.android.synthetic.main.fragment_circle_player.*
|
|||
* Created by hemanths on 2020-01-06.
|
||||
*/
|
||||
|
||||
class CirclePlayerFragment : AbsPlayerFragment(), Callback, OnAudioVolumeChangedListener,
|
||||
class CirclePlayerFragment : AbsPlayerFragment(R.layout.fragment_circle_player), Callback,
|
||||
OnAudioVolumeChangedListener,
|
||||
OnSeekArcChangeListener {
|
||||
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
|
|
|
@ -6,9 +6,7 @@ import android.content.res.ColorStateList
|
|||
import android.graphics.Color
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
@ -37,7 +35,6 @@ import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
|||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.ViewUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
|
@ -53,7 +50,8 @@ import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils
|
|||
import kotlinx.android.synthetic.main.fragment_classic_controls.*
|
||||
import kotlinx.android.synthetic.main.fragment_classic_player.*
|
||||
|
||||
class ClassicPlayerFragment : AbsPlayerFragment(), View.OnLayoutChangeListener,
|
||||
class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player),
|
||||
View.OnLayoutChangeListener,
|
||||
MusicProgressViewUpdateHelper.Callback {
|
||||
|
||||
private var lastColor: Int = 0
|
||||
|
@ -107,14 +105,6 @@ class ClassicPlayerFragment : AbsPlayerFragment(), View.OnLayoutChangeListener,
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_classic_player, container, false)
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
|
|
@ -3,9 +3,7 @@ package code.name.monkey.retromusic.fragments.player.color
|
|||
import android.animation.ValueAnimator
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
|
@ -18,7 +16,7 @@ import code.name.monkey.retromusic.model.Song
|
|||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_color_player.*
|
||||
|
||||
class ColorFragment : AbsPlayerFragment() {
|
||||
class ColorFragment : AbsPlayerFragment(R.layout.fragment_color_player) {
|
||||
|
||||
private var lastColor: Int = 0
|
||||
private var navigationColor: Int = 0
|
||||
|
@ -85,14 +83,6 @@ class ColorFragment : AbsPlayerFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_color_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpSubFragments()
|
||||
|
|
|
@ -28,7 +28,8 @@ import code.name.monkey.retromusic.util.PreferenceUtil
|
|||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_color_player_playback_controls.*
|
||||
|
||||
class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||
class ColorPlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_adaptive_player_playback_controls) {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package code.name.monkey.retromusic.fragments.player.fit
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -15,7 +13,7 @@ import code.name.monkey.retromusic.model.Song
|
|||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_fit.*
|
||||
|
||||
class FitFragment : AbsPlayerFragment() {
|
||||
class FitFragment : AbsPlayerFragment(R.layout.fragment_fit) {
|
||||
override fun playerToolbar(): Toolbar {
|
||||
return playerToolbar
|
||||
}
|
||||
|
@ -65,14 +63,6 @@ class FitFragment : AbsPlayerFragment() {
|
|||
toggleFavorite(MusicPlayerRemote.currentSong)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
return inflater.inflate(R.layout.fragment_fit, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpSubFragments()
|
||||
|
|
|
@ -31,7 +31,8 @@ import code.name.monkey.retromusic.util.PreferenceUtil
|
|||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_fit_playback_controls.*
|
||||
|
||||
class FitPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||
class FitPlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_fit_playback_controls) {
|
||||
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
|
@ -43,13 +44,6 @@ class FitPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
return inflater.inflate(R.layout.fragment_fit_playback_controls, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
|
|
@ -3,9 +3,7 @@ package code.name.monkey.retromusic.fragments.player.flat
|
|||
import android.animation.ObjectAnimator
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
|
@ -27,12 +25,12 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
|||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_flat_player_playback_controls.*
|
||||
|
||||
class FlatPlaybackControlsFragment : AbsPlayerControlsFragment(), Callback {
|
||||
class FlatPlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_flat_player_playback_controls), Callback {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
@ -43,13 +41,6 @@ class FlatPlaybackControlsFragment : AbsPlayerControlsFragment(), Callback {
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_flat_player_playback_controls, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
|
|
@ -4,9 +4,7 @@ import android.animation.ArgbEvaluator
|
|||
import android.animation.ValueAnimator
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
|
@ -17,14 +15,13 @@ import code.name.monkey.retromusic.fragments.base.AbsPlayerFragment
|
|||
import code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.ViewUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import code.name.monkey.retromusic.views.DrawableGradient
|
||||
import kotlinx.android.synthetic.main.fragment_flat_player.*
|
||||
|
||||
class FlatPlayerFragment : AbsPlayerFragment() {
|
||||
class FlatPlayerFragment : AbsPlayerFragment(R.layout.fragment_flat_player) {
|
||||
override fun playerToolbar(): Toolbar {
|
||||
return playerToolbar
|
||||
}
|
||||
|
@ -71,13 +68,6 @@ class FlatPlayerFragment : AbsPlayerFragment() {
|
|||
valueAnimator?.setDuration(ViewUtil.RETRO_MUSIC_ANIM_TIME.toLong())?.start()
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_flat_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpPlayerToolbar()
|
||||
|
|
|
@ -7,10 +7,8 @@ import android.graphics.Color
|
|||
import android.graphics.PorterDuff
|
||||
import android.os.AsyncTask
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.PopupMenu
|
||||
|
@ -30,7 +28,6 @@ import code.name.monkey.retromusic.model.Song
|
|||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_full_player_controls.*
|
||||
|
||||
|
@ -38,7 +35,8 @@ import kotlinx.android.synthetic.main.fragment_full_player_controls.*
|
|||
* Created by hemanths on 20/09/17.
|
||||
*/
|
||||
|
||||
class FullPlaybackControlsFragment : AbsPlayerControlsFragment(),
|
||||
class FullPlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_full_player_controls),
|
||||
PopupMenu.OnMenuItemClickListener {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
|
@ -50,14 +48,6 @@ class FullPlaybackControlsFragment : AbsPlayerControlsFragment(),
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_full_player_controls, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
|
|
@ -4,9 +4,7 @@ import android.app.ActivityOptions
|
|||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
|
@ -33,7 +31,8 @@ import kotlinx.coroutines.Dispatchers
|
|||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class FullPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Callback {
|
||||
class FullPlayerFragment : AbsPlayerFragment(R.layout.fragment_full),
|
||||
MusicProgressViewUpdateHelper.Callback {
|
||||
private lateinit var lyricsLayout: FrameLayout
|
||||
private lateinit var lyricsLine1: TextView
|
||||
private lateinit var lyricsLine2: TextView
|
||||
|
@ -134,13 +133,6 @@ class FullPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Ca
|
|||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_full, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
lyricsLayout = view.findViewById(R.id.playerLyrics)
|
||||
|
|
|
@ -7,9 +7,7 @@ import android.graphics.Color
|
|||
import android.graphics.PorterDuff
|
||||
import android.os.AsyncTask
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.PopupMenu
|
||||
import android.widget.SeekBar
|
||||
|
@ -51,7 +49,8 @@ import kotlinx.android.synthetic.main.fragment_gradient_controls.*
|
|||
import kotlinx.android.synthetic.main.fragment_gradient_player.*
|
||||
import kotlinx.android.synthetic.main.status_bar.*
|
||||
|
||||
class GradientPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Callback,
|
||||
class GradientPlayerFragment : AbsPlayerFragment(R.layout.fragment_gradient_player),
|
||||
MusicProgressViewUpdateHelper.Callback,
|
||||
View.OnLayoutChangeListener, PopupMenu.OnMenuItemClickListener {
|
||||
private var lastColor: Int = 0
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
|
@ -124,13 +123,6 @@ class GradientPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelpe
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_gradient_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
@ -283,6 +275,7 @@ class GradientPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelpe
|
|||
super.onQueueChanged()
|
||||
updateLabel()
|
||||
}
|
||||
|
||||
private fun updateSong() {
|
||||
val song = MusicPlayerRemote.currentSong
|
||||
title.text = song.title
|
||||
|
@ -485,35 +478,36 @@ class GradientPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelpe
|
|||
songTotalTime.text = MusicUtil.getReadableDurationString(total.toLong())
|
||||
songCurrentProgress.text = MusicUtil.getReadableDurationString(progress.toLong())
|
||||
}
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private fun updateFavorite() {
|
||||
if (updateIsFavoriteTask != null) {
|
||||
updateIsFavoriteTask?.cancel(false)
|
||||
}
|
||||
updateIsFavoriteTask =
|
||||
object : AsyncTask<Song, Void, Boolean>() {
|
||||
override fun doInBackground(vararg params: Song): Boolean? {
|
||||
val activity = activity
|
||||
return if (activity != null) {
|
||||
MusicUtil.isFavorite(requireActivity(), params[0])
|
||||
} else {
|
||||
cancel(false)
|
||||
null
|
||||
object : AsyncTask<Song, Void, Boolean>() {
|
||||
override fun doInBackground(vararg params: Song): Boolean? {
|
||||
val activity = activity
|
||||
return if (activity != null) {
|
||||
MusicUtil.isFavorite(requireActivity(), params[0])
|
||||
} else {
|
||||
cancel(false)
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPostExecute(isFavorite: Boolean?) {
|
||||
val activity = activity
|
||||
if (activity != null) {
|
||||
val res = if (isFavorite!!)
|
||||
R.drawable.ic_favorite
|
||||
else
|
||||
R.drawable.ic_favorite_border
|
||||
override fun onPostExecute(isFavorite: Boolean?) {
|
||||
val activity = activity
|
||||
if (activity != null) {
|
||||
val res = if (isFavorite!!)
|
||||
R.drawable.ic_favorite
|
||||
else
|
||||
R.drawable.ic_favorite_border
|
||||
|
||||
val drawable = TintHelper.createTintedDrawable(activity, res, Color.WHITE)
|
||||
songFavourite?.setImageDrawable(drawable)
|
||||
val drawable = TintHelper.createTintedDrawable(activity, res, Color.WHITE)
|
||||
songFavourite?.setImageDrawable(drawable)
|
||||
}
|
||||
}
|
||||
}
|
||||
}.execute(MusicPlayerRemote.currentSong)
|
||||
}.execute(MusicPlayerRemote.currentSong)
|
||||
}
|
||||
}
|
|
@ -2,9 +2,7 @@ package code.name.monkey.retromusic.fragments.player.home
|
|||
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -18,7 +16,8 @@ import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
|||
import kotlinx.android.synthetic.main.fragment_home_player.*
|
||||
|
||||
|
||||
class HomePlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Callback {
|
||||
class HomePlayerFragment : AbsPlayerFragment(R.layout.fragment_home_player),
|
||||
MusicProgressViewUpdateHelper.Callback {
|
||||
private var lastColor: Int = 0
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
|
||||
|
@ -27,14 +26,6 @@ class HomePlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Ca
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_home_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpPlayerToolbar()
|
||||
|
|
|
@ -17,9 +17,7 @@ package code.name.monkey.retromusic.fragments.player.lockscreen
|
|||
import android.animation.ObjectAnimator
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
|
@ -38,7 +36,6 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
|||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_lock_screen_playback_controls.*
|
||||
|
@ -46,7 +43,8 @@ import kotlinx.android.synthetic.main.fragment_lock_screen_playback_controls.*
|
|||
/**
|
||||
* @author Hemanth S (h4h13).
|
||||
*/
|
||||
class LockScreenPlayerControlsFragment : AbsPlayerControlsFragment() {
|
||||
class LockScreenPlayerControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_lock_screen_playback_controls) {
|
||||
|
||||
private var progressViewUpdateHelper: MusicProgressViewUpdateHelper? = null
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
|
@ -57,14 +55,6 @@ class LockScreenPlayerControlsFragment : AbsPlayerControlsFragment() {
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
return inflater.inflate(R.layout.fragment_lock_screen_playback_controls, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
|
|
@ -3,9 +3,7 @@ package code.name.monkey.retromusic.fragments.player.material
|
|||
import android.animation.ObjectAnimator
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
|
@ -19,7 +17,6 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
|||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_material_playback_controls.*
|
||||
|
@ -27,7 +24,8 @@ import kotlinx.android.synthetic.main.fragment_material_playback_controls.*
|
|||
/**
|
||||
* @author Hemanth S (h4h13).
|
||||
*/
|
||||
class MaterialControlsFragment : AbsPlayerControlsFragment() {
|
||||
class MaterialControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_material_playback_controls) {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
@ -38,13 +36,6 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_material_playback_controls, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package code.name.monkey.retromusic.fragments.player.material
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -19,7 +17,7 @@ import kotlinx.android.synthetic.main.fragment_material.*
|
|||
/**
|
||||
* @author Hemanth S (h4h13).
|
||||
*/
|
||||
class MaterialFragment : AbsPlayerFragment() {
|
||||
class MaterialFragment : AbsPlayerFragment(R.layout.fragment_material) {
|
||||
|
||||
override fun playerToolbar(): Toolbar {
|
||||
return playerToolbar
|
||||
|
@ -72,13 +70,6 @@ class MaterialFragment : AbsPlayerFragment() {
|
|||
toggleFavorite(MusicPlayerRemote.currentSong)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_material, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpSubFragments()
|
||||
|
|
|
@ -4,9 +4,7 @@ import android.animation.ArgbEvaluator
|
|||
import android.animation.ValueAnimator
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -15,7 +13,6 @@ import code.name.monkey.retromusic.fragments.base.AbsPlayerFragment
|
|||
import code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.ViewUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
|
@ -23,7 +20,7 @@ import code.name.monkey.retromusic.views.DrawableGradient
|
|||
import kotlinx.android.synthetic.main.fragment_player.*
|
||||
|
||||
|
||||
class PlayerFragment : AbsPlayerFragment() {
|
||||
class PlayerFragment : AbsPlayerFragment(R.layout.fragment_player) {
|
||||
|
||||
private var lastColor: Int = 0
|
||||
override val paletteColor: Int
|
||||
|
@ -103,14 +100,6 @@ class PlayerFragment : AbsPlayerFragment() {
|
|||
}
|
||||
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
return inflater.inflate(R.layout.fragment_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpSubFragments()
|
||||
|
|
|
@ -3,9 +3,7 @@ package code.name.monkey.retromusic.fragments.player.normal
|
|||
import android.animation.ObjectAnimator
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
|
@ -26,12 +24,12 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
|||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
|
||||
|
||||
class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||
class PlayerPlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_player_playback_controls) {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
@ -42,13 +40,6 @@ class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_player_playback_controls, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
|
|
@ -18,9 +18,7 @@ import android.animation.ObjectAnimator
|
|||
import android.graphics.Color
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
|
@ -36,7 +34,6 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
|||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_peak_control_player.*
|
||||
|
@ -45,7 +42,7 @@ import kotlinx.android.synthetic.main.fragment_peak_control_player.*
|
|||
* Created by hemanths on 2019-10-04.
|
||||
*/
|
||||
|
||||
class PeakPlayerControlFragment : AbsPlayerControlsFragment() {
|
||||
class PeakPlayerControlFragment : AbsPlayerControlsFragment(R.layout.fragment_peak_control_player) {
|
||||
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
|
@ -66,14 +63,6 @@ class PeakPlayerControlFragment : AbsPlayerControlsFragment() {
|
|||
progressViewUpdateHelper.stop()
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_peak_control_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(
|
||||
view: View,
|
||||
savedInstanceState: Bundle?
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
package code.name.monkey.retromusic.fragments.player.peak
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -28,7 +26,6 @@ import code.name.monkey.retromusic.fragments.base.AbsPlayerFragment
|
|||
import code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_peak_player.*
|
||||
|
||||
|
@ -36,19 +33,11 @@ import kotlinx.android.synthetic.main.fragment_peak_player.*
|
|||
* Created by hemanths on 2019-10-03.
|
||||
*/
|
||||
|
||||
class PeakPlayerFragment : AbsPlayerFragment() {
|
||||
class PeakPlayerFragment : AbsPlayerFragment(R.layout.fragment_peak_player) {
|
||||
|
||||
private lateinit var controlsFragment: PeakPlayerControlFragment
|
||||
private var lastColor: Int = 0
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_peak_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpPlayerToolbar()
|
||||
|
|
|
@ -3,9 +3,7 @@ package code.name.monkey.retromusic.fragments.player.plain
|
|||
import android.animation.ObjectAnimator
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.AccelerateInterpolator
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import android.view.animation.LinearInterpolator
|
||||
|
@ -26,7 +24,6 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
|||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_adaptive_player_playback_controls.*
|
||||
|
@ -43,7 +40,8 @@ import kotlinx.android.synthetic.main.fragment_plain_controls_fragment.songTotal
|
|||
* @author Hemanth S (h4h13).
|
||||
*/
|
||||
|
||||
class PlainPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||
class PlainPlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_plain_controls_fragment) {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
@ -87,14 +85,6 @@ class PlainPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
return inflater.inflate(R.layout.fragment_plain_controls_fragment, container, false)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package code.name.monkey.retromusic.fragments.player.plain
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -15,7 +13,7 @@ import code.name.monkey.retromusic.model.Song
|
|||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_plain_player.*
|
||||
|
||||
class PlainPlayerFragment : AbsPlayerFragment() {
|
||||
class PlainPlayerFragment : AbsPlayerFragment(R.layout.fragment_plain_player) {
|
||||
override fun playerToolbar(): Toolbar {
|
||||
return playerToolbar
|
||||
}
|
||||
|
@ -41,13 +39,6 @@ class PlainPlayerFragment : AbsPlayerFragment() {
|
|||
updateSong()
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_plain_player, container, false)
|
||||
}
|
||||
|
||||
private fun setUpPlayerToolbar() {
|
||||
playerToolbar.apply {
|
||||
inflateMenu(R.menu.menu_player)
|
||||
|
|
|
@ -2,9 +2,7 @@ package code.name.monkey.retromusic.fragments.player.simple
|
|||
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
|
@ -20,7 +18,6 @@ import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
|||
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_simple_controls_fragment.*
|
||||
|
@ -29,7 +26,8 @@ import kotlinx.android.synthetic.main.fragment_simple_controls_fragment.*
|
|||
* @author Hemanth S (h4h13).
|
||||
*/
|
||||
|
||||
class SimplePlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||
class SimplePlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_simple_controls_fragment) {
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
@ -59,14 +57,6 @@ class SimplePlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_simple_controls_fragment, container, false)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
progressViewUpdateHelper.start()
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package code.name.monkey.retromusic.fragments.player.simple
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -19,7 +17,7 @@ import kotlinx.android.synthetic.main.fragment_simple_player.*
|
|||
* @author Hemanth S (h4h13).
|
||||
*/
|
||||
|
||||
class SimplePlayerFragment : AbsPlayerFragment() {
|
||||
class SimplePlayerFragment : AbsPlayerFragment(R.layout.fragment_simple_player) {
|
||||
|
||||
override fun playerToolbar(): Toolbar {
|
||||
return playerToolbar
|
||||
|
@ -31,13 +29,6 @@ class SimplePlayerFragment : AbsPlayerFragment() {
|
|||
|
||||
private lateinit var controlsFragment: SimplePlaybackControlsFragment
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
|
||||
return inflater.inflate(R.layout.fragment_simple_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
|
|
@ -2,9 +2,7 @@ package code.name.monkey.retromusic.fragments.player.tiny
|
|||
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment
|
||||
|
@ -13,7 +11,8 @@ import code.name.monkey.retromusic.service.MusicService
|
|||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_tiny_controls_fragment.*
|
||||
|
||||
class TinyPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||
class TinyPlaybackControlsFragment :
|
||||
AbsPlayerControlsFragment(R.layout.fragment_tiny_controls_fragment) {
|
||||
|
||||
override fun show() {
|
||||
}
|
||||
|
@ -38,13 +37,6 @@ class TinyPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_tiny_controls_fragment, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
|
|
@ -4,9 +4,7 @@ import android.animation.AnimatorSet
|
|||
import android.animation.ObjectAnimator
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.LinearInterpolator
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -22,12 +20,12 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
|||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.ViewUtil
|
||||
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
||||
import kotlinx.android.synthetic.main.fragment_tiny_player.*
|
||||
|
||||
class TinyPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Callback {
|
||||
class TinyPlayerFragment : AbsPlayerFragment(R.layout.fragment_tiny_player),
|
||||
MusicProgressViewUpdateHelper.Callback {
|
||||
private var lastColor: Int = 0
|
||||
private var toolbarColor: Int = 0
|
||||
|
||||
|
@ -111,13 +109,6 @@ class TinyPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Ca
|
|||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_tiny_player, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
|
|
@ -8,16 +8,16 @@ import androidx.lifecycle.Observer
|
|||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.playlist.PlaylistAdapter
|
||||
import code.name.monkey.retromusic.fragments.LibraryViewModel
|
||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewFragment
|
||||
import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewFragment
|
||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
||||
class PlaylistsFragment :
|
||||
AbsLibraryPagerRecyclerViewFragment<PlaylistAdapter, GridLayoutManager>(),
|
||||
AbsRecyclerViewFragment<PlaylistAdapter, GridLayoutManager>() ,
|
||||
MainActivityFragmentCallbacks {
|
||||
|
||||
private val libraryViewModel: LibraryViewModel by sharedViewModel()
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
@ -30,10 +30,6 @@ class PlaylistsFragment :
|
|||
})
|
||||
}
|
||||
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override val emptyMessage: Int
|
||||
get() = R.string.no_playlists
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||
import androidx.recyclerview.widget.RecyclerView
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.song.PlayingQueueAdapter
|
||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewFragment
|
||||
import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewFragment
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
|
||||
import com.h6ah4i.android.widget.advrecyclerview.animator.DraggableItemAnimator
|
||||
|
@ -34,7 +34,7 @@ import kotlinx.android.synthetic.main.activity_playing_queue.*
|
|||
* Created by hemanths on 2019-12-08.
|
||||
*/
|
||||
class PlayingQueueFragment :
|
||||
AbsLibraryPagerRecyclerViewFragment<PlayingQueueAdapter, LinearLayoutManager>(),
|
||||
AbsRecyclerViewFragment<PlayingQueueAdapter, LinearLayoutManager>(),
|
||||
MainActivityFragmentCallbacks {
|
||||
|
||||
override fun handleBackPress(): Boolean {
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
package code.name.monkey.retromusic.fragments.songs
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.*
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.song.ShuffleButtonSongAdapter
|
||||
import code.name.monkey.retromusic.adapter.song.SongAdapter
|
||||
import code.name.monkey.retromusic.fragments.LibraryViewModel
|
||||
import code.name.monkey.retromusic.fragments.ReloadType
|
||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
|
||||
import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewCustomGridSizeFragment
|
||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
||||
class SongsFragment :
|
||||
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<SongAdapter, GridLayoutManager>(),
|
||||
AbsRecyclerViewCustomGridSizeFragment<SongAdapter, GridLayoutManager>(),
|
||||
MainActivityFragmentCallbacks {
|
||||
|
||||
private val libraryViewModel: LibraryViewModel by sharedViewModel()
|
||||
override fun handleBackPress(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
@ -110,8 +110,71 @@ class SongsFragment :
|
|||
}
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater)
|
||||
setUpGridSizeMenu(menu.findItem(R.id.action_grid_size).subMenu)
|
||||
}
|
||||
|
||||
override fun handleBackPress(): Boolean {
|
||||
private fun setUpGridSizeMenu(
|
||||
|
||||
gridSizeMenu: SubMenu
|
||||
) {
|
||||
println(getGridSize())
|
||||
when (getGridSize()) {
|
||||
1 -> gridSizeMenu.findItem(R.id.action_grid_size_1).isChecked = true
|
||||
2 -> gridSizeMenu.findItem(R.id.action_grid_size_2).isChecked = true
|
||||
3 -> gridSizeMenu.findItem(R.id.action_grid_size_3).isChecked = true
|
||||
4 -> gridSizeMenu.findItem(R.id.action_grid_size_4).isChecked = true
|
||||
5 -> gridSizeMenu.findItem(R.id.action_grid_size_5).isChecked = true
|
||||
6 -> gridSizeMenu.findItem(R.id.action_grid_size_6).isChecked = true
|
||||
7 -> gridSizeMenu.findItem(R.id.action_grid_size_7).isChecked = true
|
||||
8 -> gridSizeMenu.findItem(R.id.action_grid_size_8).isChecked = true
|
||||
}
|
||||
val maxGridSize = maxGridSize
|
||||
if (maxGridSize < 8) {
|
||||
gridSizeMenu.findItem(R.id.action_grid_size_8).isVisible = false
|
||||
}
|
||||
if (maxGridSize < 7) {
|
||||
gridSizeMenu.findItem(R.id.action_grid_size_7).isVisible = false
|
||||
}
|
||||
if (maxGridSize < 6) {
|
||||
gridSizeMenu.findItem(R.id.action_grid_size_6).isVisible = false
|
||||
}
|
||||
if (maxGridSize < 5) {
|
||||
gridSizeMenu.findItem(R.id.action_grid_size_5).isVisible = false
|
||||
}
|
||||
if (maxGridSize < 4) {
|
||||
gridSizeMenu.findItem(R.id.action_grid_size_4).isVisible = false
|
||||
}
|
||||
if (maxGridSize < 3) {
|
||||
gridSizeMenu.findItem(R.id.action_grid_size_3).isVisible = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
if (handleGridSizeMenuItem(item)) return true
|
||||
return super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
||||
fun handleGridSizeMenuItem(
|
||||
item: MenuItem
|
||||
): Boolean {
|
||||
var gridSize = 0
|
||||
when (item.itemId) {
|
||||
R.id.action_grid_size_1 -> gridSize = 1
|
||||
R.id.action_grid_size_2 -> gridSize = 2
|
||||
R.id.action_grid_size_3 -> gridSize = 3
|
||||
R.id.action_grid_size_4 -> gridSize = 4
|
||||
R.id.action_grid_size_5 -> gridSize = 5
|
||||
R.id.action_grid_size_6 -> gridSize = 6
|
||||
R.id.action_grid_size_7 -> gridSize = 7
|
||||
R.id.action_grid_size_8 -> gridSize = 8
|
||||
}
|
||||
if (gridSize > 0) {
|
||||
item.isChecked = true
|
||||
setAndSaveGridSize(gridSize)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,14 +11,11 @@
|
|||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
package code.name.monkey.retromusic.interfaces
|
||||
|
||||
/**
|
||||
* Created by hemanths on 14/08/17.
|
||||
*/
|
||||
|
||||
interface MainActivityFragmentCallbacks {
|
||||
|
||||
internal interface MainActivityFragmentCallbacks {
|
||||
fun handleBackPress(): Boolean
|
||||
}
|
||||
}
|
|
@ -23,6 +23,7 @@ import androidx.core.graphics.BlendModeCompat.SRC_IN
|
|||
import androidx.core.text.HtmlCompat
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||
import code.name.monkey.retromusic.App
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.dialogs.BlacklistFolderChooserDialog
|
||||
import code.name.monkey.retromusic.extensions.colorButtons
|
||||
|
@ -97,12 +98,14 @@ class BlacklistPreferenceDialog : DialogFragment(), BlacklistFolderChooserDialog
|
|||
)
|
||||
)
|
||||
.setPositiveButton(R.string.remove_action) { _, _ ->
|
||||
BlacklistStore.getInstance(requireContext())
|
||||
BlacklistStore.getInstance(App.getContext())
|
||||
.removePath(File(paths[which]))
|
||||
refreshBlacklistData()
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.show().colorButtons()
|
||||
.create()
|
||||
.colorButtons()
|
||||
.show()
|
||||
}
|
||||
.create().colorButtons()
|
||||
}
|
||||
|
@ -110,13 +113,13 @@ class BlacklistPreferenceDialog : DialogFragment(), BlacklistFolderChooserDialog
|
|||
private lateinit var paths: ArrayList<String>
|
||||
|
||||
private fun refreshBlacklistData() {
|
||||
this.paths = BlacklistStore.getInstance(requireContext()).paths
|
||||
this.paths = BlacklistStore.getInstance(App.getContext()).paths
|
||||
val dialog = dialog as MaterialAlertDialogBuilder?
|
||||
dialog?.setItems(paths.toTypedArray(), null)
|
||||
}
|
||||
|
||||
override fun onFolderSelection(dialog: BlacklistFolderChooserDialog, folder: File) {
|
||||
BlacklistStore.getInstance(requireContext()).addPath(folder)
|
||||
BlacklistStore.getInstance(App.getContext()).addPath(folder)
|
||||
refreshBlacklistData()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2019 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -24,7 +23,7 @@
|
|||
android:fillAfter="true"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:startOffset="66"
|
||||
android:duration="50"/>
|
||||
android:duration="50" />
|
||||
<scale
|
||||
android:fromXScale="1.1"
|
||||
android:toXScale="1"
|
||||
|
@ -36,5 +35,5 @@
|
|||
android:fillBefore="true"
|
||||
android:fillAfter="true"
|
||||
android:interpolator="@anim/retro_fragment_fast_out_extra_slow_in"
|
||||
android:duration="300"/>
|
||||
android:duration="300" />
|
||||
</set>
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2019 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -25,7 +24,7 @@
|
|||
android:fillAfter="true"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:startOffset="66"
|
||||
android:duration="50"/>
|
||||
android:duration="50" />
|
||||
<scale
|
||||
android:fromXScale="1"
|
||||
android:toXScale="0.9"
|
||||
|
@ -37,5 +36,5 @@
|
|||
android:fillBefore="true"
|
||||
android:fillAfter="true"
|
||||
android:interpolator="@anim/retro_fragment_fast_out_extra_slow_in"
|
||||
android:duration="300"/>
|
||||
android:duration="300" />
|
||||
</set>
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2019 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -16,5 +15,6 @@
|
|||
-->
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:fromAlpha="0.0" android:toAlpha="1.0"
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0"
|
||||
android:duration="150" />
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2019 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -18,5 +17,4 @@
|
|||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0"
|
||||
android:duration="150"
|
||||
/>
|
||||
android:duration="150" />
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2019 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -15,4 +14,4 @@
|
|||
limitations under the License.
|
||||
-->
|
||||
<!--Taken from https://googleplex-android.googlesource.com/platform/frameworks/base/+/HEAD/core/res/res/interpolator/decelerate_quad.xml-->
|
||||
<decelerateInterpolator/>
|
||||
<decelerateInterpolator />
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2019 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -25,7 +24,7 @@
|
|||
android:fillAfter="true"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:startOffset="35"
|
||||
android:duration="50"/>
|
||||
android:duration="50" />
|
||||
<scale
|
||||
android:fromXScale="1"
|
||||
android:toXScale="1.15"
|
||||
|
@ -37,5 +36,5 @@
|
|||
android:fillBefore="true"
|
||||
android:fillAfter="true"
|
||||
android:interpolator="@anim/retro_fragment_fast_out_extra_slow_in"
|
||||
android:duration="300"/>
|
||||
android:duration="300" />
|
||||
</set>
|
|
@ -1,5 +1,4 @@
|
|||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt">
|
||||
<aapt:attr name="android:drawable">
|
||||
<vector
|
||||
|
@ -12,7 +11,7 @@
|
|||
android:name="path"
|
||||
android:pathData="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z M 12 16.5 C 9.51 16.5 7.5 14.49 7.5 12 C 7.5 9.51 9.51 7.5 12 7.5 C 14.49 7.5 16.5 9.51 16.5 12 C 16.5 14.49 14.49 16.5 12 16.5 Z M 12 11 C 11.45 11 11 11.45 11 12 C 11 12.55 11.45 13 12 13 C 12.55 13 13 12.55 13 12 C 13 11.45 12.55 11 12 11 Z"
|
||||
android:fillColor="#000"
|
||||
android:strokeWidth="1"/>
|
||||
android:strokeWidth="1" />
|
||||
</vector>
|
||||
</aapt:attr>
|
||||
<target android:name="path">
|
||||
|
@ -24,7 +23,7 @@
|
|||
android:valueFrom="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z M 12 16.5 C 9.51 16.5 7.5 14.49 7.5 12 C 7.5 9.51 9.51 7.5 12 7.5 C 14.49 7.5 16.5 9.51 16.5 12 C 16.5 14.49 14.49 16.5 12 16.5 Z M 12 11 C 11.45 11 11 11.45 11 12 C 11 12.55 11.45 13 12 13 C 12.55 13 13 12.55 13 12 C 13 11.45 12.55 11 12 11 Z M 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 L 12 12"
|
||||
android:valueTo="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z M 12 20 C 7.59 20 4 16.41 4 12 C 4 7.59 7.59 4 12 4 C 16.41 4 20 7.59 20 12 C 20 16.41 16.41 20 12 20 Z M 12 7.5 C 9.51 7.5 7.5 9.51 7.5 12 C 7.5 14.49 9.51 16.5 12 16.5 C 14.49 16.5 16.5 14.49 16.5 12 C 16.5 9.51 14.49 7.5 12 7.5 Z M 12 13 C 11.45 13 11 12.55 11 12 C 11 11.45 11.45 11 12 11 C 12.55 11 13 11.45 13 12 C 13 12.55 12.55 13 12 13 L 12 13"
|
||||
android:valueType="pathType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
<objectAnimator
|
||||
android:propertyName="pathData"
|
||||
android:startOffset="200"
|
||||
|
@ -32,7 +31,7 @@
|
|||
android:valueFrom="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z M 12 20 C 7.59 20 4 16.41 4 12 C 4 7.59 7.59 4 12 4 C 16.41 4 20 7.59 20 12 C 20 16.41 16.41 20 12 20 Z M 12 7.5 C 9.51 7.5 7.5 9.51 7.5 12 C 7.5 14.49 9.51 16.5 12 16.5 C 14.49 16.5 16.5 14.49 16.5 12 C 16.5 9.51 14.49 7.5 12 7.5 Z M 12 13 C 12.55 13 13 12.55 13 12 C 13 11.45 12.55 11 12 11 C 11.45 11 11 11.45 11 12 C 11 12.55 11.45 13 12 13 L 12 13"
|
||||
android:valueTo="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z M 12 16.5 C 9.51 16.5 7.5 14.49 7.5 12 C 7.5 9.51 9.51 7.5 12 7.5 C 14.49 7.5 16.5 9.51 16.5 12 C 16.5 14.49 14.49 16.5 12 16.5 Z M 12 11 C 11.45 11 11 11.45 11 12 C 11 12.55 11.45 13 12 13 C 12.55 13 13 12.55 13 12 C 13 11.45 12.55 11 12 11 Z M 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 L 12 12"
|
||||
android:valueType="pathType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</set>
|
||||
</aapt:attr>
|
||||
</target>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt">
|
||||
<aapt:attr name="android:drawable">
|
||||
<vector
|
||||
|
@ -13,7 +12,7 @@
|
|||
android:name="home_data"
|
||||
android:pathData="M 10 19 L 10 14 L 14 14 L 14 19 C 14 19.55 14.45 20 15 20 L 18 20 C 18.55 20 19 19.55 19 19 L 19 12 L 20.7 12 C 21.16 12 21.38 11.43 21.03 11.13 L 12.67 3.6 C 12.29 3.26 11.71 3.26 11.33 3.6 L 2.97 11.13 C 2.63 11.43 2.84 12 3.3 12 L 5 12 L 5 19 C 5 19.55 5.45 20 6 20 L 9 20 C 9.55 20 10 19.55 10 19 Z"
|
||||
android:fillColor="#000"
|
||||
android:strokeWidth="1"/>
|
||||
android:strokeWidth="1" />
|
||||
</group>
|
||||
<group
|
||||
android:name="sun"
|
||||
|
@ -25,7 +24,7 @@
|
|||
android:name="sun_data"
|
||||
android:pathData="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z"
|
||||
android:fillColor="#000"
|
||||
android:strokeWidth="1"/>
|
||||
android:strokeWidth="1" />
|
||||
</group>
|
||||
<group
|
||||
android:name="cloud"
|
||||
|
@ -36,7 +35,7 @@
|
|||
android:name="path"
|
||||
android:pathData="M 19.37 10.04 C 18.68 6.59 15.65 4 12.01 4 C 9.12 4 6.61 5.64 5.36 8.04 C 2.35 8.36 0.01 10.91 0.01 14 C 0.01 17.31 2.7 20 6.01 20 L 19.01 20 C 21.77 20 24.01 17.76 24.01 15 C 24.01 12.36 21.96 10.22 19.37 10.04 Z"
|
||||
android:fillColor="#000"
|
||||
android:strokeWidth="1"/>
|
||||
android:strokeWidth="1" />
|
||||
</group>
|
||||
<group
|
||||
android:name="cloud_1"
|
||||
|
@ -47,7 +46,7 @@
|
|||
<path
|
||||
android:name="cloud_2"
|
||||
android:pathData="M 19.37 10.04 C 18.68 6.59 15.65 4 12.01 4 C 9.12 4 6.61 5.64 5.36 8.04 C 2.35 8.36 0.01 10.91 0.01 14 C 0.01 17.31 2.7 20 6.01 20 L 19.01 20 C 21.77 20 24.01 17.76 24.01 15 C 24.01 12.36 21.96 10.22 19.37 10.04 Z"
|
||||
android:fillColor="#000000"/>
|
||||
android:fillColor="#000000" />
|
||||
</group>
|
||||
</vector>
|
||||
</aapt:attr>
|
||||
|
@ -60,14 +59,14 @@
|
|||
android:valueFrom="-5"
|
||||
android:valueTo="16"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
<objectAnimator
|
||||
android:propertyName="translateY"
|
||||
android:duration="400"
|
||||
android:valueFrom="10"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</set>
|
||||
</aapt:attr>
|
||||
</target>
|
||||
|
@ -79,7 +78,7 @@
|
|||
android:valueFrom="1"
|
||||
android:valueTo="24"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="cloud_1">
|
||||
|
@ -90,7 +89,7 @@
|
|||
android:valueFrom="0"
|
||||
android:valueTo="12"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
</animated-vector>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt">
|
||||
<aapt:attr name="android:drawable">
|
||||
<vector
|
||||
|
@ -13,7 +12,7 @@
|
|||
android:name="note_1"
|
||||
android:pathData="M 12 5 L 12 13.55 C 11.06 13.01 9.9 12.8 8.67 13.23 C 7.33 13.71 6.3 14.9 6.06 16.3 C 5.6 19.04 7.92 21.38 10.65 20.95 C 12.61 20.64 14 18.84 14 16.85 L 14 7 L 16 7 C 17.1 7 18 6.1 18 5 C 18 3.9 17.1 3 16 3 L 14 3 C 12.9 3 12 3.9 12 5 Z"
|
||||
android:fillColor="#000"
|
||||
android:strokeWidth="1"/>
|
||||
android:strokeWidth="1" />
|
||||
</group>
|
||||
<group
|
||||
android:name="group_2"
|
||||
|
@ -24,7 +23,7 @@
|
|||
<path
|
||||
android:name="note_2"
|
||||
android:pathData="M 12 5 L 12 13.55 C 11.06 13.01 9.9 12.8 8.67 13.23 C 7.33 13.71 6.3 14.9 6.06 16.3 C 5.6 19.04 7.92 21.38 10.65 20.95 C 12.61 20.64 14 18.84 14 16.85 L 14 7 L 16 7 C 17.1 7 18 6.1 18 5 C 18 3.9 17.1 3 16 3 L 14 3 C 12.9 3 12 3.9 12 5 Z"
|
||||
android:fillColor="#000000"/>
|
||||
android:fillColor="#000000" />
|
||||
</group>
|
||||
<group
|
||||
android:name="group_3"
|
||||
|
@ -35,7 +34,7 @@
|
|||
<path
|
||||
android:name="path"
|
||||
android:pathData="M 12 5 L 12 13.55 C 11.06 13.01 9.9 12.8 8.67 13.23 C 7.33 13.71 6.3 14.9 6.06 16.3 C 5.6 19.04 7.92 21.38 10.65 20.95 C 12.61 20.64 14 18.84 14 16.85 L 14 7 L 16 7 C 17.1 7 18 6.1 18 5 C 18 3.9 17.1 3 16 3 L 14 3 C 12.9 3 12 3.9 12 5 Z"
|
||||
android:fillColor="#000000"/>
|
||||
android:fillColor="#000000" />
|
||||
</group>
|
||||
</vector>
|
||||
</aapt:attr>
|
||||
|
@ -48,7 +47,7 @@
|
|||
android:valueFrom="-3"
|
||||
android:valueTo="3"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
<objectAnimator
|
||||
android:propertyName="translateY"
|
||||
android:startOffset="125"
|
||||
|
@ -56,7 +55,7 @@
|
|||
android:valueFrom="-1"
|
||||
android:valueTo="-2"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
<objectAnimator
|
||||
android:propertyName="translateY"
|
||||
android:startOffset="225"
|
||||
|
@ -64,7 +63,7 @@
|
|||
android:valueFrom="-1"
|
||||
android:valueTo="0"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</set>
|
||||
</aapt:attr>
|
||||
</target>
|
||||
|
@ -76,7 +75,7 @@
|
|||
android:valueFrom="13"
|
||||
android:valueTo="-11"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="group_3">
|
||||
|
@ -87,7 +86,7 @@
|
|||
android:valueFrom="-1"
|
||||
android:valueTo="15"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="note_2">
|
||||
|
@ -98,7 +97,7 @@
|
|||
android:valueFrom="1"
|
||||
android:valueTo="0"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="path">
|
||||
|
@ -109,7 +108,7 @@
|
|||
android:valueFrom="1"
|
||||
android:valueTo="0"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
</animated-vector>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"/>
|
||||
<vector android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportHeight="24"
|
||||
android:viewportWidth="24"
|
||||
android:width="24dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z" />
|
||||
</vector>
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
app:layout_constraintBottom_toTopOf="@id/playPauseButton"
|
||||
app:layout_constraintStart_toStartOf="@id/repeatButton"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songTotalTime"
|
||||
|
@ -213,6 +213,6 @@
|
|||
app:layout_constraintBottom_toTopOf="@id/playPauseButton"
|
||||
app:layout_constraintEnd_toEndOf="@id/shuffleButton"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -185,7 +185,7 @@
|
|||
app:layout_constraintStart_toEndOf="@id/progressSlider"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songCurrentProgress"
|
||||
|
@ -202,7 +202,7 @@
|
|||
app:layout_constraintStart_toEndOf="@id/guideline"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="156dp"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
>
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="256dp"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
>
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
|
|
|
@ -197,7 +197,7 @@
|
|||
app:layout_constraintBottom_toTopOf="@id/playPauseButton"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songTotalTime"
|
||||
|
@ -209,6 +209,6 @@
|
|||
app:layout_constraintBottom_toTopOf="@id/playPauseButton"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -52,13 +52,10 @@
|
|||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/retro_graph"
|
||||
tools:layout="@layout/fragment_main_activity_recycler_view"
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||
tools:layout="@layout/fragment_main_activity_recycler_view" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
|
@ -21,7 +21,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
|
@ -46,7 +46,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/repeatButton"
|
||||
|
|
102
app/src/main/res/layout/fragment_album_details.xml
Normal file
102
app/src/main/res/layout/fragment_album_details.xml
Normal file
|
@ -0,0 +1,102 @@
|
|||
<?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">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/albumCoverContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:transitionName="@string/transition_album_art"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<code.name.monkey.retromusic.views.RetroShapeableImageView
|
||||
android:id="@+id/artistImage"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/albumCoverContainer"
|
||||
app:retroCornerSize="26dp"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[11]" />
|
||||
|
||||
<code.name.monkey.retromusic.views.BaselineGridTextView
|
||||
android:id="@+id/albumTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="3"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textStyle="bold"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/artistImage"
|
||||
app:layout_constraintTop_toTopOf="@id/artistImage"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<code.name.monkey.retromusic.views.BaselineGridTextView
|
||||
android:id="@+id/albumText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewSubtitle2"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/artistImage"
|
||||
app:layout_constraintTop_toBottomOf="@id/albumTitle"
|
||||
app:lineHeightHint="24sp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
|
||||
<include
|
||||
layout="@layout/activity_album_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/albumText" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -171,7 +171,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songTotalTime"
|
||||
|
@ -185,7 +185,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songInfo"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
|
@ -55,7 +55,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
|
@ -116,7 +116,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
|
@ -117,7 +117,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
|
@ -53,7 +53,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/titleContainer"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
|
@ -50,7 +50,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/titleContainer"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
|
@ -60,7 +60,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playPauseButton"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
|
@ -48,7 +48,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/progressSlider"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/repeatButton"
|
||||
|
|
|
@ -12,46 +12,41 @@
|
|||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
|
||||
app:cardCornerRadius="0dp">
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toStartOf="@id/circle"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:maxLines="@string/grid_size_1"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toStartOf="@id/circle"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:maxLines="@string/grid_size_1"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
<code.name.monkey.retromusic.views.BaselineGridTextView
|
||||
android:id="@android:id/summary"
|
||||
|
@ -67,20 +62,19 @@
|
|||
tools:maxLines="2"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_front_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_front_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.prefs.BorderCircleView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/circle"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<code.name.monkey.appthemehelper.common.prefs.BorderCircleView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/circle"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -11,41 +11,37 @@
|
|||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
|
||||
app:cardCornerRadius="0dp">
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@android:id/title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
app:layout_constraintTop_toTopOf="@android:id/title"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@android:id/title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@android:id/title"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -59,21 +55,20 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toBottomOf="@android:id/title"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
tools:maxLines="2"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_front_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_front_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -12,35 +12,30 @@
|
|||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
|
||||
app:cardCornerRadius="0dp">
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
|
@ -56,12 +51,11 @@
|
|||
tools:maxLines="@string/grid_size_1"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_front_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_front_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -12,45 +12,41 @@
|
|||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
|
||||
app:cardCornerRadius="0dp">
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:maxLines="@string/grid_size_1"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
|
@ -59,12 +55,12 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toBottomOf="@android:id/title"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
tools:maxLines="2"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
|
@ -77,8 +73,6 @@
|
|||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
|
@ -86,8 +80,10 @@
|
|||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:maxHeight="2dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:thumbOffset="2dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/seekbar_value"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
|
@ -104,5 +100,4 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/seekbar"
|
||||
tools:text="20" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -11,37 +11,31 @@
|
|||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
|
||||
app:cardCornerRadius="0dp">
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -62,12 +56,12 @@
|
|||
android:layout_marginTop="2dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toBottomOf="@android:id/title"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
tools:maxLines="2"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
|
@ -78,15 +72,14 @@
|
|||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATESwitch
|
||||
android:id="@android:id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<code.name.monkey.appthemehelper.common.views.ATESwitch
|
||||
android:id="@android:id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -12,68 +12,62 @@
|
|||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
|
||||
app:cardCornerRadius="0dp">
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/rectSelector"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="PrivateResource">
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:srcCompat="@drawable/ic_telegram_white" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:maxLines="@string/grid_size_1"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:maxLines="@string/grid_size_1"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_front_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_front_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATESwitch
|
||||
android:id="@android:id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<code.name.monkey.appthemehelper.common.views.ATESwitch
|
||||
android:id="@android:id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -50,7 +50,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text"
|
||||
|
@ -69,6 +69,6 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -24,7 +24,6 @@
|
|||
android:paddingStart="@dimen/pref_title_padding"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:textAppearance="@style/TextViewOverline"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</LinearLayout>
|
8
app/src/main/res/layout/preference_screen.xml
Normal file
8
app/src/main/res/layout/preference_screen.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp">
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
|
@ -28,16 +28,24 @@
|
|||
android:id="@+id/action_playlist"
|
||||
android:name="code.name.monkey.retromusic.fragments.playlists.PlaylistsFragment"
|
||||
android:label="PlaylistsFragment" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/action_playing_queue"
|
||||
android:name="code.name.monkey.retromusic.fragments.queue.PlayingQueueFragment"
|
||||
android:label="PlayingQueueFragment" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/action_folder"
|
||||
android:name="code.name.monkey.retromusic.fragments.folder.FoldersFragment"
|
||||
android:label="FoldersFragment" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/action_home"
|
||||
android:name="code.name.monkey.retromusic.fragments.home.BannerHomeFragment"
|
||||
android:label="BannerHomeFragment" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/albumDetailsFragment"
|
||||
android:name="code.name.monkey.retromusic.activities.albums.AlbumDetailsFragment"
|
||||
android:label="AlbumDetailsFragment" />
|
||||
</navigation>
|
3
app/src/main/res/transition/change_bounds.xml
Normal file
3
app/src/main/res/transition/change_bounds.xml
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<changeBounds xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue