This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.co.jakelee.cityflow.components; | |
import android.app.Activity; | |
import android.app.Dialog; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.os.AsyncTask; | |
import android.widget.TextView; | |
import java.util.ArrayList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public TileDisplaySetup setupTileDisplay(PuzzleDisplayer puzzleDisplayer, List<Tile> tiles, ZoomableViewGroup tileContainer, Tile selectedTile, ImageView selectedTileImage, boolean isEditor) { | |
tileContainer.removeAllViews(); | |
Setting minimumMillisForDrag = Setting.get(Constants.SETTING_MINIMUM_MILLIS_DRAG); | |
int dragDelay = minimumMillisForDrag != null ? minimumMillisForDrag.getIntValue() : 200; | |
Pair<Integer, Integer> maxXY = TileHelper.getMaxXY(tiles); | |
DisplayValues displayValues = getDisplayValues(puzzleDisplayer.getActivity(), maxXY.first + 1, maxXY.second + 1); | |
float optimumScale = displayValues.getZoomFactor(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<RelativeLayout | |
android:id="@+id/progressWrapper" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_below="@id/mainLogo"> | |
<uk.co.jakelee.cityflow.components.TextViewFont | |
android:id="@+id/progressText" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SoundHelper.playSound(this, SoundHelper.smithingSounds); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void populateCard() { | |
... | |
StorageHelper.fillWithQrDrawable((ImageView) findViewById(R.id.puzzleQrCode), exportedText); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseActivity extends Activity { | |
@Override | |
protected void onResume() { | |
super.onResume(); | |
MusicHelper.getInstance(this).setMovingInApp(false); | |
} | |
@Override | |
public void onPause() { | |
super.onPause(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onResume() { | |
super.onResume(); | |
//noinspection ResourceType | |
setRequestedOrientation(Setting.get(Enums.Setting.Orientation).getIntValue()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.yourpackagename"> | |
<application | |
android:name=".MainApplication" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name"> | |
<meta-data | |
android:name="DATABASE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.support.v4.view.ViewPager | |
import android.util.AttributeSet | |
import android.view.MotionEvent | |
enum class SwipeDirection { BOTH, LEFT, RIGHT, NONE } | |
// https://stackoverflow.com/a/34076649/608312 | |
class LockableViewPager(context: Context, attrs: AttributeSet) : ViewPager(context, attrs) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style name="Font_Regular" tools:keep="@style/Font_Regular"> | |
<item name="android:fontFamily">@font/the_sans_c4s</item> | |
</style> | |
<style name="Font_Regular_Italic" parent="Font_Regular" tools:keep="@style/Font_Regular_Italic"> | |
<item name="android:textStyle">italic</item> | |
</style> | |
<style name="Font_Bold" parent="Font_Regular" tools:keep="@style/Font_Bold"> | |
<item name="android:textStyle">bold</item> |
OlderNewer