From aa10d425e5b0f845a6115848958efd9a9889a8f4 Mon Sep 17 00:00:00 2001 From: M M Arif Date: Wed, 12 Apr 2023 20:43:25 +0000 Subject: [PATCH] Language statistics (#1262) closes #884 Co-authored-by: M M Arif Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1262 Reviewed-by: qwerty287 --- app/build.gradle | 10 +- .../mian/gitnex/adapters/NotesAdapter.java | 2 +- .../gitnex/fragments/RepoInfoFragment.java | 208 ++++++++++++++++ .../languagestatistics/LanguageColor.java | 223 ++++++++++++++++++ .../LanguageStatisticsBar.java | 78 ++++++ .../LanguageStatisticsHelper.java | 15 ++ .../languagestatistics/SeekbarItem.java | 10 + .../main/res/layout/fragment_repo_info.xml | 20 ++ .../layout_repo_language_statistics.xml | 16 ++ .../res/values/language_statistics_colors.xml | 166 +++++++++++++ app/src/main/res/values/strings.xml | 5 +- 11 files changed, 746 insertions(+), 7 deletions(-) create mode 100644 app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageColor.java create mode 100644 app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageStatisticsBar.java create mode 100644 app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageStatisticsHelper.java create mode 100644 app/src/main/java/org/mian/gitnex/helpers/languagestatistics/SeekbarItem.java create mode 100644 app/src/main/res/layout/layout_repo_language_statistics.xml create mode 100644 app/src/main/res/values/language_statistics_colors.xml diff --git a/app/build.gradle b/app/build.gradle index 70e2e701..15cd4a64 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,14 +56,14 @@ configurations { dependencies { def lifecycle_version = '2.6.0' def markwon_version = '4.6.2' - def work_version = '2.8.0' + def work_version = '2.8.1' def acra = '5.9.7' implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.9.0-beta01' - implementation 'androidx.compose.material3:material3:1.1.0-alpha08' - implementation 'androidx.compose.material3:material3-window-size-class:1.1.0-alpha08' + implementation 'androidx.compose.material3:material3:1.1.0-beta01' + implementation 'androidx.compose.material3:material3-window-size-class:1.1.0-beta01' implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "androidx.legacy:legacy-support-v4:1.0.0" @@ -103,8 +103,8 @@ dependencies { implementation "ch.acra:acra-mail:$acra" implementation "ch.acra:acra-limiter:$acra" implementation "ch.acra:acra-notification:$acra" - implementation 'androidx.room:room-runtime:2.5.0' - annotationProcessor 'androidx.room:room-compiler:2.5.0' + implementation 'androidx.room:room-runtime:2.5.1' + annotationProcessor 'androidx.room:room-compiler:2.5.1' implementation "androidx.work:work-runtime:$work_version" implementation "io.mikael:urlbuilder:2.0.9" implementation "org.codeberg.gitnex-garage:emoji-java:v5.1.2" diff --git a/app/src/main/java/org/mian/gitnex/adapters/NotesAdapter.java b/app/src/main/java/org/mian/gitnex/adapters/NotesAdapter.java index 6db3e0fd..60de8e24 100644 --- a/app/src/main/java/org/mian/gitnex/adapters/NotesAdapter.java +++ b/app/src/main/java/org/mian/gitnex/adapters/NotesAdapter.java @@ -72,7 +72,7 @@ public class NotesAdapter extends RecyclerView.Adapter diff --git a/app/src/main/java/org/mian/gitnex/fragments/RepoInfoFragment.java b/app/src/main/java/org/mian/gitnex/fragments/RepoInfoFragment.java index 975fb496..e13a69d0 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/RepoInfoFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/RepoInfoFragment.java @@ -1,18 +1,28 @@ package org.mian.gitnex.fragments; +import static org.mian.gitnex.helpers.languagestatistics.LanguageColor.languageColor; +import static org.mian.gitnex.helpers.languagestatistics.LanguageStatisticsHelper.calculatePercentage; + import android.content.Context; import android.content.Intent; +import android.graphics.Color; import android.os.Bundle; +import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ImageView; import android.widget.LinearLayout; +import android.widget.SeekBar; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; +import com.amulyakhare.textdrawable.TextDrawable; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import java.io.IOException; +import java.util.ArrayList; import java.util.Locale; +import java.util.Map; import okhttp3.ResponseBody; import org.apache.commons.io.FileUtils; import org.gitnex.tea4j.v2.models.Organization; @@ -34,6 +44,7 @@ import org.mian.gitnex.helpers.Markdown; import org.mian.gitnex.helpers.TimeHelper; import org.mian.gitnex.helpers.Toasty; import org.mian.gitnex.helpers.contexts.RepositoryContext; +import org.mian.gitnex.helpers.languagestatistics.SeekbarItem; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; @@ -104,6 +115,8 @@ public class RepoInfoFragment extends Fragment { binding.repoMetaPullRequestsFrame.setOnClickListener( metaPR -> ((RepoDetailActivity) requireActivity()).viewPager.setCurrentItem(3)); + setLanguageStatistics(); + return binding.getRoot(); } @@ -145,6 +158,201 @@ public class RepoInfoFragment extends Fragment { return binding.repoMetaFrame.getVisibility() == View.VISIBLE; } + private void setLanguageStatistics() { + + Call> call = + RetrofitClient.getApiInterface(getContext()) + .repoGetLanguages(repository.getOwner(), repository.getName()); + + call.enqueue( + new Callback<>() { + + @Override + public void onResponse( + @NonNull Call> call, + @NonNull Response> response) { + + if (isAdded()) { + + switch (response.code()) { + case 200: + assert response.body() != null; + if (response.body().size() > 0) { + + ArrayList seekbarItemList = new ArrayList<>(); + + float totalSpan = + (float) + response.body().values().stream() + .mapToDouble(a -> a) + .sum(); + + for (Map.Entry entry : + response.body().entrySet()) { + + SeekbarItem seekbarItem = new SeekbarItem(); + + seekbarItem.progressItemPercentage = + (entry.getValue() / totalSpan) * 100; + seekbarItem.color = languageColor(entry.getKey()); + seekbarItemList.add(seekbarItem); + } + + binding.languagesStatistic.setVisibility(View.VISIBLE); + binding.languagesStatistic.initData(seekbarItemList); + + binding.languagesStatistic.setOnSeekBarChangeListener( + new SeekBar.OnSeekBarChangeListener() { + + @Override + public void onStopTrackingTouch( + SeekBar seekBar) {} + + @Override + public void onStartTrackingTouch( + SeekBar seekBar) {} + + @Override + public void onProgressChanged( + SeekBar seekBar, + int progress, + boolean fromUser) { + + View view = + LayoutInflater.from(ctx) + .inflate( + R.layout + .layout_repo_language_statistics, + null); + + LinearLayout.LayoutParams params = + new LinearLayout.LayoutParams( + LinearLayout.LayoutParams + .WRAP_CONTENT, + LinearLayout.LayoutParams + .WRAP_CONTENT); + params.setMargins(0, 32, 32, 0); + + LinearLayout layout = + view.findViewById(R.id.lang_color); + layout.removeAllViews(); + + for (Map.Entry entry : + response.body().entrySet()) { + + LinearLayout layoutSub = + new LinearLayout(getContext()); + layoutSub.setOrientation( + LinearLayout.HORIZONTAL); + layoutSub.setGravity( + Gravity.START | Gravity.TOP); + layout.addView(layoutSub); + + ImageView colorView = + new ImageView(getContext()); + colorView.setLayoutParams(params); + + String hexColor = + String.format( + "#%06X", + (0xFFFFFF + & languageColor( + entry + .getKey()))); + TextDrawable drawable = + TextDrawable.builder() + .beginConfig() + .width(64) + .height(64) + .endConfig() + .buildRoundRect( + "", + Color + .parseColor( + hexColor), + 8); + drawable.setTint( + getResources() + .getColor( + languageColor( + entry + .getKey()), + null)); + colorView.setImageDrawable(drawable); + layoutSub.addView(colorView); + + TextView langName = + new TextView(getContext()); + langName.setLayoutParams(params); + langName.setText(entry.getKey()); + layoutSub.addView(langName); + + TextView langPercentage = + new TextView(getContext()); + langPercentage.setLayoutParams(params); + langPercentage.setTextSize(12); + langPercentage.setText( + getString( + R.string + .lang_percentage, + calculatePercentage( + entry + .getValue(), + totalSpan))); + layoutSub.addView(langPercentage); + } + + MaterialAlertDialogBuilder + materialAlertDialogBuilder1 = + new MaterialAlertDialogBuilder( + ctx) + .setTitle( + R.string + .lang_statistics) + .setView(view) + .setNeutralButton( + getString( + R + .string + .close), + null); + + materialAlertDialogBuilder1.create().show(); + } + }); + } + + break; + + case 401: + AlertDialogs.authorizationTokenRevokedDialog(ctx); + break; + + case 403: + Toasty.error(ctx, ctx.getString(R.string.authorizeError)); + binding.languagesStatistic.setVisibility(View.GONE); + break; + + case 404: + binding.languagesStatistic.setVisibility(View.GONE); + break; + + default: + Toasty.error(getContext(), getString(R.string.genericError)); + binding.languagesStatistic.setVisibility(View.GONE); + break; + } + } + } + + @Override + public void onFailure( + @NonNull Call> call, @NonNull Throwable t) { + Toasty.error(ctx, ctx.getString(R.string.genericServerResponseError)); + } + }); + } + private void setRepoInfo(Locale locale) { Repository repoInfo = repository.getRepository(); diff --git a/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageColor.java b/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageColor.java new file mode 100644 index 00000000..fdc4fe2c --- /dev/null +++ b/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageColor.java @@ -0,0 +1,223 @@ +package org.mian.gitnex.helpers.languagestatistics; + +import java.util.HashMap; +import java.util.Map; +import org.mian.gitnex.R; + +/** + * @author M M Arif + */ +public class LanguageColor { + + private static int color = R.color.default_lang_color; + private static final Map colors = new HashMap<>(); + + static { + colors.put("ASP.NET", R.color.default_lang_color); + colors.put("ATS", R.color.ats); + colors.put("ActionScript", R.color.action_script); + colors.put("Ada", R.color.ada); + colors.put("AngelScript", R.color.angel_script); + colors.put("Ant Build System", R.color.ant_build_system); + colors.put("Antlers", R.color.antlers); + colors.put("ApacheConf", R.color.apache_conf); + colors.put("Apex", R.color.apex); + colors.put("AppleScript", R.color.apple_script); + colors.put("AsciiDoc", R.color.ascii_doc); + colors.put("Assembly", R.color.assembly); + colors.put("Awk", R.color.awk); + colors.put("BASIC", R.color.basic); + colors.put("Batchfile", R.color.batch_file); + colors.put("Bison", R.color.bison); + colors.put("Blade", R.color.blade); + colors.put("C", R.color.c); + colors.put("C#", R.color.c_sharp); + colors.put("C++", R.color.c_plus_plus); + colors.put("CMake", R.color.c_make); + colors.put("COBOL", R.color.c_make); + colors.put("CSS", R.color.css); + colors.put("CSV", R.color.csv); + colors.put("Classic ASP", R.color.classic_asp); + colors.put("Clojure", R.color.clojure); + colors.put("Closure Templates", R.color.closure_templates); + colors.put("CodeQL", R.color.code_ql); + colors.put("CoffeeScript", R.color.coffee_script); + colors.put("ColdFusion", R.color.cold_fusion); + colors.put("Common Lisp", R.color.common_lisp); + colors.put("Cython", R.color.cython); + colors.put("DNS Zone", R.color.cython); + colors.put("Dart", R.color.dart); + colors.put("Diff", R.color.dart); + colors.put("Dockerfile", R.color.docker_file); + colors.put("Dotenv", R.color.dot_env); + colors.put("E-mail", R.color.dot_env); + colors.put("EJS", R.color.ejs); + colors.put("Elixir", R.color.elixir); + colors.put("Elm", R.color.elm); + colors.put("Emacs Lisp", R.color.emacs_lisp); + colors.put("EmberScript", R.color.ember_script); + colors.put("Erlang", R.color.erlang); + colors.put("Forth", R.color.forth); + colors.put("Fortran", R.color.fortran); + colors.put("Fortran Free Form", R.color.fortran_free_form); + colors.put("FreeBasic", R.color.free_basic); + colors.put("GDScript", R.color.gd_script); + colors.put("GLSL", R.color.glsl); + colors.put("Git Attributes", R.color.git_attributes); + colors.put("Git Config", R.color.git_config); + colors.put("Gnuplot", R.color.gnuplot); + colors.put("Go", R.color.go); + colors.put("Go Checksums", R.color.go_checksums); + colors.put("Go Module", R.color.go_module); + colors.put("Gradle", R.color.gradle); + colors.put("GraphQL", R.color.graph_ql); + colors.put("Groovy", R.color.groovy); + colors.put("HAProxy", R.color.ha_proxy); + colors.put("HCL", R.color.hcl); + colors.put("HTML", R.color.html); + colors.put("HTML+PHP", R.color.html_php); + colors.put("Hack", R.color.hack); + colors.put("Haml", R.color.haml); + colors.put("Haskell", R.color.haskell); + colors.put("Haxe", R.color.haxe); + colors.put("INI", R.color.ini); + colors.put("Ignore List", R.color.ignore_list); + colors.put("JAR Manifest", R.color.jar_manifest); + colors.put("JSON", R.color.json); + colors.put("JSON with Comments", R.color.json_with_comments); + colors.put("JSON5", R.color.json5); + colors.put("JSONLD", R.color.json_ld); + colors.put("JSONiq", R.color.json_iq); + colors.put("Java", R.color.java); + colors.put("Java Properties", R.color.java_properties); + colors.put("Java Server Pages", R.color.java_server_pages); + colors.put("JavaScript", R.color.java_script); + colors.put("Jinja", R.color.jinja); + colors.put("Julia", R.color.julia); + colors.put("Jupyter Notebook", R.color.jupyter_notebook); + colors.put("Kotlin", R.color.kotlin); + colors.put("LLVM", R.color.llvm); + colors.put("LSL", R.color.lsl); + colors.put("Lasso", R.color.lasso); + colors.put("Latte", R.color.latte); + colors.put("Less", R.color.less); + colors.put("LiveScript", R.color.live_script); + colors.put("Lua", R.color.lua); + colors.put("MATLAB", R.color.matlab); + colors.put("MTML", R.color.mtml); + colors.put("Makefile", R.color.make_file); + colors.put("Markdown", R.color.markdown); + colors.put("Mathematica", R.color.mathematica); + colors.put("Maven POM", R.color.mathematica); + colors.put("Max", R.color.max); + colors.put("Mercury", R.color.mercury); + colors.put("Mermaid", R.color.mermaid); + colors.put("Meson", R.color.meson); + colors.put("MiniYAML", R.color.mini_yaml); + colors.put("NPM Config", R.color.npm_rc); + colors.put("NSIS", R.color.npm_rc); + colors.put("Nginx", R.color.nginx); + colors.put("Nim", R.color.nim); + colors.put("Nix", R.color.nix); + colors.put("ObjectScript", R.color.object_script); + colors.put("Objective-C", R.color.objective_c); + colors.put("Objective-C++", R.color.objective_c_plus_plus); + colors.put("PHP", R.color.php); + colors.put("PLSQL", R.color.pl_sql); + colors.put("PLpgSQL", R.color.pl_pg_sql); + colors.put("Pascal", R.color.pascal); + colors.put("Perl", R.color.perl); + colors.put("PostCSS", R.color.post_css); + colors.put("PostScript", R.color.post_script); + colors.put("PowerShell", R.color.power_shell); + colors.put("Proguard", R.color.pro_log); + colors.put("Prolog", R.color.pro_log); + colors.put("Public Key", R.color.post_css); + colors.put("Pug", R.color.pug); + colors.put("Puppet", R.color.puppet); + colors.put("Python", R.color.python); + colors.put("Python console", R.color.python); + colors.put("Python traceback", R.color.python); + colors.put("QML", R.color.qml); + colors.put("Qt Script", R.color.qt_script); + colors.put("R", R.color.r); + colors.put("Racket", R.color.racket); + colors.put("Raku", R.color.raku); + colors.put("Raw token data", R.color.raku); + colors.put("Regular Expression", R.color.regexp); + colors.put("Rich Text Format", R.color.regexp); + colors.put("Roff", R.color.roff); + colors.put("Roff Manpage", R.color.hack); + colors.put("Ruby", R.color.ruby); + colors.put("Rust", R.color.rust); + colors.put("SCSS", R.color.scss); + colors.put("SELinux Policy", R.color.scss); + colors.put("SQL", R.color.sql); + colors.put("SQLPL", R.color.sql); + colors.put("SSH Config", R.color.r); + colors.put("SVG", R.color.svg); + colors.put("Sass", R.color.sass); + colors.put("Scala", R.color.scala); + colors.put("Scheme", R.color.scheme); + colors.put("Shell", R.color.shell); + colors.put("ShellCheck Config", R.color.scheme); + colors.put("ShellSession", R.color.scala); + colors.put("Smarty", R.color.smarty); + colors.put("Standard ML", R.color.standard_ml); + colors.put("Stata", R.color.stata); + colors.put("Stylus", R.color.stylus); + colors.put("Svelte", R.color.svelte); + colors.put("Swift", R.color.swift); + colors.put("TOML", R.color.toml); + colors.put("TSQL", R.color.swift); + colors.put("TSV", R.color.smarty); + colors.put("TSX", R.color.toml); + colors.put("TXL", R.color.smarty); + colors.put("Tcl", R.color.tcl); + colors.put("TeX", R.color.tex); + colors.put("Texinfo", R.color.tex); + colors.put("Text", R.color.roff); + colors.put("Twig", R.color.twig); + colors.put("TypeScript", R.color.type_script); + colors.put("Unity3D Asset", R.color.unity_asset); + colors.put("VBA", R.color.vba); + colors.put("VBScript", R.color.vbs); + colors.put("VHDL", R.color.vhdl); + colors.put("Vala", R.color.vala); + colors.put("Vim Help File", R.color.vim); + colors.put("Vim Script", R.color.vim); + colors.put("Vim Snippet", R.color.vb_net); + colors.put("Visual Basic .NET", R.color.hack); + colors.put("Visual Basic 6.0", R.color.vb6); + colors.put("Volt", R.color.volt); + colors.put("Vue", R.color.vue); + colors.put("WebAssembly", R.color.web_assembly); + colors.put("Wikitext", R.color.wiki); + colors.put("Windows Registry Entries", R.color.win_reg_entries); + colors.put("XML", R.color.xml); + colors.put("XML Property List", R.color.xml_props_list); + colors.put("XQuery", R.color.vb6); + colors.put("XS", R.color.wiki); + colors.put("XSLT", R.color.xslt); + colors.put("XProc", R.color.yaml); + colors.put("YAML", R.color.vb6); + colors.put("Zephir", R.color.zep); + colors.put("cURL Config", R.color.zep); + colors.put("desktop", R.color.win_reg_entries); + colors.put("dircolors", R.color.xslt); + colors.put("robots.txt", R.color.yaml); + colors.put("sed", R.color.sed); + colors.put("xBase", R.color.x_base); + } + + public static int languageColor(String key) { + + for (Map.Entry s : colors.entrySet()) { + if (key.equalsIgnoreCase(s.getKey())) { + color = s.getValue(); + } + } + + return color; + } +} diff --git a/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageStatisticsBar.java b/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageStatisticsBar.java new file mode 100644 index 00000000..31c8b59e --- /dev/null +++ b/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageStatisticsBar.java @@ -0,0 +1,78 @@ +package org.mian.gitnex.helpers.languagestatistics; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.graphics.Canvas; +import android.graphics.Paint; +import android.graphics.Rect; +import android.util.AttributeSet; +import java.util.ArrayList; + +/** + * @author M M Arif + */ +public class LanguageStatisticsBar extends androidx.appcompat.widget.AppCompatSeekBar { + + private ArrayList progressItemsList; + + public LanguageStatisticsBar(Context context) { + super(context); + } + + public LanguageStatisticsBar(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public LanguageStatisticsBar(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + public void initData(ArrayList progressItemsListInit) { + this.progressItemsList = progressItemsListInit; + } + + @Override + protected synchronized void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + } + + protected void onDraw(Canvas canvas) { + + if (progressItemsList.size() > 0) { + + int progressBarWidth = getWidth(); + int progressBarHeight = getHeight(); + int thumbOffSet = getThumbOffset(); + int lastProgressX = 0; + int progressItemWidth, progressItemRight; + + for (int i = 0; i < progressItemsList.size(); i++) { + + SeekbarItem progressItem = progressItemsList.get(i); + @SuppressLint("DrawAllocation") + Paint progressPaint = new Paint(); + progressPaint.setColor(getResources().getColor(progressItem.color, null)); + + progressItemWidth = + (int) (progressItem.progressItemPercentage * progressBarWidth / 100); + + progressItemRight = lastProgressX + progressItemWidth; + + if (i == progressItemsList.size() - 1 && progressItemRight != progressBarWidth) { + progressItemRight = progressBarWidth; + } + + @SuppressLint("DrawAllocation") + Rect progressRect = new Rect(); + progressRect.set( + lastProgressX, + thumbOffSet / 2, + progressItemRight, + progressBarHeight - thumbOffSet / 2); + canvas.drawRect(progressRect, progressPaint); + lastProgressX = progressItemRight; + } + super.onDraw(canvas); + } + } +} diff --git a/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageStatisticsHelper.java b/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageStatisticsHelper.java new file mode 100644 index 00000000..015669b7 --- /dev/null +++ b/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/LanguageStatisticsHelper.java @@ -0,0 +1,15 @@ +package org.mian.gitnex.helpers.languagestatistics; + +import android.annotation.SuppressLint; + +/** + * @author M M Arif + */ +public class LanguageStatisticsHelper { + + @SuppressLint("DefaultLocale") + public static String calculatePercentage(Long number, float total) { + float percent = number * 100f / total; + return String.format("%.1f", percent); + } +} diff --git a/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/SeekbarItem.java b/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/SeekbarItem.java new file mode 100644 index 00000000..c92826f6 --- /dev/null +++ b/app/src/main/java/org/mian/gitnex/helpers/languagestatistics/SeekbarItem.java @@ -0,0 +1,10 @@ +package org.mian.gitnex.helpers.languagestatistics; + +/** + * @author M M Arif + */ +public class SeekbarItem { + + public int color; + public float progressItemPercentage; +} diff --git a/app/src/main/res/layout/fragment_repo_info.xml b/app/src/main/res/layout/fragment_repo_info.xml index 384b5046..eb2edd36 100644 --- a/app/src/main/res/layout/fragment_repo_info.xml +++ b/app/src/main/res/layout/fragment_repo_info.xml @@ -134,6 +134,26 @@ android:textColorLink="@color/lightBlue" android:textSize="@dimen/dimen16sp"/> + + + + + + + + + + + diff --git a/app/src/main/res/values/language_statistics_colors.xml b/app/src/main/res/values/language_statistics_colors.xml new file mode 100644 index 00000000..dfa532fd --- /dev/null +++ b/app/src/main/res/values/language_statistics_colors.xml @@ -0,0 +1,166 @@ + + + #49da39 + #9400ff + #1ac620 + #882B0F + #02f88c + #C7D7DC + #A9157E + #ff269e + #d12127 + #1797c0 + #101F1F + #73a0c5 + #6E4C13 + #c30e9b + #ff0000 + #C1F12E + #6A463F + #f7523f + #555555 + #178600 + #f34b7d + #DA3434 + #563d7c + #237346 + #6a40fd + #db5855 + #0d948f + #140f46 + #244776 + #ed2cd6 + #3fb68b + #fedf5b + #00B4AB + #384d54 + #e5d559 + #a91e50 + #6e4a7e + #60B5CC + #c065db + #FFF4F3 + #B83998 + #341708 + #4d41b1 + #4d41b1 + #141AC9 + #355570 + #5686a5 + #F44D27 + #F44D27 + #f0a9f0 + #00ADD8 + #00ADD8 + #00ADD8 + #02303a + #e10098 + #4298b8 + #106da9 + #844FBA + #e34c26 + #4f5d95 + #878787 + #ece2a9 + #5e5086 + #df7900 + #d1dbe0 + #000000 + #b07219 + #292929 + #292929 + #267CB9 + #0c479c + #40d47e + #b07219 + #2A6277 + #2A6277 + #f1e05a + #a52a22 + #a270ba + #DA5B0B + #A97BFF + #185619 + #3d9970 + #999999 + #f2a542 + #1d365d + #499886 + #000080 + #e16737 + #b7e1f4 + #427819 + #083fa1 + #dd1100 + #c4a79c + #ff2b2b + #ff3670 + #007800 + #ff1111 + #cb3837 + #009639 + #ffc200 + #7e7eff + #424893 + #438eff + #6866fb + #4F5D95 + #dad8d8 + #336790 + #E3F171 + #0298c3 + #dc3a0c + #da291c + #012456 + #74283c + #a86454 + #302B6D + #3572A5 + #44a51c + #00b841 + #198CE7 + #3c5caa + #0000fb + #009a00 + #ecdebe + #701516 + #dea584 + #c6538c + #e38c00 + #ff9900 + #a53b70 + #c22d40 + #1e4aec + #89e051 + #f0c040 + #dc566d + #1a5f91 + #ff6347 + #ff3e00 + #F05138 + #9c4221 + #e4cc98 + #3D6117 + #c1d026 + #3178c6 + #222c37 + #867db1 + #15dcdc + #adb2cb + #a56de2 + #199f4b + #945db7 + #2c6353 + #1F1F1F + #41b883 + #04133b + #fc5757 + #52d5ff + #0060ac + #0060ac + #EB8CEB + #cb171e + #118f9e + #64b970 + #403a40 + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b46a2fd5..bfb80357 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -797,7 +797,7 @@ Start taking your notes here Created %s Updated %s - Do you really want to delete this note? + Do you really want to delete this note? Note deleted successfully Notes deleted successfully @@ -852,4 +852,7 @@ This status has no linked target URL. Starred Repos + + Language Statistics + %s%%