This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Windows + Q calls Windows + 1 | |
| #q:: | |
| Send {LWin Down}1 | |
| Sleep 200 | |
| While GetKeyState("LWin","P") | |
| { | |
| KeyWait, q, D T0.3 | |
| If !ErrorLevel ; if you do press q | |
| { | |
| Send {Blind}1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.annotation.SuppressLint | |
| import android.content.Context | |
| import android.text.Layout | |
| import android.text.Spannable | |
| import android.text.SpannableStringBuilder | |
| import android.text.Spanned | |
| import android.text.StaticLayout | |
| import android.text.TextPaint | |
| import android.text.method.LinkMovementMethod | |
| import android.text.style.ClickableSpan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| internal fun disallowToolbarExpand() { | |
| // Taken from: https://stackoverflow.com/a/49218710/1395437 | |
| binding.appBar.setExpanded(false, false) | |
| ViewCompat.setNestedScrollingEnabled(binding.content, false) | |
| val params = binding.appBar.layoutParams as CoordinatorLayout.LayoutParams | |
| if (params.behavior == null) { | |
| params.behavior = AppBarLayout.Behavior() | |
| } | |
| val behaviour = params.behavior as AppBarLayout.Behavior | |
| behaviour.setDragCallback(object : AppBarLayout.Behavior.DragCallback() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.yourapp; | |
| import java.io.IOException; | |
| import java.util.ArrayList; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import com.example.yourapp.AuthenticationModel; | |
| import retrofit.client.Header; | |
| import retrofit.client.OkClient; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <com.google.android.material.appbar.CollapsingToolbarLayout | |
| android:id="@+id/collapsing_toolbar" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| app:expandedTitleMarginStart="@dimen/genre_clickable_title_left_margin" | |
| app:expandedTitleMarginBottom="@dimen/genre_clickable_title_bottom_margin" | |
| app:expandedTitleMarginTop="0dp" | |
| app:collapsedTitleGravity="center" | |
| android:background="@color/background" | |
| app:collapsedTitleTextAppearance="@style/AppTheme.CollapsingToolbarTitle.Collapsed" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| binding.appBar.addOnOffsetChangedListener(AppBarLayout.OnOffsetChangedListener { _, verticalOffset -> | |
| // By updating the LayoutParams, we trigger the offset change listener, which then results in a somewhat infinite loop. | |
| // This flag makes sure that we discard the next callback after updating the layout. | |
| if (verticalOffset == lastOffset) { | |
| return@OnOffsetChangedListener | |
| } | |
| val offsetPercentage = verticalOffset / -maxOffset // 0 is fully expanded, 1 is fully collapsed | |
| val interpolatedPercentage = interpolator.getInterpolation(offsetPercentage) | |
| val baseWidth = expandedTextWidth - (expandedTextWidth - collapsedTextWidth) * interpolatedPercentage | |
| val marginExtra = expandedMargin - (expandedMargin - collapsedMargin) * offsetPercentage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PracticalInfoFragment extends Fragment { | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
| View view = inflater.inflate(R.layout.fragment_practical_info, container, false); | |
| TextView practicalInfo = (TextView)view.findViewById(R.id.practical_info); | |
| practicalInfo.setMovementMethod(LinkMovementMethod.getInstance()); | |
| String infoString = _readStringFromAssets(); // Not detailed here, content can be seen in the other file below | |
| _setTextViewLinks(practicalInfo, infoString); | |
| return view; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @file:Suppress("PackageDirectoryMismatch") | |
| package android.support.v17.leanback.widget | |
| import android.os.Bundle | |
| import android.support.v17.leanback.app.RowsSupportFragment | |
| import android.support.v7.widget.RecyclerView | |
| import android.view.View | |
| /** | |
| * RowsSupportFragment which also remembers the subposition in the rows. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private val fftAudioProcessor = FFTAudioProcessor() | |
| val renderersFactory = object : DefaultRenderersFactory(this) { | |
| override fun buildAudioProcessors(): Array<AudioProcessor> { | |
| val processors = super.buildAudioProcessors() | |
| return processors + fftAudioProcessor | |
| } | |
| } | |
| player = ExoPlayerFactory.newSimpleInstance(this, renderersFactory, DefaultTrackSelector()) |
NewerOlder