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
| /* | |
| * Copyright (C) 2013 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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
| final int indent = Math.round(kcApp.dpi2px(getResources(), 8)); |
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
| boolean splitFlag = true; | |
| String splitBlock[] = copyTextField.getText().toString().split(" "); | |
| for (int j = 0; j < splitBlock.length; j++) { | |
| if (splitBlock[j].length() > 4) { | |
| splitFlag = false; | |
| } | |
| } | |
| if (splitFlag) { | |
| copyTextField.setOnKeyListener(new View.OnKeyListener() { |
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
| protected static void doSetListViewHeightBasedOnChildren(ListView listView, int extraPixels) { | |
| if (null != listView) { | |
| final ListAdapter listAdapter = listView.getAdapter(); | |
| if (null != listAdapter) { | |
| int totalHeight = 0, desiredWidth = View.MeasureSpec.makeMeasureSpec(listView.getWidth(), View.MeasureSpec.AT_MOST); | |
| for (int i = listAdapter.getCount(); --i >= 0; ) { | |
| View listItem = listAdapter.getView(i, null, listView); | |
| listItem.measure(desiredWidth, View.MeasureSpec.UNSPECIFIED); | |
| totalHeight += listItem.getMeasuredHeight(); |
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 static void addLinks(TextView view, String url) { | |
| if (null != view && null != url) { | |
| view.setLinksClickable(true); | |
| view.setMovementMethod(LinkMovementMethod.getInstance()); | |
| String template = "<a href='{0}'>{1}</a>"; | |
| String finalText = format(template, url, TextUtils.htmlEncode(view.getText().toString())); | |
| view.setText(Html.fromHtml(finalText)); | |
| } else { | |
| if (kcDebug.isDebuggingOn) { |
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
| //unity slow mode | |
| public void enableSlowMode() | |
| { | |
| Time.timeScale=0.3f; | |
| Time.fixedDeltaTime = 0.02f * Time.timeScale; | |
| if(audio.isPlaying == false) | |
| { |
NewerOlder