タグ付けされた質問 「android」

AndroidはGoogleのモバイルオペレーティングシステムであり、デジタルデバイス(スマートフォン、タブレット、自動車、TV、Wear、Glass、IoT)のプログラミングまたは開発に使用されます。Androidに関連するトピックについては、android-intent、android-activity、android-adapterなどのAndroid固有のタグを使用します。開発やプログラミング以外の質問で、Androidフレームワークに関連する質問については、次のリンクを使用してください:https:// android.stackexchange.com。

20
ラジオボタンの円の色を変更
プロジェクトの 1つでRadioButtonの円の色を変更したいのですが、どのプロパティを設定するか理解できませんでした。私が持っている背景色は黒なので、見えなくなります。円の色を白に設定したい。


12
Androidエミュレーターはメモリ8の割り当てに失敗しました
EclipseからWXGA800エミュレーターを実行しようとすると、次のようなエラーが発生します Failed to allocate memory: 8 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. 以下のリンクもチェックしました メモリの割り当てに失敗しました:8 Android:メモリの割り当てに失敗しました エミュレータでRAMサイズを減らし、Javaヒープサイズとramsizeを増やしてみましたが、それでも同じエラーが発生します。

26
AndroidアプリからFacebookページを開きますか?
私のAndroidアプリから、公式Facebookアプリ(もちろんアプリがインストールされている場合)でFacebookプロファイルへのリンクを開きたいのですが。iPhoneの場合、fb://URLスキームが存在しますが、私のAndroidデバイスで同じことを試みるとがスローされますActivityNotFoundException。 コードから公式FacebookアプリでFacebookプロファイルを開く機会はありますか?

