可悲的是在我的国家GoogleCheckout不可用.我想制作一个付费应用程序,我已经启动了它,但它不是那么好,我不能将其作为付费应用程序上传到GooglePlay,只是免费的.
有什么方法,或任何解决方式以某种方式结帐或从其他国家或其他地方公布?
如果我点击我的EditText,虚拟键盘就不会显示出来了.显示光标,但没有键入键盘.
我甚至尝试手动打开但没有作品.
这是我的代码:
public class CreateNote extends Activity {
EditText titleEdit;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.createnote);
titleEdit = (EditText) findViewById(R.id.titleEdit);
titleEdit.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
InputMethodManager imm = (InputMethodManager) CreateNote.this
.getSystemService(Service.INPUT_METHOD_SERVICE);
imm.showSoftInput(titleEdit, 0);
}
});
}
}
Run Code Online (Sandbox Code Playgroud)
布局片段:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#989898" >
<EditText
android:id="@+id/titleEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/edittextdrawale"
android:ems="10"
android:textColor="#fff"
android:textColorHint="#fff" >
<requestFocus />
</EditText>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)
玩隐藏和寻找我的虚拟键盘的原因是什么?我在真实设备上测试,而不是在模拟器上测试.
我使用这种方法来获取当地时间:
Calendar cal = Calendar.getInstance();
String time= new SimpleDateFormat("dd MMM yyyy HH:mm:ss").format(cal.getTime());
Run Code Online (Sandbox Code Playgroud)
我的问题是下午这个方法让我回到了例如"11:15",但它已经是"23:15"了.我希望我的desc不会混淆.
我想回到下午的价值观:12:MM,13:MM,14:MM ..等到23:MM...
我应该改变什么?
所以我在我的应用程序中使用SlidingMenu库和FragmentActivity.
布局中有一个GoogleMap,左侧有一些菜单.当我拉菜单看到它时,那里有一个大的黑色矩形,覆盖我的滑动菜单内容.点击一次后,它就消失了.
任何人都有话要说吗?

android google-maps android-sliding android-fragmentactivity android-maps-v2
我用Canvas和Paint做了一个小装载圈.这是我第一次尝试使用这些类,所以它可能是我错误使用的东西.
我的问题是,绘画的分辨率太低了.我可以清楚地看到像素.

