This requires the latest version of apktool.
apktool d $APK_PATH -o $OUTPUT_FOLDER
# Open the apktool.yml text file
# Alter the versionCode and versionName entries
# now rebuild!
apktool build $OUTPUT_FOLDER
import fs from 'fs'; | |
import * as path from 'path'; | |
import * as z from 'zod'; | |
//---------------------------------------------------------------- | |
// | |
// Outputs all xcassets-format colors into hex format, with separate light and dark mode values. | |
// IMPORTANT: this only covers a couple of the color formats Xcode uses, and may not properly handle color spaces etc. | |
// | |
// Usage: |
This requires the latest version of apktool.
apktool d $APK_PATH -o $OUTPUT_FOLDER
# Open the apktool.yml text file
# Alter the versionCode and versionName entries
# now rebuild!
apktool build $OUTPUT_FOLDER
<?php | |
/** | |
* Reads the requested portion of a file and sends its contents to the client with the appropriate headers. | |
* | |
* This HTTP_RANGE compatible read file function is necessary for allowing streaming media to be skipped around in. | |
* | |
* @param string $location | |
* @param string $filename | |
* @param string $mimeType | |
* @return void |
class Person { | |
var name = "" | |
var age = 0 | |
init(name: String, age:Int) { | |
self.name = name | |
self.age = age | |
} | |
} |
import android.media.MediaPlayer; | |
import android.media.MediaPlayer.OnCompletionListener; | |
import android.media.MediaPlayer.OnErrorListener; | |
import android.media.MediaPlayer.OnPreparedListener; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.ViewGroup.LayoutParams; | |
import android.webkit.WebChromeClient; | |
import android.widget.FrameLayout; | |
import android.widget.VideoView; |
package com.util.util; | |
import android.text.Spannable; | |
import android.text.TextPaint; | |
import android.text.style.URLSpan; | |
import android.widget.TextView; | |
public class TextViewUtils { | |
private static final String TAG = TextViewUtils.class.getSimpleName(); |
// Maximum font size. Note For WCAG we should support at least 200% default font scale | |
const MAXIMUM_FONT_SIZE = 32; | |
/** | |
* Use to calculate a maxFontSizeMultiplier for Text components to ensure | |
* the text size doesn't go beyond MAXIMUM_FONT_SIZE. | |
* Pass the style or a fixed number. | |
* If the original size is already bigger than 32, then the size will be unchanged. | |
*/ | |
export function getMaxFontSizeMultiplier(params: number | StyleProp<TextStyle>) { |
import {AccessibilityInfo} from 'react-native'; | |
import {createContext, PropsWithChildren, useContext, useEffect, useState} from 'react'; | |
type AccessibilitySettingsT = { | |
isReduceMotionEnabled: boolean; | |
}; | |
const ReducedMotionContext = createContext<AccessibilitySettingsT>({isReduceMotionEnabled: false}); | |
/** |
- (BOOL) tabBarController:(UITabBarController *)tabBarController | |
shouldSelectViewController:(UIViewController *)viewController { | |
// http://stackoverflow.com/questions/5161730/iphone-how-to-switch-tabs-with-an-animation | |
NSUInteger controllerIndex = [self.viewControllers indexOfObject:viewController]; | |
if (controllerIndex == tabBarController.selectedIndex) { | |
return NO; | |
} |
// on error the server sends JSON | |
/* | |
{ "error": { "data": { "message":"A thing went wrong" } } } | |
*/ | |
// create model classes.. | |
public class ErrorResponse { | |
Error error; | |