12
AndroidでrunOnUiThreadをどのように使用しますか?
私はAndroidを初めて使用し、UIスレッドを使用しようとしているため、簡単なテストアクティビティを作成しました。しかし、ボタンをクリックしたときにアプリが応答しなくなったため、何かを誤解したと思います public class TestActivity extends Activity { Button btn; int i = 0; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btn = (Button)findViewById(R.id.btn); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { runThread(); } }); } private void runThread(){ runOnUiThread (new Thread(new Runnable() { public void run() { while(i++ …
157 android  ui-thread 

16
アプリケーションエラー-サーバーへの接続に失敗しました。(ファイル:///android_asset/www/index.html)
起動時にアプリが死ぬ(サーバーへの接続に失敗した) PhoneGap BUILDを使用して作成しているAndroidアプリケーションがあります。アプリは以前は問題なく動作していましたが、アプリを調整した後にこのエラーが発生しているようです(一部のUIの変更のみ) 1)アプリを起動すると、(通常)次のようになります。 アプリケーションエラー-サーバーへの接続に失敗しました。(ファイル:///android_asset/www/index.html) これが質問の重複である場合は申し訳ありません。ここで同様の質問をいくつか見ましたが、完全な答えや解決策は見つかりませんでした。私の場合と同様に、最後の変更までは問題なく動作していました。
157 android  cordova 

22
Androidアプリケーションを閉じる方法は?
アプリケーションを閉じて、バックグラウンドで実行されないようにしたい。 どうやってするか?これはAndroidプラットフォームでの良い習慣ですか? 「戻る」ボタンを使用すると、アプリは閉じますが、バックグラウンドのままです。バックグラウンドでそれらのアプリを殺すためだけに「TaskKiller」と呼ばれるアプリケーションさえあります。
157 android 

28
AndroidでScrollView内のListViewがスクロールしない
ListView内のスクロールに問題がありScrollViewます。上部にいくつかのEditTextがあり、次に1つのListViewを持つ2つのタブを持つタブホストがあるアクティビティがあります。EditTextビューがフォーカスされると、ソフトキーボードが表示され、ScrollViewがあるので、コンテンツはスクロール可能です。しかし、問題は、リストビュー(タブに1つ)にさらに項目がある場合に発生します。項目が多くても、リストビューをスクロールできません。 以下はレイアウトXMLです。 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="?backgroundImage" android:orientation="vertical"> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="50dip" android:layout_alignParentBottom="true" android:layout_margin="10dip" android:id="@+id/buttons"> <Button android:text="Save" android:layout_margin="2dip" android:textSize="20dip" android:id="@+id/btnSaveorUpdate" android:layout_height="wrap_content" android:layout_width="145dip"></Button> <Button android:text="Cancel" android:layout_margin="2dip" android:textSize="20dip" android:id="@+id/btnCancelorDelete" android:layout_height="wrap_content" android:layout_width="145dip"></Button> </LinearLayout> <ScrollView android:layout_above="@id/buttons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillViewport="true" android:layout_margin="10dip"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_margin="10dip"> <TextView android:text="Bill details" android:textColor="?textColorDark" android:layout_alignParentTop="true" android:id="@+id/txtEnterDetails" …


14
サークルciでcom.android.tools.build:gradle:3.0.0-alpha1が見つかりませんでした
私はgradleプラグインを最新に更新しcom.android.tools.build:gradle:3.0.0-alpha1 ました:そしてこのエラーが発生しました: export TERM="dumb" if [ -e ./gradlew ]; then ./gradlew test;else gradle test;fi FAILURE: Build failed with an exception. What went wrong: A problem occurred configuring root project 'Android-app'. Could not resolve all dependencies for configuration ':classpath'. Could not find com.android.tools.build:gradle:3.0.0-alpha1. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-alpha1/gradle-3.0.0-alpha1.pom https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-alpha1/gradle-3.0.0-alpha1.jar Required …

3
シェイプXMLのボーダー
ボタンに使用できるドローアブルを作成しようとしています。この周りに2pxの境界線を付けて、この色にしたいと思います。 境界線が表示されないことを除いて、すべてうまくいきます... <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <gradient android:startColor="@color/bar_clicked_dark" android:endColor="@color/bar_clicked_light" android:angle="90"/> <corners android:bottomLeftRadius="0dp" android:topLeftRadius="15dp" android:bottomRightRadius="15dp" android:topRightRadius="0dp" /> <stroke android:width="2dp" color="#ff00ffff" /> </shape>

17
Googleサービス3.0.0にapi_key / currentキーがありません
Googleサービスとライブラリの最新バージョン(9.0.0)でプロジェクトをアップグレードしたので、この奇妙な問題が発生しました。 等級コンソール: :app:processDebugGoogleServices Parsing json file: /Users/cyrilmorales/Documents/Projects/mobilemeans-punainenristi/app/google-services.json :app:processDebugGoogleServices FAILED Error:Execution failed for task ':app:processDebugGoogleServices'. > Missing api_key/current_key object Information:BUILD FAILED build.gradle(root): dependencies { classpath 'com.android.tools.build:gradle:2.2.0-alpha1' classpath 'com.google.gms:google-services:3.0.0' } build.gradle(アプリ): dependencies { .... compile 'com.google.android.gms:play-services-analytics:9.0.0' compile 'com.google.android.gms:play-services-gcm:9.0.0' compile 'com.google.android.gms:play-services-maps:9.0.0' compile 'com.google.android.gms:play-services-location:9.0.0' ... } apply plugin: 'com.google.gms.google-services' ただし、それは8.4.0およびgoogle-services 2.1.0のPlayサービスライブラリとうまく機能します。 あなたは解決策について何か考えがありますか?


18
フラグメントでgetSupportFragmentManager()にアクセスするにはどうすればよいですか?
FragmentActivityがあり、その中でマップフラグメントを使用したいと思います。サポートフラグメントマネージャーにアクセスするのに問題があります。 if (googleMap == null) { googleMap = ((SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map1)).getMap(); // check if map is created successfully or not if (googleMap == null) { Toast.makeText(getApplicationContext(), "Sorry! unable to create maps", Toast.LENGTH_SHORT) .show(); } } // create marker MarkerOptions marker = new MarkerOptions().position( new LatLng(latitude, longitude)).title("Hello Maps "); CameraPosition cameraPosition …

25
Android TextViewに改行を追加する方法は?
TextViewに改行を追加しようとしています。 提案された\ nを試しましたが、何も起こりません。これが私のテキストの設定方法です。 TextView txtSubTitle = (TextView)findViewById(r.id.txtSubTitle); txtSubTitle.setText(Html.fromHtml(getResources().getString(R.string.sample_string))); これは私の文字列です: <string name="sample_string">some test line 1 \n some test line 2</string> 次のように表示されます。 some test line 1 some test line 2 しかし、次のように表示されますsome test line 1 some test line 2。 何か不足していますか?

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.