我怎么能改进这个?
顺便说一下这是我的班级:
public class LoadingCircle extends LinearLayout {
public LoadingCircle(Context context, AttributeSet attrs) {
super(context, attrs);
setWillNotDraw(false);
}
// time
int countDownTime = 180;
Paint paint = new Paint();
RectF oval = new RectF();
Path path = new Path();
// value
int value = 360 / countDownTime;
// starting progress
int progress = -360 - value;
@Override
public void onDraw(Canvas canvas) {
super.onDraw(canvas);
float width = (float) getWidth();
float height = (float) getHeight();
float center_x = width / …Run Code Online (Sandbox Code Playgroud) 是否有任何方法替换片段FragmentTransaction's replace,而不是将其添加到历史堆栈?
我只想让我的应用程序不记得它,当我按下按钮时.
我想制作一个带有 ListView 的小部件,您可以在其中添加 listItems 来显示计数器计时器,以查看您有多少时间来处理某个事件。
这是我第一次使用小部件,我不知道我的方法是好还是坏,到目前为止我得到了这个:
AppWidgetProvider 用于通过启动服务的周期性事件来启动可运行程序。该服务称为 UpdateService,它正在更新数据集并刷新 listView。
好吧,我可以说它正在工作,但是每次刷新发生时,我的列表视图都会闪烁很短的时间,就像列表项消失很短的时间然后重新出现并刷新值。它非常丑陋,我想摆脱它。
我尝试将 listView 的 cacheColorHint 更改为 #00000000 但没有解决我的问题,也无法在互联网上找到任何内容。
如果可以的话请提供帮助,如果这种方法不是实现此“时间计数器列表”的最佳方法,请提供一些建议
public class WidgetProvider extends AppWidgetProvider {
static public String TAG = "widgetProvider";
static Handler handler = new Handler();
//TODO: stop runnables at widget destroying
static MyRunnable myRunnable;
static long refreshInterval = 1000 * 1;
//Runnable for refreshing my widget
class MyRunnable implements Runnable {
Context context;
public MyRunnable(Context context) {
this.context = context;
}
public void run() {
Log.i(TAG, "My runnable …Run Code Online (Sandbox Code Playgroud) android listview android-widget android-service android-listview
我有一个很好的FrameLayout作为主容器和它的层次结构中的一些其他视图.
但预览显示了一个简单的ActionBarOverlayLayout.
那是什么?为什么在这里?
我有Android Studio 3.0.0
我试过了:重启Android Studio.通过调整大小来刷新预览.更改了预览设备,更改了预览的SDK,更改了蓝图\设计选项,按下了"强制刷新布局" Button.
XML:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="8dp">
<com.makeramen.roundedimageview.RoundedImageView
android:layout_width="match_parent"
android:layout_height="@dimen/walk_list_item_height"
android:adjustViewBounds="false"
android:cropToPadding="false"
android:scaleType="centerCrop"
app:layout_heightPercent="25%"
app:layout_marginLeftPercent="0%"
app:layout_marginTopPercent="0%"
app:layout_widthPercent="100%"
app:riv_corner_radius="@dimen/corner_radius"
android:id="@+id/walk_iv" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/gradient"
android:orientation="vertical"
android:paddingBottom="16dp"
android:paddingTop="16dp">
<TextView
android:id="@+id/walk_name_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
android:padding="16dp"
android:text="New Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#fff" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_duration_icon" />
<TextView
android:id="@+id/duration_tv"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:gravity="center|left"
android:text="TextView" …Run Code Online (Sandbox Code Playgroud) 每当我尝试在API 19上运行我的应用程序时,我在构建时遇到此错误:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "strtof" referenced by "libsupportjni.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:364)
at java.lang.System.loadLibrary(System.java:526)
at com.android.tools.profiler.support.ProfilerService.<clinit>(ProfilerService.java:41)
at com.orm.SugarApp.<init>(SugarApp.java:7)
at com.company.my.app.MyApplication.<init>(MyApplication.java:18)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1208)
at android.app.Instrumentation.newApplication(Instrumentation.java:990)
at android.app.Instrumentation.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:511)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4317)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Run Code Online (Sandbox Code Playgroud)
我已经读过它是由A. Studio的高级分析功能引起的,但它在我的IDE中关闭了.
清理和重建项目或使缓存无效无济于事.
如果可以,请提供帮助.
我正在开发一个基本上是位置跟踪软件的应用程序。启动时,它会保存位置并将其发送到服务器。
该代码已经运行了5年,没有任何修改,没有任何错误。
它通过简单的前台服务实现。
最近几个月,我收到用户报告的关于该服务的错误,该错误在华为设备上随机停止。首先,我认为这是较新的android上罕见的/新的崩溃,但是Fabric中根本没有错误日志。
我在新的华为设备上进行了尝试,令我惊讶的是,这种现象确实存在。几分钟后,具有EMUI的华为设备确实终止了前台服务。
这对我的应用程序真的很不好,首先,用户希望长时间运行此跟踪应用程序,其次,最近几个月,华为已成为Android用户中的热门选择。大概有10%的用户拥有华为设备。
我知道https://dontkillmyapp.com/这是一个获取有关此问题信息的好网站。
我尝试过他们的解决方案,该解决方案基本上是在我的服务中添加带有特定标签的唤醒锁,因此华为的EMUI不会杀死它。
我已经按照以下方式尝试过此方法,但几分钟后我的华为测试设备仍然无法使用我的前台服务。
服务中的代码:
我基本上在服务的onCreate回调中获取了唤醒锁。
private void acquireLock() {
if (wakeLock == null) {
PowerManager mgr = (PowerManager) getSystemService(Context.POWER_SERVICE);
if (mgr != null) {
if (Build.MANUFACTURER.toLowerCase().equals("huawei")) {
lockTag = "LocationManagerService";
}
wakeLock = mgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, lockTag);
Log.i("MY_TAG", "tag:" + lockTag);
}
}
if (wakeLock != null && !wakeLock.isHeld()) {
wakeLock.acquire();
//also tried with: wakeLock.acquire(1000*60*60*72); …Run Code Online (Sandbox Code Playgroud)